Class: BigML::Dataset

Inherits:
Base
  • Object
show all
Defined in:
lib/big_ml/dataset.rb

Constant Summary collapse

DATASET_PROPERTIES =
[
  :category, :code, :columns, :created, :credits,
  :description, :fields, :locale, :name, :number_of_models,
  :number_of_predictions, :private, :resource, :rows, :size,
  :source, :source_status, :status, :tags, :updated
]

Instance Attribute Summary

Attributes inherited from Base

#attrs

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, delete, delete_all, #destroy, find, #id, #initialize, update, #update

Constructor Details

This class inherits a constructor from BigML::Base

Class Method Details

.create(source, options = {}) ⇒ Object



19
20
21
22
# File 'lib/big_ml/dataset.rb', line 19

def create(source, options = {})
  response = client.post("/#{resource_name}", options, { :source => source })
  self.new(response) if response.success?
end

Instance Method Details

#to_modelObject



14
15
16
# File 'lib/big_ml/dataset.rb', line 14

def to_model
  Model.create(resource)
end