Class: MLAI::Dataset
- Inherits:
-
Object
- Object
- MLAI::Dataset
- Defined in:
- lib/ml_ai/dataset.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Dataset
constructor
A new instance of Dataset.
Constructor Details
#initialize(filename) ⇒ Dataset
Returns a new instance of Dataset.
9 10 11 12 13 14 15 |
# File 'lib/ml_ai/dataset.rb', line 9 def initialize(filename) @filename = filename @data = [] @headers = [] load_csv end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/ml_ai/dataset.rb', line 7 def data @data end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
7 8 9 |
# File 'lib/ml_ai/dataset.rb', line 7 def headers @headers end |