Skip to content

Commit

Permalink
Add attribute to method in BCNClassifier
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrymoudiki committed Feb 5, 2024
1 parent 84352a1 commit ea2f70d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions BCN/BCNClassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def fit(self, X, y, **kwargs):
Target values.
"""

self.classes_ = np.unique(y)
self.n_classes_ = len(self.classes_)
# cf. https://rpy2.github.io/doc/latest/html/numpy.html
# Create a converter that starts with rpy2's default converter
# to which the numpy conversion rules are added.
Expand All @@ -165,7 +166,7 @@ def fit(self, X, y, **kwargs):
verbose = self.verbose,
show_progress = self.show_progress,
seed = self.seed
)
)
return self

def predict_proba(self, X):
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
History
=======

0.7.1 (2024-02-06)
------------------

* Add `classes_` attribute to `fit` method in BCNClassifier

0.6.2 (2024-01-25)
------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ def install_r():
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/Techtonique/bcn_python',
version='0.7.0',
version='0.7.1',
zip_safe=False,
)

0 comments on commit ea2f70d

Please sign in to comment.