Day 69 – LazyPredict Classifier Models In Machine Learning – Part II

    We have seen the introduction of Lazypredict and Regression models to make our life easy to check which models better for our data.

    In this blog, we will go through a code of the Lazypredict Classifier problem.  I have prepared my own data and posted it onto the GitHub repository to download this data.

    In this example, I am going to use Jupyter Notebook.  I have prepared my own data and posted it onto the GitHub repository to download this data.

    Copy to Clipboard
    Copy to Clipboard
    Copy to Clipboard
    Copy to Clipboard
    Copy to Clipboard
    Load Data of Delivery data
    Copy to Clipboard
    Copy to Clipboard
    X Data
    Copy to Clipboard
    y Data
    Copy to Clipboard
    Copy to Clipboard
    models_predict
    Copy to Clipboard
                                   Accuracy  Balanced Accuracy  ROC AUC  F1 Score  \
    Model                                                                           
    AdaBoostClassifier             1.000000           1.000000 1.000000  1.000000   
    LinearDiscriminantAnalysis     1.000000           1.000000 1.000000  1.000000   
    XGBClassifier                  1.000000           1.000000 1.000000  1.000000   
    SGDClassifier                  1.000000           1.000000 1.000000  1.000000   
    RidgeClassifierCV              1.000000           1.000000 1.000000  1.000000   
    RidgeClassifier                1.000000           1.000000 1.000000  1.000000   
    RandomForestClassifier         1.000000           1.000000 1.000000  1.000000   
    Perceptron                     1.000000           1.000000 1.000000  1.000000   
    PassiveAggressiveClassifier    1.000000           1.000000 1.000000  1.000000   
    NearestCentroid                1.000000           1.000000 1.000000  1.000000   
    LogisticRegression             1.000000           1.000000 1.000000  1.000000   
    BaggingClassifier              1.000000           1.000000 1.000000  1.000000   
    LinearSVC                      1.000000           1.000000 1.000000  1.000000   
    GaussianNB                     1.000000           1.000000 1.000000  1.000000   
    ExtraTreesClassifier           1.000000           1.000000 1.000000  1.000000   
    DecisionTreeClassifier         1.000000           1.000000 1.000000  1.000000   
    CalibratedClassifierCV         1.000000           1.000000 1.000000  1.000000   
    BernoulliNB                    1.000000           1.000000 1.000000  1.000000   
    LGBMClassifier                 1.000000           1.000000 1.000000  1.000000   
    SVC                            0.998000           0.997642 0.997642  0.997999   
    QuadraticDiscriminantAnalysis  0.992000           0.990566 0.990566  0.991989   
    NuSVC                          0.984000           0.981132 0.981132  0.983956   
    KNeighborsClassifier           0.978000           0.974679 0.974679  0.977931   
    ExtraTreeClassifier            0.960000           0.961544 0.961544  0.960089   
    LabelSpreading                 0.960000           0.957187 0.957187  0.959919   
    LabelPropagation               0.960000           0.957187 0.957187  0.959919   
    DummyClassifier                0.508000           0.494497 0.494497  0.507005   
    
                                   Time Taken  
    Model                                      
    AdaBoostClassifier               0.021941  
    LinearDiscriminantAnalysis       0.000000  
    XGBClassifier                    0.029637  
    SGDClassifier                    0.012965  
    RidgeClassifierCV                0.015958  
    RidgeClassifier                  0.017968  
    RandomForestClassifier           0.147104  
    Perceptron                       0.000000  
    PassiveAggressiveClassifier      0.015622  
    NearestCentroid                  0.011968  
    LogisticRegression               0.026497  
    BaggingClassifier                0.039891  
    LinearSVC                        0.015622  
    GaussianNB                       0.015621  
    ExtraTreesClassifier             0.136031  
    DecisionTreeClassifier           0.017724  
    CalibratedClassifierCV           0.023703  
    BernoulliNB                      0.012965  
    LGBMClassifier                   0.053272  
    SVC                              0.008027  
    QuadraticDiscriminantAnalysis    0.017415  
    NuSVC                            0.014008  
    KNeighborsClassifier             0.044704  
    ExtraTreeClassifier              0.012965  
    LabelSpreading                   0.031243  
    LabelPropagation                 0.014095  
    DummyClassifier                  0.011968
    Many classifiers works best for this data.
    By |2021-06-27T20:49:13+00:00June 26th, 2021|Machine Learning|0 Comments

    About the Author:

    Leave A Comment