Class: Jubatus::Regression::Client::Regression

Inherits:
Common::ClientBase show all
Includes:
Common
Defined in:
lib/jubatus/regression/client.rb

Instance Method Summary collapse

Methods included from Common

check_type, check_types

Methods inherited from Common::ClientBase

connect, #do_mix, #get_client, #get_config, #get_name, #get_proxy_status, #get_status, #load, #save, #set_name

Constructor Details

#initialize(host, port, name, timeout_sec = 10) ⇒ Regression

Returns a new instance of Regression.


16
17
18
# File 'lib/jubatus/regression/client.rb', line 16

def initialize(host, port, name, timeout_sec=10)
  super
end

Instance Method Details

#clearObject


30
31
32
# File 'lib/jubatus/regression/client.rb', line 30

def clear
  @jubatus_client.call("clear", [], TBool.new, [])
end

#estimate(estimate_data) ⇒ Object


25
26
27
28
# File 'lib/jubatus/regression/client.rb', line 25

def estimate(estimate_data)
  @jubatus_client.call("estimate", [estimate_data], TList.new(TFloat.new),
      [TList.new(TDatum.new)])
end

#train(train_data) ⇒ Object


20
21
22
23
# File 'lib/jubatus/regression/client.rb', line 20

def train(train_data)
  @jubatus_client.call("train", [train_data], TInt.new(true, 4), [TList.new(
      TUserDef.new(ScoredDatum))])
end