Sha256: fe9bb23e75dd528e16d0f48501dbf468f4b91993ccb197200e021e42c8c8d583

Contents?: true

Size: 641 Bytes

Versions: 3

Compression:

Stored size: 641 Bytes

Contents

require 'big_ml/base'

module BigML
  class Dataset < Base
    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
    ]

    attr_reader *DATASET_PROPERTIES

    def to_model
      Model.create(resource)
    end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
big_ml-0.1.3 lib/big_ml/dataset.rb
big_ml-0.1.2 lib/big_ml/dataset.rb
big_ml-0.1.1 lib/big_ml/dataset.rb