Module: Eps

Defined in:
lib/eps/pmml.rb,
lib/eps.rb,
lib/eps/base.rb,
lib/eps/model.rb,
lib/eps/utils.rb,
lib/eps/metrics.rb,
lib/eps/version.rb,
lib/eps/lightgbm.rb,
lib/eps/data_frame.rb,
lib/eps/statistics.rb,
lib/eps/naive_bayes.rb,
lib/eps/pmml/loader.rb,
lib/eps/text_encoder.rb,
lib/eps/label_encoder.rb,
lib/eps/base_estimator.rb,
lib/eps/pmml/generator.rb,
lib/eps/evaluators/node.rb,
lib/eps/linear_regression.rb,
lib/eps/evaluators/lightgbm.rb,
lib/eps/evaluators/naive_bayes.rb,
lib/eps/evaluators/linear_regression.rb

Overview

similar to Marshal/JSON/YAML interface

Defined Under Namespace

Modules: Evaluators, Metrics, PMML, Statistics, Utils Classes: Base, BaseEstimator, DataFrame, Error, LabelEncoder, LightGBM, LinearRegression, Model, NaiveBayes, TextEncoder, UnstableSolution

Constant Summary collapse

Regressor =

backwards compatibility

Model
VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.metrics(y_true, y_pred, weight: nil) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/eps.rb', line 39

def self.metrics(y_true, y_pred, weight: nil)
  if Utils.column_type(y_true, "actual") == "numeric"
    {
      rmse: Metrics.rmse(y_true, y_pred, weight: weight),
      mae: Metrics.mae(y_true, y_pred, weight: weight),
      me: Metrics.me(y_true, y_pred, weight: weight)
    }
  else
    {
      accuracy: Metrics.accuracy(y_true, y_pred, weight: weight)
    }
  end
end