Sha256: 42842e784defe8d958ae6fcf82b54f4b44b3af86caac0412abb472420941c378

Contents?: true

Size: 966 Bytes

Versions: 1

Compression:

Stored size: 966 Bytes

Contents

# dependencies
require "bigdecimal"
require "json"
require "lightgbm"
require "matrix"
require "nokogiri"

# modules
require "eps/base"
require "eps/base_estimator"
require "eps/data_frame"
require "eps/evaluators/linear_regression"
require "eps/evaluators/lightgbm"
require "eps/evaluators/naive_bayes"
require "eps/evaluators/node"
require "eps/label_encoder"
require "eps/lightgbm"
require "eps/linear_regression"
require "eps/metrics"
require "eps/model"
require "eps/naive_bayes"
require "eps/statistics"
require "eps/text_encoder"
require "eps/utils"
require "eps/version"

module Eps
  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

  # backwards compatibility
  Regressor = Model
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eps-0.3.0 lib/eps.rb