Module: EasyML::Data::Preprocessor::Utils

Included in:
EasyML::Data::Preprocessor
Defined in:
lib/easy_ml/data/preprocessor/utils.rb

Instance Method Summary collapse

Instance Method Details

#standardize_config(config) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/easy_ml/data/preprocessor/utils.rb', line 4

def standardize_config(config)
  config.each do |column, strategies|
    next unless strategies.is_a?(Array)

    config[column] = strategies.reduce({}) do |hash, strategy|
      hash.tap do
        hash[strategy] = true
      end
    end
  end
end