Method: EasyML::Data::Preprocessor::SimpleImputer#load

Defined in:
lib/easy_ml/data/preprocessor/simple_imputer.rb

#loadObject



155
156
157
158
159
160
161
162
163
164
165
# File 'lib/easy_ml/data/preprocessor/simple_imputer.rb', line 155

def load
  return unless File.exist?(file_path)

  all_statistics = JSON.parse(File.read(file_path))
  attribute_stats = all_statistics[@attribute]

  return unless attribute_stats

  @statistics = deserialize_statistics(attribute_stats)
  deep_symbolize_keys!
end