{"id":13427001,"url":"https://github.com/koaning/human-learn","last_synced_at":"2025-04-08T13:06:57.438Z","repository":{"id":46567950,"uuid":"278844314","full_name":"koaning/human-learn","owner":"koaning","description":"Natural Intelligence is still a pretty good idea.","archived":false,"fork":false,"pushed_at":"2024-07-15T09:55:16.000Z","size":14317,"stargazers_count":805,"open_issues_count":6,"forks_count":55,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-01T10:17:36.859Z","etag":null,"topics":["benchmark","machine-learning","scikit-learn"],"latest_commit_sha":null,"homepage":"https://koaning.github.io/human-learn/","language":"Jupyter Notebook","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/koaning.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-11T11:03:11.000Z","updated_at":"2025-03-24T15:37:26.000Z","dependencies_parsed_at":"2024-01-14T19:15:54.458Z","dependency_job_id":"a6a1d96f-34b4-4981-ba9d-6ccaf859cf40","html_url":"https://github.com/koaning/human-learn","commit_stats":{"total_commits":96,"total_committers":6,"mean_commits":16.0,"dds":0.05208333333333337,"last_synced_commit":"ab961c200829a3270084fb1345eeea60623fa89d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koaning%2Fhuman-learn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koaning%2Fhuman-learn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koaning%2Fhuman-learn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koaning%2Fhuman-learn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koaning","download_url":"https://codeload.github.com/koaning/human-learn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247847610,"owners_count":21006100,"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":["benchmark","machine-learning","scikit-learn"],"created_at":"2024-07-31T00:01:50.606Z","updated_at":"2025-04-08T13:06:57.415Z","avatar_url":"https://github.com/koaning.png","language":"Jupyter Notebook","funding_links":[],"categories":["Jupyter Notebook","Tools"],"sub_categories":["Interpretability/Explicability"],"readme":"[![Downloads](https://pepy.tech/badge/human-learn/month)](https://pepy.tech/project/human-learn)\n[![Version](https://img.shields.io/pypi/v/human-learn)](https://pypi.org/project/scikit-lego/)\n![](https://img.shields.io/github/license/koaning/human-learn)\n![](https://img.shields.io/pypi/pyversions/human-learn)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![DOI](https://zenodo.org/badge/278844314.svg)](https://zenodo.org/badge/latestdoi/278844314)\n\n\u003cimg src=\"docs/logo.png\" width=150 align=\"right\"\u003e\n\n### Human Learn\n\n\u003e Machine Learning models should play by the rules, literally.\n\n## Project Goal\n\nBack in the old days, it was common to write rule-based systems. Systems that do;\n\n![](docs/examples/rules.png)\n\nNowadays, it's much more fashionable to use machine learning instead. Something like;\n\n![](docs/examples/ml.png)\n\nWe started wondering if we might have lost something in this transition. Sure,\nmachine learning covers a lot of ground but it is also capable of making bad\ndecisions. We need to remain careful about hype. We also shouldn't forget that \nmany classification problems can be handled by natural intelligence too. If nothing\nelse, it'd sure be a sensible benchmark.\n\nThis package contains scikit-learn compatible tools that should make it easier\nto construct and benchmark rule based systems that are designed by humans. You\ncan also use it in combination with ML models.\n\n## Installation\n\nYou can install this tool via `pip`.\n\n```python\npython -m pip install human-learn\n```\n\nThe project builds on top of a modern installation of [scikit-learn](https://scikit-learn.org/stable/index.html)\nand [pandas](https://pandas.pydata.org/). It also\nuses [bokeh](https://bokeh.org/) for interactive jupyter elements, [shapely](https://pypi.org/project/Shapely/) \nfor the point-in-poly algorithms and [clumper](https://koaning.github.io/clumper/)\nto deal with json datastructures. \n\n## Documentation\n\nDetailed documentation of this tool can be found [here](https://koaning.github.io/human-learn/).\n\nA free video course can be found on [calmcode.io](https://calmcode.io/human-learn/introduction.html).\n\n## Features\n\nThis library hosts a couple of models that you can play with.\n\n\n### Interactive Drawings\n\nThis tool allows you to draw over your datasets. These drawings can later\nbe converted to models or to preprocessing tools.\n\n![](docs/draw-gif.gif)\n\n### Classification Models\n\n#### FunctionClassifier\n\nThis allows you to define a function that can make classification predictions. It's\nconstructed in such a way that you can use the arguments of the function as a parameter\nthat you can benchmark in a grid-search.\n\n#### InteractiveClassifier\n\nThis allows you to draw decision boundaries in interactive charts to create a\nmodel. You can create charts interactively in the notebook and export it as a\nscikit-learn compatible model.\n\n### Regression Models\n\n#### FunctionRegressor\n\nThis allows you to define a function that can make regression predictions. It's\nconstructed in such a way that you can use the arguments of the function as a parameter\nthat you can benchmark in a grid-search.\n\n### Outlier Detection Models\n\n#### FunctionOutlierDetector\n\nThis allows you to define a function that can declare outliers. It's constructed in\nsuch a way that you can use the arguments of the function as a parameter that you\ncan benchmark in a grid-search.\n\n#### InteractiveOutlierDetector\n\nThis allows you to draw decision boundaries in interactive charts to create a\nmodel. If a point falls outside of these boundaries we might be able to declare\nit an outlier. There's a threshold parameter for how strict you might want to be.\n\n### Preprocessing Models\n\n#### PipeTransformer\n\nThis allows you to define a function that can handle preprocessing. It's\nconstructed in such a way that you can use the arguments of the function as a parameter\nthat you can benchmark in a grid-search. This is especially powerful in combination\nwith the pandas `.pipe` method. If you're unfamiliar with this amazing feature, you\nmay appreciate [this tutorial](https://calmcode.io/pandas-pipe/introduction.html).\n\n#### InteractivePreprocessor\n\nThis allows you to draw features that you'd like to add to your dataset or\nyour machine learning pipeline. You can use it via `tfm.fit(df).transform(df)` and\n`df.pipe(tfm)`.\n\n### Datasets\n\n#### Titanic\n\nThis library hosts the popular titanic survivor dataset for demo purposes. The goal of\nthis dataset is to predict who might have survived the titanic disaster.\n\n#### Fish\n\nThe fish market dataset is also hosted in this library. The goal of this dataset\nis to predict the weight of fish. However, it can also be turned into a classification problem\nby predicting the species.\n\n## Contribution\n\nWe're open to ideas for the repository but please discuss any feature you'd like to add \nbefore working on a PR. This way folks will know somebody is working on a feature and the\nimplementation can be discussed with the maintainer upfront. \n\nIf you want to quickly get started locally you can run the following command to set the \nlocal development environment up. \n\n```\nmake develop\n```\n\nIf you want to run all the tests/checks locally you can run.\n\n```\nmake check\n```\n\nThis will run flake8, black, pytest and test the documentation pages. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoaning%2Fhuman-learn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoaning%2Fhuman-learn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoaning%2Fhuman-learn/lists"}