def _get_weights_variables(self, weights: np.ndarray) -> np.ndarray:
weights_variables = [i for i in range(weights.size) if weights[i] > max(weights) * 0.001]
if len(weights_variables) < self.mtry:
raise ValueError("mtry is too large. Given the feature weights, can't select that many features.")
weights_variables = np.array(weights_variables, dtype=np.ulonglong)
return weights_variables
for cases where weights is None (which is default value in fit() for feature_weights and deep_feature_weights) ?
Also, function argument weight should be Optional[np.ndarray]
Can you fix function definition here
for cases where
weights
isNone
(which is default value infit()
forfeature_weights
anddeep_feature_weights
) ? Also, function argumentweight
should beOptional[np.ndarray]
@edwardwliu