Mfstomufs #43 (#44)

* Implement module mfs changed name to mufs

* Update github CI file
This commit is contained in:
Ricardo Montañana Gómez
2021-08-02 18:03:59 +02:00
committed by GitHub
parent fc9b7b5c92
commit 0afe14a447
7 changed files with 10 additions and 10 deletions

View File

@@ -26,7 +26,6 @@ jobs:
pip install -q --upgrade pip pip install -q --upgrade pip
pip install -q -r requirements.txt pip install -q -r requirements.txt
pip install -q --upgrade codecov coverage black flake8 codacy-coverage pip install -q --upgrade codecov coverage black flake8 codacy-coverage
pip install -q git+https://github.com/doctorado-ml/mfs
- name: Lint - name: Lint
run: | run: |
black --check --diff stree black --check --diff stree

View File

@@ -26,6 +26,7 @@ doc: ## Update documentation
build: ## Build package build: ## Build package
rm -fr dist/* rm -fr dist/*
rm -fr build/*
python setup.py sdist bdist_wheel python setup.py sdist bdist_wheel
doc-clean: ## Update documentation doc-clean: ## Update documentation

View File

@@ -1,4 +1,4 @@
sphinx sphinx
sphinx-rtd-theme sphinx-rtd-theme
myst-parser myst-parser
git+https://github.com/doctorado-ml/stree mufs

View File

@@ -1,2 +1,2 @@
scikit-learn>0.24 scikit-learn>0.24
mfs mufs

View File

@@ -44,7 +44,7 @@ setuptools.setup(
"Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Artificial Intelligence",
"Intended Audience :: Science/Research", "Intended Audience :: Science/Research",
], ],
install_requires=["scikit-learn", "numpy", "mfs"], install_requires=["scikit-learn", "mufs"],
test_suite="stree.tests", test_suite="stree.tests",
zip_safe=False, zip_safe=False,
) )

View File

@@ -12,7 +12,7 @@ from sklearn.feature_selection import SelectKBest, mutual_info_classif
from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import StandardScaler
from sklearn.svm import SVC from sklearn.svm import SVC
from sklearn.exceptions import ConvergenceWarning from sklearn.exceptions import ConvergenceWarning
from mfs import MFS from mufs import MUFS
class Snode: class Snode:
@@ -312,8 +312,8 @@ class Splitter:
tuple tuple
indices of the features selected indices of the features selected
""" """
mfs = MFS(max_features=max_features, discrete=False) mufs = MUFS(max_features=max_features, discrete=False)
return mfs.cfs(dataset, labels).get_results() return mufs.cfs(dataset, labels).get_results()
@staticmethod @staticmethod
def _fs_fcbf( def _fs_fcbf(
@@ -336,8 +336,8 @@ class Splitter:
tuple tuple
indices of the features selected indices of the features selected
""" """
mfs = MFS(max_features=max_features, discrete=False) mufs = MUFS(max_features=max_features, discrete=False)
return mfs.fcbf(dataset, labels, 5e-4).get_results() return mufs.fcbf(dataset, labels, 5e-4).get_results()
def partition_impurity(self, y: np.array) -> np.array: def partition_impurity(self, y: np.array) -> np.array:
return self.criterion_function(y) return self.criterion_function(y)

View File

@@ -1,6 +1,6 @@
from .Strees import Stree, Siterator from .Strees import Stree, Siterator
__version__ = "1.2" __version__ = "1.2.1"
__author__ = "Ricardo Montañana Gómez" __author__ = "Ricardo Montañana Gómez"
__copyright__ = "Copyright 2020-2021, Ricardo Montañana Gómez" __copyright__ = "Copyright 2020-2021, Ricardo Montañana Gómez"