Skip to content

Instantly share code, notes, and snippets.

@Geek-a-Byte
Created February 9, 2023 14:59
Show Gist options
  • Save Geek-a-Byte/28a8082748faff5be1df26cfa166e410 to your computer and use it in GitHub Desktop.
Save Geek-a-Byte/28a8082748faff5be1df26cfa166e410 to your computer and use it in GitHub Desktop.
!pip install pyforest
!pip install lazypredict
import pyforest
import lazypredict
from lazypredict.Supervised import LazyClassifier
clf = LazyClassifier(verbose=0, predictions=True, ignore_warnings=False, custom_metric=None)
models, predictions = clf.fit(X_train, X_test, y_train, y_test)
print(models)
from sklearn.metrics import classification_report
for i in predictions.columns.tolist():
print('\t\t',i,'\n')
print(classification_report(y_test, predictions[i]),'\n')
models['models'] = models.index
models.to_csv('lazy_classifier_evaluation.csv', index=False, encoding='utf-8')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment