def _validate_and_set_permitted_range(self, params): """Validate and set the dictionary of permitted ranges for continuous features.""" input_permitted_range = None if 'permitted_range' in params: input_permitted_range = params['permitted_range'] if not hasattr(self, 'feature_names'): raise SystemException( 'Feature names not correctly set in public data interface') for input_permitted_range_feature_name in input_permitted_range: if input_permitted_range_feature_name not in self.feature_names: raise UserConfigValidationException( "permitted_range contains some feature names which are not part of columns in dataframe" ) self.permitted_range, _ = self.get_features_range( input_permitted_range)
def _validate_and_set_continuous_features_precision(self, params): """Validate and set the dictionary of precision for continuous features.""" if 'continuous_features_precision' in params: self.continuous_features_precision = params[ 'continuous_features_precision'] if not hasattr(self, 'feature_names'): raise SystemException( 'Feature names not correctly set in public data interface') for continuous_features_precision_feature_name in self.continuous_features_precision: if continuous_features_precision_feature_name not in self.feature_names: raise UserConfigValidationException( "continuous_features_precision contains some feature names which are not part of columns in dataframe" ) else: self.continuous_features_precision = None
def get_num_output_nodes2(self, input): if self.model_type == ModelTypes.Regressor: raise SystemException('Number of output nodes not supported for regression') return self.get_output(input).shape[1]