You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the following bug:
```
>>> from treeple.ensemble import ObliqueRandomForestClassifier
>>> from sklearn.datasets import make_classification
>>> X,y = make_classification(n_samples=1000, n_features=4,n_informative=2,n_redundant=0,random_state=0,shuffle=False)
>>> clf = ObliqueRandomForestClassifier(max_depth=2, random_state=0)
>>> clf.fit(X,y)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/sklearn/base.py", line 1363, in wrapper
return fit_method(estimator, *args, **kwargs)
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/treeple/_lib/sklearn/ensemble/_forest.py", line 597, in fit
self._construct_trees(
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/treeple/_lib/sklearn/ensemble/_forest.py", line 663, in _construct_trees
trees = Parallel(
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/sklearn/utils/parallel.py", line 82, in __call__
return super().__call__(iterable_with_config_and_warning_filters)
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/joblib/parallel.py", line 1986, in __call__
return output if self.return_generator else list(output)
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/joblib/parallel.py", line 1914, in _get_sequential_output
res = func(*args, **kwargs)
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/sklearn/utils/parallel.py", line 147, in __call__
return self.function(*args, **kwargs)
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/treeple/_lib/sklearn/ensemble/_forest.py", line 211, in _parallel_build_trees
tree._fit(
File "/Users/pssf23/miniconda3/envs/temp/lib/python3.10/site-packages/treeple/_lib/sklearn/tree/_classes.py", line 395, in _fit
sample_weight = _check_sample_weight(sample_weight, X, DOUBLE)
TypeError: _check_sample_weight() takes 2 positional arguments but 3 were given
```
0 commit comments