lib/rumale/preprocessing/one_hot_encoder.rb in rumale-0.18.1 vs lib/rumale/preprocessing/one_hot_encoder.rb in rumale-0.18.2

- old
+ new

@@ -79,28 +79,9 @@ raise ArgumentError, 'Expected the input samples only consists of non-negative integer values.' if x.lt(0).any? codes = encode(x, @feature_indices) codes[true, @active_features].dup end - # Dump marshal data. - # @return [Hash] The marshal data about OneHotEncoder. - def marshal_dump - { params: @params, - n_values: @n_values, - active_features: @active_features, - feature_indices: @feature_indices } - end - - # Load marshal data. - # @return [nil] - def marshal_load(obj) - @params = obj[:params] - @n_values = obj[:n_values] - @active_features = obj[:active_features] - @feature_indices = obj[:feature_indices] - nil - end - private def encode(x, indices) n_samples, n_features = x.shape n_features = 1 if n_features.nil?