Package de.jungblut.writable

Examples of de.jungblut.writable.MatrixWritable.readFields()


   * stream. Note that "in" will not be closed by this method.
   */
  public static MultinomialNaiveBayes deserialize(DataInput in)
      throws IOException {
    MatrixWritable matrixWritable = new MatrixWritable();
    matrixWritable.readFields(in);
    DoubleVector classProbability = VectorWritable.readVector(in);

    return new MultinomialNaiveBayes(matrixWritable.getMatrix(),
        classProbability);
  }
View Full Code Here


    }

    DoubleMatrix[] array = new DoubleMatrix[layers];
    for (int i = 0; i < layers; i++) {
      MatrixWritable mv = new MatrixWritable();
      mv.readFields(in);
      array[i] = mv.getMatrix();
    }
    ActivationFunction func = null;
    try {
      func = (ActivationFunction) Class.forName(in.readUTF()).newInstance();
View Full Code Here

    }

    WeightMatrix[] weights = new WeightMatrix[numLayers - 1];
    for (int i = 0; i < weights.length; i++) {
      MatrixWritable wm = new MatrixWritable();
      wm.readFields(in);
      weights[i] = new WeightMatrix(wm.getMatrix());
    }

    ActivationFunction[] funcs = new ActivationFunction[numLayers];
    for (int i = 0; i < numLayers; i++) {
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.