Module: MachineLearningWorkbench::Monkey::NumericallyApproximatable
- Defined in:
- lib/machine_learning_workbench/monkey.rb
Instance Method Summary collapse
-
#approximates?(other, epsilon = 1e-5) ⇒ Boolean
Verifies if ‘self` and `other` are withing `epsilon` of each other.
Instance Method Details
#approximates?(other, epsilon = 1e-5) ⇒ Boolean
Verifies if ‘self` and `other` are withing `epsilon` of each other.
166 167 168 169 |
# File 'lib/machine_learning_workbench/monkey.rb', line 166 def approximates? other, epsilon=1e-5 # Used for testing and NMatrix#approximates?, should I move to spec_helper? (self - other).abs < epsilon end |