Module: Eps

Defined in:
lib/eps/statistics.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/naive_bayes.rb,
lib/eps/text_encoder.rb,
lib/eps/label_encoder.rb,
lib/eps/base_estimator.rb,
lib/eps/evaluators/node.rb,
lib/eps/linear_regression.rb,
lib/eps/evaluators/lightgbm.rb,
lib/eps/evaluators/naive_bayes.rb,
lib/eps/pmml_generators/lightgbm.rb,
lib/eps/evaluators/linear_regression.rb

Overview

Extracted from github.com/estebanz01/ruby-statistics The Ruby author is Esteban Zapata Rojas

Originally extracted from codeplea.com/incomplete-beta-function-c These functions shared under zlib license and the author is Lewis Van Winkle

Defined Under Namespace

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

Constant Summary collapse

Regressor =

backwards compatibility

Model
VERSION =
"0.3.0"

Class Method Summary collapse

Class Method Details

.metrics(y_true, y_pred) ⇒ Object


28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/eps.rb', line 28

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