Module: MachineLearningWorkbench::Monkey::NArrayApproximatable
- Defined in:
- lib/machine_learning_workbench/monkey.rb
Instance Method Summary collapse
-
#approximates?(other, epsilon = 1e-5) ⇒ Boolean
Verifies if
selfandotherare withingepsilonof each other.
Instance Method Details
#approximates?(other, epsilon = 1e-5) ⇒ Boolean
Verifies if self and other are withing epsilon of each other.
253 254 255 |
# File 'lib/machine_learning_workbench/monkey.rb', line 253 def approximates? other, epsilon=1e-5 ((self - other).abs < epsilon).all? end |