Class: MachineLearner::DataSet
- Inherits:
-
Object
- Object
- MachineLearner::DataSet
- Defined in:
- lib/machine_learner/dataset.rb
Overview
学習器にかけるデータ特徴空間xと識別結果yを持つ
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y, id = nil) ⇒ DataSet
constructor
コンストラクタ.
-
#to_s ⇒ Object
データセットを表現する文字列.
Constructor Details
#initialize(x, y, id = nil) ⇒ DataSet
コンストラクタ
13 14 15 16 |
# File 'lib/machine_learner/dataset.rb', line 13 def initialize(x, y, id = nil) @x, @y = x, y @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/machine_learner/dataset.rb', line 8 def id @id end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
7 8 9 |
# File 'lib/machine_learner/dataset.rb', line 7 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
7 8 9 |
# File 'lib/machine_learner/dataset.rb', line 7 def y @y end |
Instance Method Details
#to_s ⇒ Object
Returns データセットを表現する文字列.
19 20 21 |
# File 'lib/machine_learner/dataset.rb', line 19 def to_s "(#{@x}=>#{@y})" end |