Package com.sketchingbits.mlearning.clustering

Source Code of com.sketchingbits.mlearning.clustering.KMeansTest

package com.sketchingbits.mlearning.clustering;

import com.sketchingbits.mlearning.clustering.KMeans;
import org.junit.*;

public class KMeansTest {

  /**
   * @param args
   */
  @Test
  public static void testClustering() {
    final double dataset[][] = {
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
      {1.0, 1.0, 0.0, 1.0, 1.0, 0.0},
    };
   
    KMeans kMeansAnalysis = new KMeans(dataset);
    kMeansAnalysis.run();
    //Assert.
   
  }

}
TOP

Related Classes of com.sketchingbits.mlearning.clustering.KMeansTest

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.