rapidpredict


Namerapidpredict JSON
Version 0.0.0.9 PyPI version JSON
download
home_page
Summaryrapid predict is a python package to simplifies the process of fitting and evaluating multiple machine learning models on a dataset.
upload_time2023-04-14 03:43:24
maintainer
docs_urlNone
authorSynthetic Dataset AI Team
requires_python>=3.7
license
keywords python pandas numpy scikit-learn scipy matplotlib seaborn
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# RapidPredict

RapidPredict is a Python library that simplifies the process of fitting and evaluating multiple machine learning models from scikit-learn. It's designed to provide a quick way to test various algorithms on a given dataset and compare their performance. 





# Installation



To install Rapid Predict from PyPI:



    pip install rapidpredict



    pip install -U rapidpredict





    



# Usage



To use Rapid Predict in a project:



    import rapidpredict







## Classification



Example :



    from rapidpredict.supervised import *

    from sklearn.model_selection import train_test_split

    from sklearn.datasets import load_breast_cancer

    data = load_breast_cancer()

    X = data.data

    y= data.target



    X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.25,random_state =123)





    clf = rapidclassifier(verbose= 0,ignore_warnings=True, custom_metric=None)

    models , predictions = clf.fit(X_train, X_test, y_train, y_test)







    |Model |Accuracy	 |Balanced Accuracy |	ROC | AUC |	Recall |	Precision | F1 Score |	5 Fold F1 |	Time  Taken |

    |-------------------------------|------|------|------|------|------|------|------|------|

    | QuadraticDiscriminantAnalysis | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.96 | 0.09 |

    | RandomForestClassifier        | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.96 | 1.21 |

    | LogisticRegression            | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.98 | 0.17 |

    | ExtraTreesClassifier          | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.97 | 0.80 |

    | RidgeClassifier               | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.96 | 0.13 |

    | LinearSVC                     | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.96 | 0.10 |

    | SVC                           | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.97 | 0.10 |

    | RidgeClassifierCV             | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.96 | 0.17 |

    | LabelPropagation              | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.94 | 0.17 |

    | LabelSpreading                | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.96 | 0.19 |

    | SGDClassifier                 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.97 | 0.09 |

    | Perceptron                    | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.97 | 0.08 |

    | KNeighborsClassifier          | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.97 | 0.11 |

    | DecisionTreeClassifier        | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.93 | 0.09 |

    | BernoulliNB                   | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.93 | 0.09 |

    | LinearDiscriminantAnalysis    | 0.98 | 0.97 | 0.97 | 0.98 | 0.98 | 0.98 | 0.96 | 0.14 |

    | CalibratedClassifierCV        | 0.98 | 0.97 | 0.97 | 0.98 | 0.98 | 0.98 | 0.97 | 0.24 |

    | AdaBoostClassifier            | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.95 | 0.89 |

    | PassiveAggressiveClassifier   | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.09 |

    | XGBClassifier                 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.45 |

    | BaggingClassifier             | 0.97 | 0.96 | 0.96 | 0.97 | 0.97 | 0.97 | 0.95 | 0.32 |

    | NuSVC                         | 0.97 | 0.95 | 0.95 | 0.97 | 0.97 | 0.96 | 0.95 | 0.12 |

    | NearestCentroid               | 0.97 | 0.95 | 0.95 | 0.97 | 0.97 | 0.96 | 0.94 | 0.08 |

    | GaussianNB                    | 0.97 | 0.95 | 0.95 | 0.97 | 0.97 | 0.96 | 0.94 | 0.08 |

    | ExtraTreeClassifier           | 0.94 | 0.94 | 0.94 | 0.94 | 0.94 | 0.94 | 0.93 | 0.08 |

    | DummyClassifier               | 0.62 | 0.50 | 0.50 | 0.62 | 0.39 | 0.48 | 0.77 | 0.08 |







## Plot Target values



    plot_target(y)



![plot target](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/plot_target.png)







## Comparing models using bar graph

 

  compareModels_bargraph(predictions["F1 Score"] ,models.index)

 



![Comparing models using bar graph](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/compareModels_bargraph.png)  





## Comparing models using box plot

 

    compareModels_boxplot(predictions["F1 Score"] ,models.index)





![Comparing models using box plot](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/compareModels_boxplot.png)





## Heatmap



![heatmap Half Heatmap of Pearson Correlations](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/heatmap.png)    







This code updated from github  ["Lazypredic-Shankar Rao Pandala"](https://github.com/shankarpandala/lazypredict) 


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "rapidpredict",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "python,pandas,numpy,scikit-learn,scipy,matplotlib,seaborn",
    "author": "Synthetic Dataset AI Team",
    "author_email": "<nematiusa@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/59/1f/e379ed63a1732efe47790eb33279023c954c97bc2c864b8d8783501247dd/rapidpredict-0.0.0.9.tar.gz",
    "platform": null,
    "description": "\n# RapidPredict\n\nRapidPredict is a Python library that simplifies the process of fitting and evaluating multiple machine learning models from scikit-learn. It's designed to provide a quick way to test various algorithms on a given dataset and compare their performance. \n\n\n\n\n\n# Installation\n\n\n\nTo install Rapid Predict from PyPI:\n\n\n\n    pip install rapidpredict\n\n\n\n    pip install -U rapidpredict\n\n\n\n\n\n    \n\n\n\n# Usage\n\n\n\nTo use Rapid Predict in a project:\n\n\n\n    import rapidpredict\n\n\n\n\n\n\n\n## Classification\n\n\n\nExample :\n\n\n\n    from rapidpredict.supervised import *\n\n    from sklearn.model_selection import train_test_split\n\n    from sklearn.datasets import load_breast_cancer\n\n    data = load_breast_cancer()\n\n    X = data.data\n\n    y= data.target\n\n\n\n    X_train, X_test, y_train, y_test = train_test_split(X, y,test_size=.25,random_state =123)\n\n\n\n\n\n    clf = rapidclassifier(verbose= 0,ignore_warnings=True, custom_metric=None)\n\n    models , predictions = clf.fit(X_train, X_test, y_train, y_test)\n\n\n\n\n\n\n\n    |Model |Accuracy\t |Balanced Accuracy |\tROC | AUC |\tRecall |\tPrecision | F1 Score |\t5 Fold F1 |\tTime  Taken |\n\n    |-------------------------------|------|------|------|------|------|------|------|------|\n\n    | QuadraticDiscriminantAnalysis | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.96 | 0.09 |\n\n    | RandomForestClassifier        | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.96 | 1.21 |\n\n    | LogisticRegression            | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.99 | 0.98 | 0.17 |\n\n    | ExtraTreesClassifier          | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.97 | 0.80 |\n\n    | RidgeClassifier               | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.96 | 0.13 |\n\n    | LinearSVC                     | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.96 | 0.10 |\n\n    | SVC                           | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.97 | 0.10 |\n\n    | RidgeClassifierCV             | 0.99 | 0.98 | 0.98 | 0.99 | 0.99 | 0.99 | 0.96 | 0.17 |\n\n    | LabelPropagation              | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.94 | 0.17 |\n\n    | LabelSpreading                | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.96 | 0.19 |\n\n    | SGDClassifier                 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.97 | 0.09 |\n\n    | Perceptron                    | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.97 | 0.08 |\n\n    | KNeighborsClassifier          | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.97 | 0.11 |\n\n    | DecisionTreeClassifier        | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.93 | 0.09 |\n\n    | BernoulliNB                   | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.98 | 0.93 | 0.09 |\n\n    | LinearDiscriminantAnalysis    | 0.98 | 0.97 | 0.97 | 0.98 | 0.98 | 0.98 | 0.96 | 0.14 |\n\n    | CalibratedClassifierCV        | 0.98 | 0.97 | 0.97 | 0.98 | 0.98 | 0.98 | 0.97 | 0.24 |\n\n    | AdaBoostClassifier            | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.95 | 0.89 |\n\n    | PassiveAggressiveClassifier   | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.09 |\n\n    | XGBClassifier                 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.97 | 0.45 |\n\n    | BaggingClassifier             | 0.97 | 0.96 | 0.96 | 0.97 | 0.97 | 0.97 | 0.95 | 0.32 |\n\n    | NuSVC                         | 0.97 | 0.95 | 0.95 | 0.97 | 0.97 | 0.96 | 0.95 | 0.12 |\n\n    | NearestCentroid               | 0.97 | 0.95 | 0.95 | 0.97 | 0.97 | 0.96 | 0.94 | 0.08 |\n\n    | GaussianNB                    | 0.97 | 0.95 | 0.95 | 0.97 | 0.97 | 0.96 | 0.94 | 0.08 |\n\n    | ExtraTreeClassifier           | 0.94 | 0.94 | 0.94 | 0.94 | 0.94 | 0.94 | 0.93 | 0.08 |\n\n    | DummyClassifier               | 0.62 | 0.50 | 0.50 | 0.62 | 0.39 | 0.48 | 0.77 | 0.08 |\n\n\n\n\n\n\n\n## Plot Target values\n\n\n\n    plot_target(y)\n\n\n\n![plot target](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/plot_target.png)\n\n\n\n\n\n\n\n## Comparing models using bar graph\n\n \n\n  compareModels_bargraph(predictions[\"F1 Score\"] ,models.index)\n\n \n\n\n\n![Comparing models using bar graph](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/compareModels_bargraph.png)  \n\n\n\n\n\n## Comparing models using box plot\n\n \n\n    compareModels_boxplot(predictions[\"F1 Score\"] ,models.index)\n\n\n\n\n\n![Comparing models using box plot](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/compareModels_boxplot.png)\n\n\n\n\n\n## Heatmap\n\n\n\n![heatmap Half Heatmap of Pearson Correlations](https://raw.githubusercontent.com/syntheticdataset/rapidpredict/main/image/heatmap.png)    \n\n\n\n\n\n\n\nThis code updated from github  [\"Lazypredic-Shankar Rao Pandala\"](https://github.com/shankarpandala/lazypredict) \n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "rapid predict is a python package to simplifies the process of fitting and evaluating multiple machine learning models on a dataset.",
    "version": "0.0.0.9",
    "split_keywords": [
        "python",
        "pandas",
        "numpy",
        "scikit-learn",
        "scipy",
        "matplotlib",
        "seaborn"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3bbffd72909c68e33030002476ac4437b5227b531e22198b69c0452261659b40",
                "md5": "b27148803f1fd68923b6f810495a873f",
                "sha256": "51d54fc1396339bc4ef373c8c0fdacb5b4838c753cea7c2fcf9c5fa1458dcd7f"
            },
            "downloads": -1,
            "filename": "rapidpredict-0.0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b27148803f1fd68923b6f810495a873f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7691,
            "upload_time": "2023-04-14T03:43:22",
            "upload_time_iso_8601": "2023-04-14T03:43:22.117048Z",
            "url": "https://files.pythonhosted.org/packages/3b/bf/fd72909c68e33030002476ac4437b5227b531e22198b69c0452261659b40/rapidpredict-0.0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "591fe379ed63a1732efe47790eb33279023c954c97bc2c864b8d8783501247dd",
                "md5": "020639cb7ff4e0f03526927a8f5b7e13",
                "sha256": "13bd84a7c805f8888a5ef77e484989459eb4e433df8a75d3fe8b48757396c7c4"
            },
            "downloads": -1,
            "filename": "rapidpredict-0.0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "020639cb7ff4e0f03526927a8f5b7e13",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9123,
            "upload_time": "2023-04-14T03:43:24",
            "upload_time_iso_8601": "2023-04-14T03:43:24.234175Z",
            "url": "https://files.pythonhosted.org/packages/59/1f/e379ed63a1732efe47790eb33279023c954c97bc2c864b8d8783501247dd/rapidpredict-0.0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-14 03:43:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "rapidpredict"
}
        
Elapsed time: 0.05496s