Class: DGaffML::Client
- Inherits:
-
Object
- Object
- DGaffML::Client
- Defined in:
- lib/dgaff_ml/client.rb
Instance Method Summary collapse
-
#initialize(user_id) ⇒ Client
constructor
A new instance of Client.
- #model(dataset_id) ⇒ Object
- #models ⇒ Object
- #predict(dataset_id, obs) ⇒ Object
Constructor Details
#initialize(user_id) ⇒ Client
7 8 9 |
# File 'lib/dgaff_ml/client.rb', line 7 def initialize(user_id) @user = DGaffML::Request.login(user_id) end |
Instance Method Details
#model(dataset_id) ⇒ Object
15 16 17 |
# File 'lib/dgaff_ml/client.rb', line 15 def model(dataset_id) DGaffML::Model.new(self, DGaffML::Request.dataset(@user["id"], dataset_id)) end |
#models ⇒ Object
11 12 13 |
# File 'lib/dgaff_ml/client.rb', line 11 def models DGaffML::Request.datasets(@user["id"]) end |
#predict(dataset_id, obs) ⇒ Object
19 20 21 |
# File 'lib/dgaff_ml/client.rb', line 19 def predict(dataset_id, obs) DGaffML::Request.predict(@user["id"], dataset_id, obs) end |