Examples of maxIndex()


Examples of de.jungblut.math.DoubleVector.maxIndex()

    // observe an umbrella
    DoubleVector predict = hmm.predict(new DenseDoubleVector(new double[] { 0d,
        1d }));
    // so it is very likely that it rains ~91%
    assertEquals(1, predict.maxIndex());
    assertEquals(0.91, predict.get(1), 0.01);
    assertEquals(0.08, predict.get(0), 0.1);
    // observe no umbrella after observing one
    predict = hmm.predict(new DenseDoubleVector(new double[] { 1d, 0d }),
        predict);
View Full Code Here

Examples of de.jungblut.math.DoubleVector.maxIndex()

    assertEquals(0.08, predict.get(0), 0.1);
    // observe no umbrella after observing one
    predict = hmm.predict(new DenseDoubleVector(new double[] { 1d, 0d }),
        predict);
    // so it is very likely that it is sunny now
    assertEquals(0, predict.maxIndex());
    assertEquals(0.99, predict.get(0), 0.01);
    assertEquals(0.001, predict.get(1), 0.01);
  }

  private void assertLogEquals(double d, double e, double f) {
View Full Code Here

Examples of de.jungblut.math.dense.DenseDoubleVector.maxIndex()

      }

      outcomeHistogram.set(classIndex, outcomeHistogram.get(classIndex) + 1);
    }
    if (numOutcomes == 2) {
      return new SingleEntryDoubleVector(outcomeHistogram.maxIndex());
    } else {
      return outcomeHistogram;
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.