Module: MachineLearningWorkbench::Monkey::NArrayApproximatable
- 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.
252 253 254 |
# File 'lib/machine_learning_workbench/monkey.rb', line 252 def approximates? other, epsilon=1e-5 ((self - other).abs < epsilon).all? end |