mirror of
https://github.com/Doctorado-ML/Odte.git
synced 2025-07-11 16:22:00 +00:00
Add setup.py
remove boostrap boolean parameter
This commit is contained in:
parent
278a5ff28a
commit
580c93d92a
File diff suppressed because one or more lines are too long
@ -32,7 +32,6 @@ class Odte(BaseEstimator, ClassifierMixin):
|
|||||||
max_iter: int = 1000,
|
max_iter: int = 1000,
|
||||||
max_depth: int = None,
|
max_depth: int = None,
|
||||||
min_samples_split: int = 0,
|
min_samples_split: int = 0,
|
||||||
bootstrap: bool = True,
|
|
||||||
split_criteria: str = "min_distance",
|
split_criteria: str = "min_distance",
|
||||||
criterion: str = "gini",
|
criterion: str = "gini",
|
||||||
tol: float = 1e-4,
|
tol: float = 1e-4,
|
||||||
@ -44,10 +43,9 @@ class Odte(BaseEstimator, ClassifierMixin):
|
|||||||
splitter: str = "random",
|
splitter: str = "random",
|
||||||
):
|
):
|
||||||
self.n_estimators = n_estimators
|
self.n_estimators = n_estimators
|
||||||
self.bootstrap = bootstrap
|
|
||||||
self.random_state = random_state
|
self.random_state = random_state
|
||||||
self.max_features = max_features
|
self.max_features = max_features
|
||||||
self.max_samples = max_samples
|
self.max_samples = max_samples # size of bootstrap
|
||||||
self.estimator_params = dict(
|
self.estimator_params = dict(
|
||||||
C=C,
|
C=C,
|
||||||
random_state=random_state,
|
random_state=random_state,
|
||||||
@ -70,8 +68,9 @@ class Odte(BaseEstimator, ClassifierMixin):
|
|||||||
else:
|
else:
|
||||||
return np.random.RandomState(self.random_state)
|
return np.random.RandomState(self.random_state)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
def _initialize_sample_weight(
|
def _initialize_sample_weight(
|
||||||
self, sample_weight: np.array, n_samples: int
|
sample_weight: np.array, n_samples: int
|
||||||
) -> np.array:
|
) -> np.array:
|
||||||
if sample_weight is None:
|
if sample_weight is None:
|
||||||
return np.ones((n_samples,), dtype=np.float64)
|
return np.ones((n_samples,), dtype=np.float64)
|
||||||
|
36
setup.py
Normal file
36
setup.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
__version__ = "0.1.0"
|
||||||
|
__author__ = "Ricardo Montañana Gómez"
|
||||||
|
|
||||||
|
|
||||||
|
def readme():
|
||||||
|
with open("README.md") as f:
|
||||||
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
name="Odte",
|
||||||
|
version=__version__,
|
||||||
|
license="MIT License",
|
||||||
|
description="Oblique decision tree Ensemble",
|
||||||
|
long_description=readme(),
|
||||||
|
long_description_content_type="text/markdown",
|
||||||
|
packages=setuptools.find_packages(),
|
||||||
|
url="https://github.com/doctorado-ml/stree",
|
||||||
|
author=__author__,
|
||||||
|
author_email="ricardo.montanana@alu.uclm.es",
|
||||||
|
keywords="scikit-learn oblique-classifier oblique-decision-tree decision-\
|
||||||
|
tree ensemble svm svc",
|
||||||
|
classifiers=[
|
||||||
|
"Development Status :: 4 - Beta",
|
||||||
|
"License :: OSI Approved :: MIT License",
|
||||||
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Natural Language :: English",
|
||||||
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
||||||
|
"Intended Audience :: Science/Research",
|
||||||
|
],
|
||||||
|
install_requires=["scikit-learn>=0.23.0", "numpy", "ipympl", "stree"],
|
||||||
|
test_suite="odte.tests",
|
||||||
|
zip_safe=False,
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user