{"id":26210508,"url":"https://github.com/civisanalytics/civisml-extensions","last_synced_at":"2026-03-07T18:04:46.032Z","repository":{"id":53800377,"uuid":"103165761","full_name":"civisanalytics/civisml-extensions","owner":"civisanalytics","description":"scikit-learn-compatible estimators from Civis Analytics","archived":false,"fork":false,"pushed_at":"2021-11-04T02:19:22.000Z","size":121,"stargazers_count":59,"open_issues_count":3,"forks_count":19,"subscribers_count":74,"default_branch":"master","last_synced_at":"2025-04-15T14:04:59.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/civisanalytics.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-11T17:20:15.000Z","updated_at":"2024-01-22T21:22:12.000Z","dependencies_parsed_at":"2022-08-21T23:40:34.007Z","dependency_job_id":null,"html_url":"https://github.com/civisanalytics/civisml-extensions","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/civisanalytics/civisml-extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fcivisml-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fcivisml-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fcivisml-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fcivisml-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/civisanalytics","download_url":"https://codeload.github.com/civisanalytics/civisml-extensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/civisanalytics%2Fcivisml-extensions/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30225479,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T17:00:40.062Z","status":"ssl_error","status_checked_at":"2026-03-07T17:00:39.026Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-03-12T07:29:17.496Z","updated_at":"2026-03-07T18:04:46.017Z","avatar_url":"https://github.com/civisanalytics.png","language":"Python","funding_links":[],"categories":["Machine Learning Frameworks"],"sub_categories":[],"readme":"civisml-extensions\n==================\n\n.. image:: https://www.travis-ci.org/civisanalytics/civisml-extensions.svg?branch=master\n    :target: https://www.travis-ci.org/civisanalytics/civisml-extensions\n\nscikit-learn-compatible estimators from Civis Analytics\n\nInstallation\n------------\n\nInstallation with ``pip`` is recommended::\n\n    $ pip install civisml-extensions\n\nFor development, a few additional dependencies are needed::\n\n    $ pip install -r dev-requirements.txt\n\nContents and Usage\n------------------\n\nThis package contains `scikit-learn`_-compatible estimators for stacking (\n``StackedClassifier``, ``StackedRegressor``), non-negative linear regression (\n``NonNegativeLinearRegression``), preprocessing pandas_ ``DataFrames`` (\n``DataFrameETL``), and using Hyperband_ for cross-validating hyperparameters (\n``HyperbandSearchCV``).\n\nUsage of these estimators follows the standard sklearn conventions. Here is an\nexample of using the ``StackedClassifier``:\n\n    .. code-block:: python\n\n        \u003e\u003e\u003e from sklearn.linear_model import LogisticRegression\n        \u003e\u003e\u003e from sklearn.ensemble import RandomForestClassifier\n        \u003e\u003e\u003e from civismlext.stacking import StackedClassifier\n        \u003e\u003e\u003e \n        \u003e\u003e\u003e # Define some Train data and labels\n        \u003e\u003e\u003e Xtrain, ytrain = \u003ctrain_features\u003e, \u003ctrain_labels\u003e\n        \u003e\u003e\u003e \n        \u003e\u003e\u003e # Note that the final estimator 'metalr' is the meta-estimator\n        \u003e\u003e\u003e estlist = [('rf', RandomForestClassifier()),\n        \u003e\u003e\u003e            ('lr', LogisticRegression()),\n        \u003e\u003e\u003e            ('metalr', LogisticRegression())]\n        \u003e\u003e\u003e \n        \u003e\u003e\u003e mysm = StackedClassifier(estlist)\n        \u003e\u003e\u003e # Set some parameters, if you didn't set them at instantiation\n        \u003e\u003e\u003e mysm.set_params(rf__random_state=7, lr__random_state=8,\n        \u003e\u003e\u003e                 metalr__random_state=9, metalr__C=10**7)\n        \u003e\u003e\u003e \n        \u003e\u003e\u003e # Fit\n        \u003e\u003e\u003e mysm.fit(Xtrain, ytrain)\n        \u003e\u003e\u003e \n        \u003e\u003e\u003e # Predict!\n        \u003e\u003e\u003e ypred = mysm.predict_proba(Xtest)\n\nYou can learn more about stacking and see an example use of the  ``StackedRegressor`` and ``NonNegativeLinearRegression`` estimators in `a talk presented at PyData NYC`_ in November, 2017.\n\nSee the doc strings of the various estimators for more information.\n\nContributing\n------------\n\nPlease see ``CONTRIBUTING.md`` for information about contributing to this project.\n\nLicense\n-------\n\nBSD-3\n\nSee ``LICENSE.md`` for details.\n\n.. _scikit-learn: http://scikit-learn.org/\n.. _pandas: http://pandas.pydata.org/\n.. _Hyperband: https://arxiv.org/abs/1603.06560\n.. _a talk presented at PyData NYC: https://www.youtube.com/watch?v=3gpf1lGwecA\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcivisanalytics%2Fcivisml-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcivisanalytics%2Fcivisml-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcivisanalytics%2Fcivisml-extensions/lists"}