lib/libmf/model.rb in libmf-0.3.0 vs lib/libmf/model.rb in libmf-0.4.0
- old
+ new
@@ -139,16 +139,16 @@
# silence insufficient blocks warning with default params
options[:bins] ||= 25 unless options[:nr_bins]
options[:copy_data] = false unless options.key?(:copy_data)
options_map = {
- :loss => :fun,
- :factors => :k,
- :threads => :nr_threads,
- :bins => :nr_bins,
- :iterations => :nr_iters,
- :learning_rate => :eta,
- :nmf => :do_nmf
+ loss: :fun,
+ factors: :k,
+ threads: :nr_threads,
+ bins: :nr_bins,
+ iterations: :nr_iters,
+ learning_rate: :eta,
+ nmf: :do_nmf
}
options.each do |k, v|
k = options_map[k] if options_map[k]
param[k] = v
end