Add setup.py

remove boostrap boolean parameter
This commit is contained in:
Ricardo Montañana Gómez 2020-06-16 13:59:17 +02:00
parent 278a5ff28a
commit 580c93d92a
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE
3 changed files with 88 additions and 59 deletions

File diff suppressed because one or more lines are too long

View File

@ -32,7 +32,6 @@ class Odte(BaseEstimator, ClassifierMixin):
max_iter: int = 1000,
max_depth: int = None,
min_samples_split: int = 0,
bootstrap: bool = True,
split_criteria: str = "min_distance",
criterion: str = "gini",
tol: float = 1e-4,
@ -44,10 +43,9 @@ class Odte(BaseEstimator, ClassifierMixin):
splitter: str = "random",
):
self.n_estimators = n_estimators
self.bootstrap = bootstrap
self.random_state = random_state
self.max_features = max_features
self.max_samples = max_samples
self.max_samples = max_samples # size of bootstrap
self.estimator_params = dict(
C=C,
random_state=random_state,
@ -70,8 +68,9 @@ class Odte(BaseEstimator, ClassifierMixin):
else:
return np.random.RandomState(self.random_state)
@staticmethod
def _initialize_sample_weight(
self, sample_weight: np.array, n_samples: int
sample_weight: np.array, n_samples: int
) -> np.array:
if sample_weight is None:
return np.ones((n_samples,), dtype=np.float64)

36
setup.py Normal file
View 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,
)