{"id":20647434,"url":"https://github.com/lacava/few","last_synced_at":"2025-04-16T02:42:15.995Z","repository":{"id":57429143,"uuid":"65411376","full_name":"lacava/few","owner":"lacava","description":"a feature engineering wrapper for sklearn","archived":false,"fork":false,"pushed_at":"2020-06-11T13:39:13.000Z","size":607,"stargazers_count":51,"open_issues_count":9,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-29T04:24:14.354Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lacava.github.io/few","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lacava.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}},"created_at":"2016-08-10T19:42:44.000Z","updated_at":"2024-09-24T21:36:46.000Z","dependencies_parsed_at":"2022-09-08T23:40:47.981Z","dependency_job_id":null,"html_url":"https://github.com/lacava/few","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacava%2Ffew","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacava%2Ffew/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacava%2Ffew/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lacava%2Ffew/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lacava","download_url":"https://codeload.github.com/lacava/few/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248706608,"owners_count":21148744,"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":[],"created_at":"2024-11-16T16:30:38.881Z","updated_at":"2025-04-16T02:42:15.967Z","avatar_url":"https://github.com/lacava.png","language":"Python","readme":"[![Build Status](https://travis-ci.org/lacava/few.svg?branch=master)](https://travis-ci.org/lacava/few)\n[![Code Health](https://landscape.io/github/lacava/few/master/landscape.svg?style=flat)](https://landscape.io/github/lacava/few/master)\n[![Coverage Status](https://coveralls.io/repos/github/lacava/few/badge.svg?branch=master)](https://coveralls.io/github/lacava/few?branch=master)\n[![DOI](https://zenodo.org/badge/65411376.svg)](https://zenodo.org/badge/latestdoi/65411376)\n\n# Few\n\n**Few** is a **Feature Engineering Wrapper** for scikit-learn. Few looks for a set of feature transformations that work best with a specified machine learning algorithm in order to improve model estimation and prediction. In doing so, Few is able to provide the user with a set of concise, engineered features that describe their data.\n\nFew uses genetic programming to generate, search and update engineered features. It incorporates feedback from the ML process to select important features, while also scoring them internally. \n\n\n## Install\n\nYou can use pip to install FEW from [PyPi](https://pypi.python.org/pypi/FEW) as: \n\n```pip install few```\n\nor you can clone the git repo and add it to your Python path. Then from the repo, run\n\n```python setup.py install``` \n\n### Mac users \n\nSome Mac users have reported issues when installing with old versions of gcc (like gcc-4.2) because the random.h library is not included (basically [this issue](https://stackoverflow.com/questions/5967065/python-distutils-not-using-correct-version-of-gcc)). I recommend installing gcc-4.8 or greater for use with Few. After updating the compiler, you can reinstall with \n\n```python\nCC=gcc-4.8 python setupy.py install\n```\n\n## Usage\n\nFew uses the same nomenclature as [sklearn](http://scikit-learn.org/) supervised learning modules. Here is a simple example script:\n\n```python\n# import few\nfrom few import FEW\n# initialize\nlearner = FEW(generations=100, population_size=25, ml = LassoLarsCV())\n# fit model\nlearner.fit(X,y)\n# generate prediction\ny_pred = learner.predict(X_unseen)\n# get feature transformation\nPhi = learner.transform(X_unseen)\n```\n\nYou can also call Few from the terminal as\n\n```bash\npython -m few.few data_file_name \n```\n\ntry ```python -m few.few --help``` to see options.\n\n## Examples\n\nCheck out [few_example.py](http://github.com/lacava/few/tree/master/docs/few_example.py) to see how to apply FEW to a regression dataset. \n\n## Publications\n\nIf you use Few, please reference our publications:\n\nLa Cava, W., and Moore, J.H. A general feature engineering wrapper for machine learning using epsilon-lexicase survival. *Proceedings of the 20th European Conference on Genetic Programming (EuroGP 2017)*, Amsterdam, Netherlands.\n[preprint](http://williamlacava.com/pubs/evostar_few_lacava.pdf)\n\nLa Cava, W., and Moore, J.H. Ensemble representation learning: an analysis of fitness and survival for wrapper-based genetic programming methods. *GECCO '17: Proceedings of the 2017 Genetic and Evolutionary Computation Conference*. Berlin, Germany. [arxiv](https://arxiv.org/abs/1703.06934)\n\n## Acknowledgments\n\nThis method is being developed to study the genetic causes of human disease in the [Epistasis Lab at UPenn](http://epistasis.org). Work is partially supported by the [Warren Center for Network and Data Science](http://warrencenter.upenn.edu). Thanks to Randy Olson and [TPOT](http://github.com/rhiever/tpot) for Python guidance. \n\n","funding_links":[],"categories":["Feature Engineering"],"sub_categories":["General"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacava%2Ffew","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flacava%2Ffew","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flacava%2Ffew/lists"}