lib/svmkit/preprocessing/l2_normalizer.rb in svmkit-0.2.0 vs lib/svmkit/preprocessing/l2_normalizer.rb in svmkit-0.2.1
- old
+ new
@@ -16,11 +16,11 @@
# Return the vector consists of L2-norm for each sample.
# @return [Numo::DFloat] (shape: [n_samples])
attr_reader :norm_vec # :nodoc:
# Create a new normalizer for normaliing to unit L2-norm.
- def initialize()
- self.params = {}
+ def initialize
+ @params = {}
@norm_vec = nil
end
# Calculate L2-norms of each sample.
#