Class: Mirlo::OrDataSet
- Defined in:
- lib/mirlo/datasets/or_dataset.rb
Constant Summary
Constants inherited from Dataset
Instance Attribute Summary
Attributes inherited from Dataset
#feature_names, #samples, #title
Instance Method Summary collapse
-
#initialize ⇒ OrDataSet
constructor
A new instance of OrDataSet.
Methods inherited from Dataset
#each, #feature, #input_matrix, #label_for, #num_features, #num_outputs, #shuffle!, #size, #subset_with_target, #target_matrix, #target_set, #targets, #targets_for
Methods included from Plotting
Constructor Details
#initialize ⇒ OrDataSet
Returns a new instance of OrDataSet.
3 4 5 6 7 8 9 10 11 |
# File 'lib/mirlo/datasets/or_dataset.rb', line 3 def initialize @feature_names = ['x', 'y'] @title = "Logical OR dataset" samples = [[0,0], [0,1], [1,0], [1,1]] targets = [ZERO, ONE, ONE, ONE] super(samples: samples, targets: targets) end |