Compare commits

...

3 Commits
1.2 ... v1.2.1

Author SHA1 Message Date
Ricardo Montañana Gómez
3aaddd096f Add package version badge in README 2021-08-17 12:00:36 +02:00
Ricardo Montañana Gómez
15a5a4c407 Add python 3.8 badge to README
Add badge from shields.io
2021-08-12 11:05:07 +02:00
Ricardo Montañana Gómez
0afe14a447 Mfstomufs #43 (#44)
* Implement module mfs changed name to mufs

* Update github CI file
2021-08-02 18:03:59 +02:00
8 changed files with 13 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

@@ -2,6 +2,9 @@
[![codecov](https://codecov.io/gh/doctorado-ml/stree/branch/master/graph/badge.svg)](https://codecov.io/gh/doctorado-ml/stree) [![codecov](https://codecov.io/gh/doctorado-ml/stree/branch/master/graph/badge.svg)](https://codecov.io/gh/doctorado-ml/stree)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/35fa3dfd53a24a339344b33d9f9f2f3d)](https://www.codacy.com/gh/Doctorado-ML/STree?utm_source=github.com&utm_medium=referral&utm_content=Doctorado-ML/STree&utm_campaign=Badge_Grade) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/35fa3dfd53a24a339344b33d9f9f2f3d)](https://www.codacy.com/gh/Doctorado-ML/STree?utm_source=github.com&utm_medium=referral&utm_content=Doctorado-ML/STree&utm_campaign=Badge_Grade)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Doctorado-ML/STree.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Doctorado-ML/STree/context:python) [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Doctorado-ML/STree.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Doctorado-ML/STree/context:python)
[![PyPI version](https://badge.fury.io/py/STree.svg)](https://badge.fury.io/py/STree)
![https://img.shields.io/badge/python-3.8%2B-blue](https://img.shields.io/badge/python-3.8%2B-brightgreen)
# STree # STree

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"