mirror of
https://github.com/Doctorado-ML/STree.git
synced 2025-08-17 16:36:01 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3aaddd096f | ||
|
15a5a4c407 | ||
|
0afe14a447 |
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@@ -26,7 +26,6 @@ jobs:
|
||||
pip install -q --upgrade pip
|
||||
pip install -q -r requirements.txt
|
||||
pip install -q --upgrade codecov coverage black flake8 codacy-coverage
|
||||
pip install -q git+https://github.com/doctorado-ml/mfs
|
||||
- name: Lint
|
||||
run: |
|
||||
black --check --diff stree
|
||||
|
1
Makefile
1
Makefile
@@ -26,6 +26,7 @@ doc: ## Update documentation
|
||||
|
||||
build: ## Build package
|
||||
rm -fr dist/*
|
||||
rm -fr build/*
|
||||
python setup.py sdist bdist_wheel
|
||||
|
||||
doc-clean: ## Update documentation
|
||||
|
@@ -2,6 +2,9 @@
|
||||
[](https://codecov.io/gh/doctorado-ml/stree)
|
||||
[](https://www.codacy.com/gh/Doctorado-ML/STree?utm_source=github.com&utm_medium=referral&utm_content=Doctorado-ML/STree&utm_campaign=Badge_Grade)
|
||||
[](https://lgtm.com/projects/g/Doctorado-ML/STree/context:python)
|
||||
[](https://badge.fury.io/py/STree)
|
||||

|
||||
|
||||
|
||||
# STree
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
sphinx
|
||||
sphinx-rtd-theme
|
||||
myst-parser
|
||||
git+https://github.com/doctorado-ml/stree
|
||||
mufs
|
@@ -1,2 +1,2 @@
|
||||
scikit-learn>0.24
|
||||
mfs
|
||||
mufs
|
2
setup.py
2
setup.py
@@ -44,7 +44,7 @@ setuptools.setup(
|
||||
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
||||
"Intended Audience :: Science/Research",
|
||||
],
|
||||
install_requires=["scikit-learn", "numpy", "mfs"],
|
||||
install_requires=["scikit-learn", "mufs"],
|
||||
test_suite="stree.tests",
|
||||
zip_safe=False,
|
||||
)
|
||||
|
@@ -12,7 +12,7 @@ from sklearn.feature_selection import SelectKBest, mutual_info_classif
|
||||
from sklearn.preprocessing import StandardScaler
|
||||
from sklearn.svm import SVC
|
||||
from sklearn.exceptions import ConvergenceWarning
|
||||
from mfs import MFS
|
||||
from mufs import MUFS
|
||||
|
||||
|
||||
class Snode:
|
||||
@@ -312,8 +312,8 @@ class Splitter:
|
||||
tuple
|
||||
indices of the features selected
|
||||
"""
|
||||
mfs = MFS(max_features=max_features, discrete=False)
|
||||
return mfs.cfs(dataset, labels).get_results()
|
||||
mufs = MUFS(max_features=max_features, discrete=False)
|
||||
return mufs.cfs(dataset, labels).get_results()
|
||||
|
||||
@staticmethod
|
||||
def _fs_fcbf(
|
||||
@@ -336,8 +336,8 @@ class Splitter:
|
||||
tuple
|
||||
indices of the features selected
|
||||
"""
|
||||
mfs = MFS(max_features=max_features, discrete=False)
|
||||
return mfs.fcbf(dataset, labels, 5e-4).get_results()
|
||||
mufs = MUFS(max_features=max_features, discrete=False)
|
||||
return mufs.fcbf(dataset, labels, 5e-4).get_results()
|
||||
|
||||
def partition_impurity(self, y: np.array) -> np.array:
|
||||
return self.criterion_function(y)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
from .Strees import Stree, Siterator
|
||||
|
||||
__version__ = "1.2"
|
||||
__version__ = "1.2.1"
|
||||
|
||||
__author__ = "Ricardo Montañana Gómez"
|
||||
__copyright__ = "Copyright 2020-2021, Ricardo Montañana Gómez"
|
||||
|
Reference in New Issue
Block a user