Class: Mirlo::OrDataSet

Inherits:
Dataset show all
Defined in:
lib/mirlo/datasets/or_dataset.rb

Constant Summary

Constants inherited from Dataset

Dataset::DEFAULT_LABELS

Instance Attribute Summary

Attributes inherited from Dataset

#feature_names, #samples, #title

Instance Method Summary collapse

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

#plot

Constructor Details

#initializeOrDataSet

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