{"id":13493608,"url":"https://github.com/shankarpandala/lazypredict","last_synced_at":"2025-05-14T02:05:53.264Z","repository":{"id":36175044,"uuid":"222079167","full_name":"shankarpandala/lazypredict","owner":"shankarpandala","description":"Lazy Predict help build a lot of basic models without much code and helps understand which models works better without any parameter tuning","archived":false,"fork":false,"pushed_at":"2025-04-20T10:47:32.000Z","size":5797,"stargazers_count":3128,"open_issues_count":97,"forks_count":356,"subscribers_count":26,"default_branch":"dev","last_synced_at":"2025-04-20T12:04:54.136Z","etag":null,"topics":["automl","classification","machine-learning","regression"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shankarpandala.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["shankarpandala"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2019-11-16T09:56:35.000Z","updated_at":"2025-04-20T10:37:16.000Z","dependencies_parsed_at":"2023-01-16T23:45:44.584Z","dependency_job_id":"8db063d3-d0de-4d0f-ab5e-20de9859a07b","html_url":"https://github.com/shankarpandala/lazypredict","commit_stats":{"total_commits":185,"total_committers":20,"mean_commits":9.25,"dds":0.5945945945945945,"last_synced_commit":"aad245d602f080575d05ec68750fa9c229aeea30"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shankarpandala%2Flazypredict","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shankarpandala%2Flazypredict/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shankarpandala%2Flazypredict/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shankarpandala%2Flazypredict/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shankarpandala","download_url":"https://codeload.github.com/shankarpandala/lazypredict/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052692,"owners_count":22006716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automl","classification","machine-learning","regression"],"created_at":"2024-07-31T19:01:17.063Z","updated_at":"2025-05-14T02:05:48.251Z","avatar_url":"https://github.com/shankarpandala.png","language":"Python","funding_links":["https://github.com/sponsors/shankarpandala"],"categories":["Uncategorized","Python","Machine Learning","超参数优化和AutoML","其他_机器学习与深度学习"],"sub_categories":["Uncategorized"],"readme":"# Lazy Predict\n\n[![image](https://img.shields.io/pypi/v/lazypredict.svg)](https://pypi.python.org/pypi/lazypredict)\n[![Publish](https://github.com/shankarpandala/lazypredict/actions/workflows/publish.yml/badge.svg)](https://github.com/shankarpandala/lazypredict/actions/workflows/publish.yml)\n[![Documentation Status](https://readthedocs.org/projects/lazypredict/badge/?version=latest)](https://lazypredict.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://pepy.tech/badge/lazypredict)](https://pepy.tech/project/lazypredict)\n[![CodeFactor](https://www.codefactor.io/repository/github/shankarpandala/lazypredict/badge)](https://www.codefactor.io/repository/github/shankarpandala/lazypredict)\n[![Citations](https://img.shields.io/badge/Citations-37-blue)](https://scholar.google.com/scholar?oi=bibs\u0026hl=en\u0026cites=4325808232671020176,16284230108871951652\u0026as_sdt=5)\n\nLazy Predict helps build a lot of basic models without much code and helps understand which models work better without any parameter tuning.\n\n- Free software: MIT license\n- Documentation: \u003chttps://lazypredict.readthedocs.io\u003e\n\n## Features\n- Over 40 built-in machine learning models\n- Automatic model selection for classification and regression \n- Built-in MLflow integration for experiment tracking\n- Support for Python 3.8 through 3.13\n- Custom metric evaluation support\n\n## Installation\n\nTo install Lazy Predict:\n\n```bash\npip install lazypredict\n```\n\n## Usage\n\nTo use Lazy Predict in a project:\n\n```python\nimport lazypredict\n```\n\n## Classification\n\nExample:\n\n```python\nfrom lazypredict.Supervised import LazyClassifier\nfrom sklearn.datasets import load_breast_cancer\nfrom sklearn.model_selection import train_test_split\n\ndata = load_breast_cancer()\nX = data.data\ny = data.target\n\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.5, random_state=123)\n\nclf = LazyClassifier(verbose=0, ignore_warnings=True, custom_metric=None)\nmodels, predictions = clf.fit(X_train, X_test, y_train, y_test)\n\nprint(models)\n```\n\n| Model                          |   Accuracy |   Balanced Accuracy |   ROC AUC |   F1 Score |   Time Taken |\n|:-------------------------------|-----------:|--------------------:|----------:|-----------:|-------------:|\n| LinearSVC                      |   0.989474 |            0.987544 |  0.987544 |   0.989462 |    0.0150008 |\n| SGDClassifier                  |   0.989474 |            0.987544 |  0.987544 |   0.989462 |    0.0109992 |\n| MLPClassifier                  |   0.985965 |            0.986904 |  0.986904 |   0.985994 |    0.426     |\n| Perceptron                     |   0.985965 |            0.984797 |  0.984797 |   0.985965 |    0.0120046 |\n| LogisticRegression             |   0.985965 |            0.98269  |  0.98269  |   0.985934 |    0.0200036 |\n| LogisticRegressionCV           |   0.985965 |            0.98269  |  0.98269  |   0.985934 |    0.262997  |\n| SVC                            |   0.982456 |            0.979942 |  0.979942 |   0.982437 |    0.0140011 |\n| CalibratedClassifierCV         |   0.982456 |            0.975728 |  0.975728 |   0.982357 |    0.0350015 |\n| PassiveAggressiveClassifier    |   0.975439 |            0.974448 |  0.974448 |   0.975464 |    0.0130005 |\n| LabelPropagation               |   0.975439 |            0.974448 |  0.974448 |   0.975464 |    0.0429988 |\n| LabelSpreading                 |   0.975439 |            0.974448 |  0.974448 |   0.975464 |    0.0310006 |\n| RandomForestClassifier         |   0.97193  |            0.969594 |  0.969594 |   0.97193  |    0.033     |\n| GradientBoostingClassifier     |   0.97193  |            0.967486 |  0.967486 |   0.971869 |    0.166998  |\n| QuadraticDiscriminantAnalysis  |   0.964912 |            0.966206 |  0.966206 |   0.965052 |    0.0119994 |\n| HistGradientBoostingClassifier |   0.968421 |            0.964739 |  0.964739 |   0.968387 |    0.682003  |\n| RidgeClassifierCV              |   0.97193  |            0.963272 |  0.963272 |   0.971736 |    0.0130029 |\n| RidgeClassifier                |   0.968421 |            0.960525 |  0.960525 |   0.968242 |    0.0119977 |\n| AdaBoostClassifier             |   0.961404 |            0.959245 |  0.959245 |   0.961444 |    0.204998  |\n| ExtraTreesClassifier           |   0.961404 |            0.957138 |  0.957138 |   0.961362 |    0.0270066 |\n| KNeighborsClassifier           |   0.961404 |            0.95503  |  0.95503  |   0.961276 |    0.0560005 |\n| BaggingClassifier              |   0.947368 |            0.954577 |  0.954577 |   0.947882 |    0.0559971 |\n| BernoulliNB                    |   0.950877 |            0.951003 |  0.951003 |   0.951072 |    0.0169988 |\n| LinearDiscriminantAnalysis     |   0.961404 |            0.950816 |  0.950816 |   0.961089 |    0.0199995 |\n| GaussianNB                     |   0.954386 |            0.949536 |  0.949536 |   0.954337 |    0.0139935 |\n| NuSVC                          |   0.954386 |            0.943215 |  0.943215 |   0.954014 |    0.019989  |\n| DecisionTreeClassifier         |   0.936842 |            0.933693 |  0.933693 |   0.936971 |    0.0170023 |\n| NearestCentroid                |   0.947368 |            0.933506 |  0.933506 |   0.946801 |    0.0160074 |\n| ExtraTreeClassifier            |   0.922807 |            0.912168 |  0.912168 |   0.922462 |    0.0109999 |\n| CheckingClassifier             |   0.361404 |            0.5      |  0.5      |   0.191879 |    0.0170043 |\n| DummyClassifier                |   0.512281 |            0.489598 |  0.489598 |   0.518924 |    0.0119965 |\n\n## Regression\n\nExample:\n\n```python\nfrom lazypredict.Supervised import LazyRegressor\nfrom sklearn import datasets\nfrom sklearn.utils import shuffle\nimport numpy as np\n\ndiabetes  = datasets.load_diabetes()\nX, y = shuffle(diabetes.data, diabetes.target, random_state=13)\nX = X.astype(np.float32)\n\noffset = int(X.shape[0] * 0.9)\n\nX_train, y_train = X[:offset], y[:offset]\nX_test, y_test = X[offset:], y[offset:]\n\nreg = LazyRegressor(verbose=0, ignore_warnings=False, custom_metric=None)\nmodels, predictions = reg.fit(X_train, X_test, y_train, y_test)\n\nprint(models)\n```\n\n| Model                         |   Adjusted R-Squared |   R-Squared |     RMSE |   Time Taken |\n|:------------------------------|---------------------:|------------:|---------:|-------------:|\n| ExtraTreesRegressor           |           0.378921   |  0.520076   |  54.2202 |   0.121466   |\n| OrthogonalMatchingPursuitCV   |           0.374947   |  0.517004   |  54.3934 |   0.0111742  |\n| Lasso                         |           0.373483   |  0.515873   |  54.457  |   0.00620174 |\n| LassoLars                     |           0.373474   |  0.515866   |  54.4575 |   0.0087235  |\n| LarsCV                        |           0.3715     |  0.514341   |  54.5432 |   0.0160234  |\n| LassoCV                       |           0.370413   |  0.513501   |  54.5903 |   0.0624897  |\n| PassiveAggressiveRegressor    |           0.366958   |  0.510831   |  54.7399 |   0.00689793 |\n| LassoLarsIC                   |           0.364984   |  0.509306   |  54.8252 |   0.0108321  |\n| SGDRegressor                  |           0.364307   |  0.508783   |  54.8544 |   0.0055306  |\n| RidgeCV                       |           0.363002   |  0.507774   |  54.9107 |   0.00728202 |\n| Ridge                         |           0.363002   |  0.507774   |  54.9107 |   0.00556874 |\n| BayesianRidge                 |           0.362296   |  0.507229   |  54.9411 |   0.0122972  |\n| LassoLarsCV                   |           0.361749   |  0.506806   |  54.9646 |   0.0175984  |\n| TransformedTargetRegressor    |           0.361749   |  0.506806   |  54.9646 |   0.00604773 |\n| LinearRegression              |           0.361749   |  0.506806   |  54.9646 |   0.00677514 |\n| Lars                          |           0.358828   |  0.504549   |  55.0903 |   0.00935149 |\n| ElasticNetCV                  |           0.356159   |  0.502486   |  55.2048 |   0.0478678  |\n| HuberRegressor                |           0.355251   |  0.501785   |  55.2437 |   0.0129263  |\n| RandomForestRegressor         |           0.349621   |  0.497434   |  55.4844 |   0.2331     |\n| AdaBoostRegressor             |           0.340416   |  0.490322   |  55.8757 |   0.0512381  |\n| LGBMRegressor                 |           0.339239   |  0.489412   |  55.9255 |   0.0396187  |\n| HistGradientBoostingRegressor |           0.335632   |  0.486625   |  56.0779 |   0.0897055  |\n| PoissonRegressor              |           0.323033   |  0.476889   |  56.6072 |   0.00953603 |\n| ElasticNet                    |           0.301755   |  0.460447   |  57.4899 |   0.00604224 |\n| KNeighborsRegressor           |           0.299855   |  0.458979   |  57.5681 |   0.00757337 |\n| OrthogonalMatchingPursuit     |           0.292421   |  0.453235   |  57.8729 |   0.00709486 |\n| BaggingRegressor              |           0.291213   |  0.452301   |  57.9223 |   0.0302746  |\n| GradientBoostingRegressor     |           0.247009   |  0.418143   |  59.7011 |   0.136803   |\n| TweedieRegressor              |           0.244215   |  0.415984   |  59.8118 |   0.00633955 |\n| XGBRegressor                  |           0.224263   |  0.400567   |  60.5961 |   0.339694   |\n| GammaRegressor                |           0.223895   |  0.400283   |  60.6105 |   0.0235181  |\n| RANSACRegressor               |           0.203535   |  0.38455    |  61.4004 |   0.0653253  |\n| LinearSVR                     |           0.116707   |  0.317455   |  64.6607 |   0.0077076  |\n| ExtraTreeRegressor            |           0.00201902 |  0.228833   |  68.7304 |   0.00626636 |\n| NuSVR                         |          -0.0667043  |  0.175728   |  71.0575 |   0.0143399  |\n| SVR                           |          -0.0964128  |  0.152772   |  72.0402 |   0.0114729  |\n| DummyRegressor                |          -0.297553   | -0.00265478 |  78.3701 |   0.00592971 |\n| DecisionTreeRegressor         |          -0.470263   | -0.136112   |  83.4229 |   0.00749898 |\n| GaussianProcessRegressor      |          -0.769174   | -0.367089   |  91.5109 |   0.0770502  |\n| MLPRegressor                  |          -1.86772    | -1.21597    | 116.508  |   0.235267   |\n| KernelRidge                   |          -5.03822    | -3.6659     | 169.061  |   0.0243919  |\n\n## MLflow Integration\n\nLazy Predict includes built-in MLflow integration. Enable it by setting the MLflow tracking URI:\n\n```python\nimport os\nos.environ['MLFLOW_TRACKING_URI'] = 'sqlite:///mlflow.db'\n\n# MLflow tracking will be automatically enabled\nreg = LazyRegressor(verbose=0, ignore_warnings=True)\nmodels, predictions = reg.fit(X_train, X_test, y_train, y_test)\n```\n\nAutomatically tracks:\n- Model metrics (R-squared, RMSE, etc.)\n- Training time\n- Model parameters\n- Model artifacts","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshankarpandala%2Flazypredict","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshankarpandala%2Flazypredict","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshankarpandala%2Flazypredict/lists"}