Package org.apache.mahout.clustering.dirichlet.models

Examples of org.apache.mahout.clustering.dirichlet.models.SampledNormalDistribution.sampleFromPrior()


  }

  @SuppressWarnings("unchecked")
  public void testSampledNormalDistributionSerialization() {
    SampledNormalDistribution dist = new SampledNormalDistribution();
    Model[] models = dist.sampleFromPrior(20);
    GsonBuilder builder = new GsonBuilder();
    builder.registerTypeAdapter(Vector.class, new JsonVectorAdapter());
    Gson gson = builder.create();
    String jsonString = gson.toJson(models);
    Model[] models2 = gson.fromJson(jsonString, SampledNormalModel[].class);
View Full Code Here


  }

  @SuppressWarnings("unchecked")
  public void testSampledNormalDistributionSerialization() {
    SampledNormalDistribution dist = new SampledNormalDistribution();
    Model[] models = dist.sampleFromPrior(20);
    GsonBuilder builder = new GsonBuilder();
    builder.registerTypeAdapter(Vector.class, new JsonVectorAdapter());
    Gson gson = builder.create();
    String jsonString = gson.toJson(models);
    Model[] models2 = gson.fromJson(jsonString, SampledNormalModel[].class);
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.