Skip to content

Commit

Permalink
Limit sklearn version
Browse files Browse the repository at this point in the history
  • Loading branch information
mirand863 committed Jul 23, 2024
1 parent 330a8ff commit fa3ac16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hiclass/BinaryPolicy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from abc import ABC

from scipy.sparse import vstack, csr_matrix
from scipy.sparse import vstack, csr_matrix, csr_array
import networkx as nx
import numpy as np

Expand Down Expand Up @@ -160,7 +160,7 @@ def get_binary_examples(self, node) -> tuple:
)
y = np.zeros(len(X))
y[: len(positive_x)] = 1
elif isinstance(self.X, csr_matrix):
elif isinstance(self.X, csr_matrix) or isinstance(self.X, csr_array):
X = vstack([positive_x, negative_x])
sample_weights = (
vstack([positive_weights, negative_weights])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
KEYWORDS = ["hierarchical classification"]
DACS_SOFTWARE = "https://gitlab.com/dacs-hpi"
# What packages are required for this module to be executed?
REQUIRED = ["networkx", "numpy", "scikit-learn", "scipy<1.13"]
REQUIRED = ["networkx", "numpy", "scikit-learn<1.5", "scipy<1.13"]

# What packages are optional?
# 'fancy feature': ['django'],}
Expand Down

0 comments on commit fa3ac16

Please sign in to comment.