Skip to content

Commit

Permalink
Prepare to release new version 0.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
thieu1995 committed Aug 7, 2023
1 parent 28f3312 commit b0171ba
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 16 deletions.
10 changes: 10 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# Version 0.1.9

+ Add more Regression and Classification objectives for fitness function
+ Add more Regression and Classification metrics for evaluate() function
+ Update logo and documents
+ Add more examples

---------------------------------------------------------------------

# Version 0.1.8

+ Fix bug load data from library.


---------------------------------------------------------------------

# Version 0.1.7
Expand Down
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ alt="MAFESE"/>

---

[![GitHub release](https://img.shields.io/badge/release-0.1.8-yellow.svg)](https://github.com/thieu1995/mafese/releases)
[![GitHub release](https://img.shields.io/badge/release-0.1.9-yellow.svg)](https://github.com/thieu1995/mafese/releases)
[![Wheel](https://img.shields.io/pypi/wheel/gensim.svg)](https://pypi.python.org/pypi/mafese)
[![PyPI version](https://badge.fury.io/py/mafese.svg)](https://badge.fury.io/py/mafese)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mafese.svg)
Expand All @@ -29,38 +29,38 @@ MAFESE (Metaheuristic Algorithms for FEature SElection) is the biggest python li
problem using meta-heuristic algorithms.

* **Free software:** GNU General Public License (GPL) V3 license
* **Total Wrapper-based (Metaheuristic Algorithms)**: > 180 methods
* **Total Wrapper-based (Metaheuristic Algorithms)**: > 200 methods
* **Total Filter-based (Statistical-based)**: > 15 methods
* **Total Embedded-based (Tree and Lasso)**: > 10 methods
* **Total Unsupervised-based**: >= 4 methods
* **Total classification dataset**: >= 30 datasets
* **Total regression dataset**: >= 7 datasets
* **Total performance metrics (as fitness)**: > 30 metrics
* **Total datasets**: >= 30 (47 classifications and 7 regressions)
* **Total performance metrics**: >= 61 (45 regressions and 16 classifications)
* **Total objective functions (as fitness functions)**: >= 61 (45 regressions and 16 classifications)
* **Documentation:** https://mafese.readthedocs.io/en/latest/
* **Python versions:** 3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x
* **Python versions:** >= 3.7.x
* **Dependencies:** numpy, scipy, scikit-learn, pandas, mealpy, permetrics, plotly, kaleido


# Installation

#### Install the [current PyPI release](https://pypi.python.org/pypi/mafese):
* Install the [current PyPI release](https://pypi.python.org/pypi/mafese):
```sh
$ pip install mafese==0.1.8
$ pip install mafese==0.1.9
```

#### Install directly from source code
* Install directly from source code
```sh
$ git clone https://github.com/thieu1995/mafese.git
$ cd mafese
$ python setup.py install
```

#### In case, you want to install the development version from Github:
* In case, you want to install the development version from Github:
```sh
$ pip install git+https://github.com/thieu1995/mafese
```

#### After installation, you can import MAFESE as any other Python module:
After installation, you can import MAFESE as any other Python module:

```sh
$ python
Expand Down Expand Up @@ -235,9 +235,15 @@ feat_selector.evaluate(estimator=None, data=data, metrics=["AS", "PS", "RS"])
```

1) Where do I find the supported metrics like above ["AS", "PS", "RS"]. What is that?
You can find it here: https://github.com/thieu1995/permetrics
You can find it here: https://github.com/thieu1995/permetrics or use this
```python
from mafese import MhaSelector

print(MhaSelector.SUPPORTED_REGRESSION_METRICS)
print(MhaSelector.SUPPORTED_CLASSIFICATION_METRICS)
```

2) How do I know my Selector support which estimator? which methods?
3) How do I know my Selector support which estimator? which methods?
```python
print(feat_selector.SUPPORT)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ MAFESE (Metaheuristic Algorithms for FEature SElection) is the largest python li
using meta-heuristic algorithms.

* **Free software:** GNU General Public License (GPL) V3 license
* **Total Wrapper-based (Metaheuristic Algorithms)**: > 180 methods
* **Total Wrapper-based (Metaheuristic Algorithms)**: > 200 methods
* **Total Filter-based (Statistical-based)**: > 15 methods
* **Total Embedded-based (Tree and Lasso)**: > 10 methods
* **Total Unsupervised-based**: >= 4 methods
Expand Down
16 changes: 16 additions & 0 deletions examples/wrapper/exam_mha_general.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python
# Created by "Thieu" at 17:29, 07/08/2023 ----------%
# Email: nguyenthieu2102@gmail.com %
# Github: https://github.com/thieu1995 %
# --------------------------------------------------%

from mafese import MhaSelector

print(MhaSelector.SUPPORT["regression_objective"])
print(len(MhaSelector.SUPPORT["regression_objective"]))

print(MhaSelector.SUPPORT["classification_objective"])
print(len(MhaSelector.SUPPORT["classification_objective"]))

print(MhaSelector.SUPPORTED_CLASSIFICATION_METRICS)
print(MhaSelector.SUPPORTED_REGRESSION_METRICS)
2 changes: 1 addition & 1 deletion mafese/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Github: https://github.com/thieu1995 %
# --------------------------------------------------%

__version__ = "0.1.8"
__version__ = "0.1.9"

from mafese.utils.data_loader import Data, get_dataset
from mafese.filter import FilterSelector
Expand Down
4 changes: 3 additions & 1 deletion mafese/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from abc import ABC
from mafese.utils import validator
from mafese.utils.estimator import get_general_estimator
from mafese.utils.evaluator import get_metrics
from mafese.utils.evaluator import get_metrics, get_all_classification_metrics, get_all_regression_metrics
from mafese.utils.data_loader import Data


Expand All @@ -18,6 +18,8 @@ class Selector(ABC):
name = "Feature Selector"
SUPPORTED_PROBLEMS = ["classification", "regression"]
SUPPORTED_ESTIMATORS = ["knn", "svm", "rf", "adaboost", "xgb", "tree", "ann"]
SUPPORTED_REGRESSION_METRICS = list(get_all_regression_metrics().keys())
SUPPORTED_CLASSIFICATION_METRICS = list(get_all_classification_metrics().keys())

def __init__(self, problem="classification"):
self.problem = self._set_problem(problem)
Expand Down

0 comments on commit b0171ba

Please sign in to comment.