lib/svmkit/preprocessing/standard_scaler.rb in svmkit-0.2.0 vs lib/svmkit/preprocessing/standard_scaler.rb in svmkit-0.2.1
- old
+ new
@@ -21,11 +21,11 @@
# Return the vector consists of the standard deviation for each feature.
# @return [Numo::DFloat] (shape: [n_features])
attr_reader :std_vec
# Create a new normalizer for centering and scaling to unit variance.
- def initialize()
- self.params = {}
+ def initialize
+ @params = {}
@mean_vec = nil
@std_vec = nil
end
# Calculate the mean value and standard deviation of each feature for scaling.