Class: CrossValidation::Sample

Inherits:
Struct
  • Object
show all
Defined in:
lib/cross_validation/sample.rb

Overview

Represents a datum and its class (e.g., “spam”).

This is an optional data structure that simplifies definining training methods in cross-validation runs.

Instance Attribute Summary collapse

Instance Attribute Details

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of klass



6
7
8
# File 'lib/cross_validation/sample.rb', line 6

def klass
  @klass
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



6
7
8
# File 'lib/cross_validation/sample.rb', line 6

def value
  @value
end