mirror of
https://github.com/Doctorado-ML/STree.git
synced 2025-08-15 15:36:00 +00:00
Update readthedocs config place
Refactor __call__ method to do nothing as needed by sklearn
This commit is contained in:
@@ -4,7 +4,7 @@ sphinx:
|
||||
configuration: docs/source/conf.py
|
||||
|
||||
python:
|
||||
version: 3.8
|
||||
version: 3.11
|
||||
install:
|
||||
- requirements: requirements.txt
|
||||
- requirements: docs/requirements.txt
|
@@ -174,10 +174,10 @@ class Stree(BaseEstimator, ClassifierMixin):
|
||||
"""Return the version of the package."""
|
||||
return __version__
|
||||
|
||||
def __call__(self) -> str:
|
||||
def __call__(self) -> None:
|
||||
"""Only added to comply with scikit-learn base sestimator for ensembles
|
||||
"""
|
||||
return self.version()
|
||||
pass
|
||||
|
||||
def _more_tags(self) -> dict:
|
||||
"""Required by sklearn to supply features of the classifier
|
||||
|
@@ -1 +1 @@
|
||||
__version__ = "1.4.0"
|
||||
__version__ = "1.4.1"
|
||||
|
@@ -728,7 +728,7 @@ class Stree_test(unittest.TestCase):
|
||||
def test_call(self) -> None:
|
||||
"""Check call method."""
|
||||
clf = Stree()
|
||||
self.assertEqual(__version__, clf())
|
||||
self.assertIsNone(clf())
|
||||
|
||||
def test_graph(self):
|
||||
"""Check graphviz representation of the tree."""
|
||||
|
Reference in New Issue
Block a user