{"id":13571513,"url":"https://github.com/flennerhag/mlens","last_synced_at":"2026-02-11T09:09:15.732Z","repository":{"id":41612194,"uuid":"78573084","full_name":"flennerhag/mlens","owner":"flennerhag","description":"ML-Ensemble – high performance ensemble learning","archived":false,"fork":false,"pushed_at":"2023-11-13T16:09:34.000Z","size":10428,"stargazers_count":859,"open_issues_count":27,"forks_count":110,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-09-25T16:28:33.061Z","etag":null,"topics":["ensemble","ensemble-learning","ensembles","learners","machine-learning","python","stack","stacking"],"latest_commit_sha":null,"homepage":"http://ml-ensemble.com","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/flennerhag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-01-10T20:53:47.000Z","updated_at":"2025-09-17T12:56:21.000Z","dependencies_parsed_at":"2022-07-06T23:33:10.453Z","dependency_job_id":"d377e4a5-8af5-4d88-a52a-387d6269af02","html_url":"https://github.com/flennerhag/mlens","commit_stats":{"total_commits":804,"total_committers":7,"mean_commits":"114.85714285714286","dds":"0.026119402985074647","last_synced_commit":"6cbc11354b5f9500a33d9cefb700a1bba9d3199a"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/flennerhag/mlens","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flennerhag%2Fmlens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flennerhag%2Fmlens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flennerhag%2Fmlens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flennerhag%2Fmlens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flennerhag","download_url":"https://codeload.github.com/flennerhag/mlens/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flennerhag%2Fmlens/sbom","scorecard":{"id":403040,"data":{"date":"2025-08-11","repo":{"name":"github.com/flennerhag/mlens","commit":"6cbc11354b5f9500a33d9cefb700a1bba9d3199a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: pipCommand not pinned by hash: .travis/install.sh:10","Warn: pipCommand not pinned by hash: .travis/install.sh:11","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: GHSA-6p56-wp2h-9hxr","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: PYSEC-2020-73","Warn: Project is vulnerable to: PYSEC-2020-107 / GHSA-jjw5-xxj6-pcv5","Warn: Project is vulnerable to: PYSEC-2024-110 / GHSA-jw8x-6495-233v","Warn: Project is vulnerable to: PYSEC-2020-108","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T20:31:39.762Z","repository_id":41612194,"created_at":"2025-08-18T20:31:39.762Z","updated_at":"2025-08-18T20:31:39.762Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29330858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"last_error":"SSL_read: 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":["ensemble","ensemble-learning","ensembles","learners","machine-learning","python","stack","stacking"],"created_at":"2024-08-01T14:01:02.670Z","updated_at":"2026-02-11T09:09:15.689Z","avatar_url":"https://github.com/flennerhag.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/source/_static/img/logo.png\" width=\"50%\"\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\u003chr\u003e\n\n![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg)\n![Python 2.7](https://img.shields.io/badge/python-2.7-blue.svg)\n[![PyPI version](https://badge.fury.io/py/mlens.svg)](http://badge.fury.io/py/mlens)\n[![Build Status](https://travis-ci.org/flennerhag/mlens.svg?branch=master)](https://travis-ci.org/flennerhag/mlens)\n[![Build status](https://ci.appveyor.com/api/projects/status/99g65kvraic8w2la/branch/master?svg=true)](https://ci.appveyor.com/project/flennerhag/mlens/branch/master)\n[![Code Health](https://landscape.io/github/flennerhag/mlens/master/landscape.svg?style=flat)](https://landscape.io/github/flennerhag/mlens/master)\n[![Coverage Status](https://coveralls.io/repos/github/flennerhag/mlens/badge.svg?branch=master)](https://coveralls.io/github/flennerhag/mlens?branch=master)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n[![DOI](https://zenodo.org/badge/78573084.svg)](https://zenodo.org/badge/latestdoi/78573084)\n\n**A Python library for high performance ensemble learning**\n\nML-Ensemble combines a Scikit-learn high-level API with a low-level\ncomputational graph framework to build memory efficient, \nmaximally parallelized ensemble networks in as few lines of codes as possible.\n\nML-Ensemble is thread safe as long as base learners are and can fall back on\nmemory mapped multiprocessing for memory-neutral process-based concurrency.\nFor tutorials and full documentation, visit the project\n [website](http://ml-ensemble.com/).\n\n## Ensembles as computational graphs\n\nAn ensemble is built on top of a computational graph,\nallowing users great design freedom. Ensembles can be built with recursion,\ndynamic evaluation (e.g. ``if-else``) and much more. A high-level API wraps common\nensemble architectures into Scikit-learn estimators.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"docs/source/_static/img/network.png\" width=\"60%\"\u003e\u003cbr\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n*Example computational graph of a layer in an ensemble*\n\n### Memory efficient parallelized learning\n\nML-Ensemble is optimized for speed and minimal memory consumption. No\nserialization of data takes place, regardless of whether multithreading or\nmultiprocessing is used. Additionally, multithreading is pickle-free. \n\n### Ease of use\n\nReady-made ensembles are built by adding layers to an instance. No matter how\ncomplex the ensemble, to train it call the ``fit`` method:\n\n```python\nensemble = Subsemble()\n\n# First layer\nensemble.add(list_of_estimators)\n\n# Second layer\nensemble.add(list_of_estimators)\n\n# Final meta estimator\nensemble.add_meta(estimator)\n\n# Train ensemble\nensemble.fit(X, y)\n```\n\nSimilarly, it's straightforward to modify an existing ensemble:\n\n```python\n# Remove layer\nensemble.remove(2)\n\n# Change layer parameters\nensemble.replace(0, new_list_of_estimators)\n```\n\nAnd to create differentiated preprocessing pipelines for different subsets\nof estimators within a given layer, simple pass a mapping to the ``add``\nmethod:\n\n```python\n\npreprocessing = {'pipeline-1': list_of_transformers_1,\n                 'pipeline-2': list_of_transformers_2}\n\nestimators = {'pipeline-1': list_of_estimators_1,\n              'pipeline-2': list_of_estimators_2}\n\nensemble.add(estimators, preprocessing)\n```\n\n### Dedicated diagnostics\n\nML Ensemble implements a dedicated diagnostics and model selection suite\nfor intuitive and speedy ensemble evaluation. The ``Evaluator``\nallows you to evaluate several preprocessing pipelines and several\nestimators in one go, giving you birds-eye view of how different candidates\nfor the ensemble perform.\n\nMoreover, entire *ensembles* can be used as a preprocessing pipeline, to\nleverage model selection for higher-level layers. Simply set ``model_selection``\nto ``True`` in the ensemble (don't forget to turn it off when done).\n\n```Python\n\npreprocessing_dict = {'pipeline-1': list_of_transformers_1,\n                      'pipeline-2': list_of_transformers_2}\n\n\nevaluator = Evaluator(scorer=score_func)\nevaluator.fit(X, y, list_of_estimators, param_dists_dict, preprocessing_dict)\n```\n\nAll ensembles and model selection instances provides summary statistics in\ntabular format. You can find fit and prediction times in any ensemble by calling\n``data``, and cv-scores if you passed a scorer. For the model selection suite,\nthe ``results`` attribute gives you the outcome of an evaluation::\n\n```Python\n              fit_time_mean  fit_time_std  train_score_mean  train_score_std  test_score_mean  test_score_std               params\nprep-1 est-1       0.001353      0.001316          0.957037         0.005543         0.960000        0.032660                   {}\n       est-2       0.000447      0.000012          0.980000         0.004743         0.966667        0.033333  {'n_neighbors': 15}\nprep-2 est-1       0.001000      0.000603          0.957037         0.005543         0.960000        0.032660                   {}\n       est-2       0.000448      0.000036          0.965185         0.003395         0.960000        0.044222   {'n_neighbors': 8}\nprep-3 est-1       0.000735      0.000248          0.791111         0.019821         0.780000        0.133500                   {}\n       est-2       0.000462      0.000143          0.837037         0.014815         0.800000        0.126491   {'n_neighbors': 9}\n```\n\n## Install\n\n#### PyPI\n\nML-Ensemble is available on PyPI. Install with\n\n```bash\npip install mlens\n```\n\n#### Bleeding edge\n\nFork the GitHub repository:\n\n```bash\ngit clone https://github.com/flennerhag/mlens.git; cd mlens;\npython setup.py install\n```\n\n## Citation\n\nFor scientific publication, ML-Ensemble can be cited as \n\n```\n@misc{flennerhag:2017mlens,\n  author = {Flennerhag, Sebastian},\n  title  = {ML-Ensemble},\n  month  = nov,\n  year   = 2017,\n  doi    = {10.5281/zenodo.1042144},\n  url    = {https://dx.doi.org/10.5281/zenodo.1042144}\n}\n```\n\n## Questions\n\nPlease see [issue tracker](https://github.com/flennerhag/mlens/issues).\n\n\n## Contribute\n\nML-Ensemble is an open-source project that welcome any contribution, small as large.\nBug fixes and minor improvements can be pulled as is; larger PRs need to be unit tested. \nWe generally follow the [PEP-8](https://www.python.org/dev/peps/pep-0008/) style guide.\n\n## License\n\nMIT License\n\nCopyright (c) 2017–2020 Sebastian Flennerhag\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","funding_links":[],"categories":["Python","Table of Contents","Uncategorized"],"sub_categories":["General-Purpose Machine Learning","Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflennerhag%2Fmlens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflennerhag%2Fmlens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflennerhag%2Fmlens/lists"}