![Python versions](https://img.shields.io/badge/python_3.9+-blue) ![](https://img.shields.io/github/v/release/ozguraslank/flexml)
# FlexML
<div align="center">
<img src="img/flexml_banner.jpeg" alt="drawing" width="500"/>
</div>
## Introduction
FlexML is an easy-to-use and flexible AutoML library for Python that simplifies the process of building machine learning models. It automates model selection and hyperparameter tuning, offering users the flexibility to customize the size of their experiments by allowing to train all available models in the library or only a subset of them for faster results, FlexML adapts to your needs! <br> <br>
At the moment, FlexML supports only regression and classification tasks and offers two experiment modes; 'quick' and 'wide' allowing users to choose between fitting a few of machine learning models or the full range of models available in the library. This flexibility extends to hyperparameter tuning as well, enabling a balance between speed and thoroughness.
## How to Install
To install FlexML, you can use pip:
```bash
pip install flexml
```
## Start Guide with Regression Experiment
```python
# Experiment for a Regression problem for California House Value Prediction dataset
from flexml import Regression
from sklearn.datasets import fetch_california_housing
# Load the California House Value Prediction dataset as a Pandas dataframe
df = fetch_california_housing(as_frame=True)['frame']
# Setup a regression experiment with 'quick' experiment_size for faster results by using less ml models, "wide" for all
# (check flexml/config/ml_models.py to check out to all ml models available in the library)
reg_exp = Regression(df, target_col="MedHouseVal", experiment_size="quick")
# Start the experiment with r2 evaluation metric (default)
reg_exp.start_experiment(eval_metric="r2")
```
--> Once **start_experiment()** process finishes, you will see the model leaderboard as below: <br>
<div align="left">
<img src="img/start_guide_reg_output.jpg" alt="drawing" width="400"/>
</div>
```python
# Get the best model, you can pass 'eval_metric' param as well
best_model = reg_exp.get_best_models()
# Get the best model by name (Alternative)
_temp_ = reg_exp.get_model_by_name("LGBMRegressor")
print(best_model) # >>> <catboost.core.CatBoostRegressor object>
# Tune the best model with Randomized Search or pass a model object as param to the beginning
reg_exp.tune_model(tuning_method="randomized_search", tuning_size="quick", eval_metric="r2", n_iter=4)
```
--> Once **tune_model()** process finishes, you will see the updated model leaderboard as below: <br>
<div align="left">
<img src="img/start_guide_reg_tuning_output.jpg" alt="drawing" width="500"/>
</div>
```python
# Get the latest tuned model
tuned_model = reg_exp.tuned_model
# Alternatively, get it via get_model_by_name()
_temp_ = reg_exp.get_model_by_name("CatBoostRegressor_(randomized_search(quick))_(cv=3)_(n_iter=4)")
print(tuned_model) # >>> <catboost.core.CatBoostRegressor object>
```
<br>
You can also take a look to jupyter notebook files in the 'notebooks' folder in the repository for more detailed explanations of the usage
## How to Contribute:
1. **Fork the repository:** Click on the 'Fork' button at the top right corner of the GitHub repository page
2. **Create a new branch:** Name your branch descriptively based on the feature or fix you're working on
3. **Make your changes:** Write code and tests to add your feature or fix the issue.
- You can take a look to **tests** folder in the repository to reach the current unittests
4. **Run tests:** Ensure all existing and new tests pass.
5. **Submit a pull request:** Open a pull request with a clear description of your changes.
## Roadmap
- [x] Regression
- [x] Classification
- [x] Model Tuning
- [ ] Automatic Data Labelling & Feature Engineering
- [ ] Time Series
Raw data
{
"_id": null,
"home_page": "https://github.com/ozguraslank/flexml",
"name": "flexml",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "AutoML, Machine Learning, Data Science, Flexibility",
"author": "Ozgur Aslan",
"author_email": "ozguraslank@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/fa/7b/74fedfbf49cc3bc5057cb7979e74530af06872bde63a31f63ee7f1a332e0/flexml-1.0.3.tar.gz",
"platform": null,
"description": "![Python versions](https://img.shields.io/badge/python_3.9+-blue) ![](https://img.shields.io/github/v/release/ozguraslank/flexml)\n# FlexML\n\n<div align=\"center\">\n<img src=\"img/flexml_banner.jpeg\" alt=\"drawing\" width=\"500\"/>\n</div>\n\n## Introduction\nFlexML is an easy-to-use and flexible AutoML library for Python that simplifies the process of building machine learning models. It automates model selection and hyperparameter tuning, offering users the flexibility to customize the size of their experiments by allowing to train all available models in the library or only a subset of them for faster results, FlexML adapts to your needs! <br> <br>\n\nAt the moment, FlexML supports only regression and classification tasks and offers two experiment modes; 'quick' and 'wide' allowing users to choose between fitting a few of machine learning models or the full range of models available in the library. This flexibility extends to hyperparameter tuning as well, enabling a balance between speed and thoroughness.\n\n## How to Install\nTo install FlexML, you can use pip:\n\n```bash\npip install flexml\n```\n\n## Start Guide with Regression Experiment\n\n```python\n# Experiment for a Regression problem for California House Value Prediction dataset\nfrom flexml import Regression\nfrom sklearn.datasets import fetch_california_housing\n\n# Load the California House Value Prediction dataset as a Pandas dataframe\ndf = fetch_california_housing(as_frame=True)['frame']\n\n# Setup a regression experiment with 'quick' experiment_size for faster results by using less ml models, \"wide\" for all\n# (check flexml/config/ml_models.py to check out to all ml models available in the library)\nreg_exp = Regression(df, target_col=\"MedHouseVal\", experiment_size=\"quick\")\n\n# Start the experiment with r2 evaluation metric (default)\nreg_exp.start_experiment(eval_metric=\"r2\")\n```\n--> Once **start_experiment()** process finishes, you will see the model leaderboard as below: <br>\n<div align=\"left\">\n<img src=\"img/start_guide_reg_output.jpg\" alt=\"drawing\" width=\"400\"/>\n</div>\n\n```python\n#\u00a0Get the best model, you can pass 'eval_metric' param as well\nbest_model = reg_exp.get_best_models()\n\n# Get the best model by name (Alternative)\n_temp_ = reg_exp.get_model_by_name(\"LGBMRegressor\")\n\nprint(best_model) # >>> <catboost.core.CatBoostRegressor object>\n\n# Tune the best model with Randomized Search or pass a model object as param to the beginning\nreg_exp.tune_model(tuning_method=\"randomized_search\", tuning_size=\"quick\", eval_metric=\"r2\", n_iter=4)\n```\n\n--> Once **tune_model()** process finishes, you will see the updated model leaderboard as below: <br>\n<div align=\"left\">\n<img src=\"img/start_guide_reg_tuning_output.jpg\" alt=\"drawing\" width=\"500\"/>\n</div>\n\n```python\n#\u00a0Get the latest tuned model\ntuned_model = reg_exp.tuned_model\n\n# Alternatively, get it via get_model_by_name()\n_temp_ = reg_exp.get_model_by_name(\"CatBoostRegressor_(randomized_search(quick))_(cv=3)_(n_iter=4)\")\n\nprint(tuned_model) #\u00a0>>> <catboost.core.CatBoostRegressor object>\n```\n<br>\nYou can also take a look to jupyter notebook files in the 'notebooks' folder in the repository for more detailed explanations of the usage\n\n## How to Contribute:\n\n1. **Fork the repository:** Click on the 'Fork' button at the top right corner of the GitHub repository page\n2. **Create a new branch:** Name your branch descriptively based on the feature or fix you're working on\n3. **Make your changes:** Write code and tests to add your feature or fix the issue.\n - You can take a look to **tests** folder in the repository to reach the current unittests\n4. **Run tests:** Ensure all existing and new tests pass.\n5. **Submit a pull request:** Open a pull request with a clear description of your changes.\n\n## Roadmap\n- [x] Regression\n- [x] Classification\n- [x] Model Tuning\n- [ ] Automatic Data Labelling & Feature Engineering\n- [ ] Time Series \n",
"bugtrack_url": null,
"license": "Apache 2.0",
"summary": "Easy-to-use and flexible AutoML library for Python",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/ozguraslank/flexml"
},
"split_keywords": [
"automl",
" machine learning",
" data science",
" flexibility"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "85b1ad4e58fc191fc2ee1fa2ee5391d2b5ea3369adabf52c74741fbded474df2",
"md5": "b2239b017d2a64ee4ec8b77f8aa989fe",
"sha256": "207bd25136c3edf819393dfbad666c83a5cf90cbbd5c65cf1117ee97b362d6ec"
},
"downloads": -1,
"filename": "flexml-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b2239b017d2a64ee4ec8b77f8aa989fe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 28188,
"upload_time": "2024-09-01T19:29:47",
"upload_time_iso_8601": "2024-09-01T19:29:47.960797Z",
"url": "https://files.pythonhosted.org/packages/85/b1/ad4e58fc191fc2ee1fa2ee5391d2b5ea3369adabf52c74741fbded474df2/flexml-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fa7b74fedfbf49cc3bc5057cb7979e74530af06872bde63a31f63ee7f1a332e0",
"md5": "468c6061e7577558e29b2c4313c21b59",
"sha256": "6b66f6e1542eb56e9beb42538d38480b336f38344323e0c11ac80fb402e3e1a7"
},
"downloads": -1,
"filename": "flexml-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "468c6061e7577558e29b2c4313c21b59",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 24029,
"upload_time": "2024-09-01T19:29:49",
"upload_time_iso_8601": "2024-09-01T19:29:49.797970Z",
"url": "https://files.pythonhosted.org/packages/fa/7b/74fedfbf49cc3bc5057cb7979e74530af06872bde63a31f63ee7f1a332e0/flexml-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-01 19:29:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ozguraslank",
"github_project": "flexml",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "flexml"
}