Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion niaaml/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def evaluate_pipeline(
)
if (
i[0][key].param_type is np.intc
or i[0][key].param_type is np.int
or i[0][key].param_type is int
or i[0][key].param_type is np.uintc
or i[0][key].param_type is np.uint
):
Expand Down
4 changes: 2 additions & 2 deletions niaaml/preprocessing/feature_selection/select_k_best.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def select_features(self, x, y, **kwargs):
"""
if self.__k is None:
self.__k = x.shape[1]
self._params["k"] = ParameterDefinition(MinMax(1, self.__k), np.int)
val = np.int(np.around(np.random.uniform(1, self.__k)))
self._params["k"] = ParameterDefinition(MinMax(1, self.__k), int)
val = int(np.around(np.random.uniform(1, self.__k)))
self.__select_k_best.set_params(k=val)

self.__select_k_best.fit(x, y)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class VarianceThreshold(FeatureSelectionAlgorithm):

def __init__(self, **kwargs):
r"""Initialize VarianceThreshold feature selection algorithm."""
self._params = dict(threshold=ParameterDefinition(MinMax(0, 0.1), np.float))
self._params = dict(threshold=ParameterDefinition(MinMax(0, 0.1), float))
self.__variance_threshold = VarThr()

def set_parameters(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion niaaml/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_bin_index(value, number_of_bins):
Returns:
uint: Calculated index.
"""
bin_index = np.int(np.floor(value / (1.0 / number_of_bins)))
bin_index = int(np.floor(value / (1.0 / number_of_bins)))
if bin_index >= number_of_bins:
bin_index -= 1
return bin_index
Expand Down