public TimeInfer ( MathNet.Numerics.LinearAlgebra.Double.SparseMatrix input ) : Vector | ||
input | MathNet.Numerics.LinearAlgebra.Double.SparseMatrix | |
Résultat | Vector |
public void ErrorWhenLearningAfterInferenceMode() { var node = new SpatialNode2DGaussian(); var mat = new SparseMatrix(4, 4, 4.0); var learnAfterInferFails = false; var learnAfterTBInferFails = false; node.Learn(mat); node.Infer(mat); try { node.Learn(mat); } catch (HtmRuleException e) { learnAfterInferFails = true; Debug.WriteLine(e.Message); } node.TimeInfer(mat); try { node.Learn(mat); } catch (HtmRuleException e) { learnAfterTBInferFails = true; Debug.WriteLine(e.Message); } Assert.IsTrue(learnAfterInferFails); Assert.IsTrue(learnAfterTBInferFails); }
public void InferEmptyVectorIfNoCoincidencesLearned() { var node = new SpatialNode2DGaussian(1.0); var output = node.Infer(new SparseMatrix(5, 5, 2.0)); Assert.AreEqual(new SparseVector(1), output); output = node.TimeInfer(new SparseMatrix(5, 5, 2.0)); Assert.AreEqual(new SparseVector(1), output); }