/** * A completely default {@link DoubleKMeans} used primarily as a convenience function for reading. */ protected DoubleKMeans() { this(new KMeansConfiguration<DoubleNearestNeighbours, double[]>()); }
/** * A completely default {@link ByteKMeans} used primarily as a convenience function for reading. */ protected ByteKMeans() { this(new KMeansConfiguration<ByteNearestNeighbours, byte[]>()); }
/** * A completely default {@link IntKMeans} used primarily as a convenience function for reading. */ protected IntKMeans() { this(new KMeansConfiguration<IntNearestNeighbours, int[]>()); }
/** * Construct a new {@link HierarchicalLongKMeans} with the given parameters. * Uses the default parameters of the {@link KMeansConfiguration}. * * @param M Data dimensionality. * @param K Number of clusters per node. * @param depth Tree depth. */ public HierarchicalLongKMeans(int M, int K, int depth) { this(new KMeansConfiguration<LongNearestNeighbours, long[]>(), M, K, depth); }
/** * A completely default {@link LongKMeans} used primarily as a convenience function for reading. */ protected LongKMeans() { this(new KMeansConfiguration<LongNearestNeighbours, long[]>()); }
/** * A completely default {@link ShortKMeans} used primarily as a convenience function for reading. */ protected ShortKMeans() { this(new KMeansConfiguration<ShortNearestNeighbours, short[]>()); }
/** * Construct a new {@link HierarchicalFloatKMeans} with the given parameters. * Uses the default parameters of the {@link KMeansConfiguration}. * * @param M Data dimensionality. * @param K Number of clusters per node. * @param depth Tree depth. */ public HierarchicalFloatKMeans(int M, int K, int depth) { this(new KMeansConfiguration<FloatNearestNeighbours, float[]>(), M, K, depth); }
/** * Construct a new {@link HierarchicalIntKMeans} with the given parameters. * Uses the default parameters of the {@link KMeansConfiguration}. * * @param M Data dimensionality. * @param K Number of clusters per node. * @param depth Tree depth. */ public HierarchicalIntKMeans(int M, int K, int depth) { this(new KMeansConfiguration<IntNearestNeighbours, int[]>(), M, K, depth); }
/** * Construct a new {@link HierarchicalShortKMeans} with the given parameters. * Uses the default parameters of the {@link KMeansConfiguration}. * * @param M Data dimensionality. * @param K Number of clusters per node. * @param depth Tree depth. */ public HierarchicalShortKMeans(int M, int K, int depth) { this(new KMeansConfiguration<ShortNearestNeighbours, short[]>(), M, K, depth); }
/** * Construct a new {@link HierarchicalByteKMeans} with the given parameters. * Uses the default parameters of the {@link KMeansConfiguration}. * * @param M Data dimensionality. * @param K Number of clusters per node. * @param depth Tree depth. */ public HierarchicalByteKMeans(int M, int K, int depth) { this(new KMeansConfiguration<ByteNearestNeighbours, byte[]>(), M, K, depth); }
/** * A completely default {@link FloatKMeans} used primarily as a convenience function for reading. */ protected FloatKMeans() { this(new KMeansConfiguration<FloatNearestNeighbours, float[]>()); }
/** * A completely default {@link ByteKMeans} used primarily as a convenience * function for reading. */ protected FeatureVectorKMeans() { this(new KMeansConfiguration<ObjectNearestNeighbours<T>, T>()); }
/** * Construct a new {@link HierarchicalDoubleKMeans} with the given parameters. * Uses the default parameters of the {@link KMeansConfiguration}. * * @param M Data dimensionality. * @param K Number of clusters per node. * @param depth Tree depth. */ public HierarchicalDoubleKMeans(int M, int K, int depth) { this(new KMeansConfiguration<DoubleNearestNeighbours, double[]>(), M, K, depth); }
private KMeansConfiguration<ByteNearestNeighbours, byte[]> confByte(int ndims) { NearestNeighboursFactory<? extends ByteNearestNeighbours, byte[]> assigner; final ExecutorService pool = Executors.newFixedThreadPool(jj, new DaemonThreadFactory()); if (E) { assigner = new ByteNearestNeighboursExact.Factory(); } else { assigner = new ByteNearestNeighboursKDTree.Factory(NT, NC); } final KMeansConfiguration<ByteNearestNeighbours, byte[]> conf = new KMeansConfiguration<ByteNearestNeighbours, byte[]>( K, assigner, I, B, pool); return conf; }
private KMeansConfiguration<IntNearestNeighbours, int[]> confInt(int ndims) { NearestNeighboursFactory<? extends IntNearestNeighbours, int[]> assigner; final ExecutorService pool = Executors.newFixedThreadPool(jj, new DaemonThreadFactory()); if (E) { assigner = new IntNearestNeighboursExact.Factory(); } else { assigner = new IntNearestNeighboursKDTree.Factory(NT, NC); } final KMeansConfiguration<IntNearestNeighbours, int[]> conf = new KMeansConfiguration<IntNearestNeighbours, int[]>( K, assigner, I, B, pool); return conf; }
private KMeansConfiguration<IntNearestNeighbours, int[]> confInt(int ndims) { NearestNeighboursFactory<? extends IntNearestNeighbours, int[]> assigner; final ExecutorService pool = Executors.newFixedThreadPool(jj, new DaemonThreadFactory()); if (E) { assigner = new IntNearestNeighboursExact.Factory(); } else { assigner = new IntNearestNeighboursKDTree.Factory(NT, NC); } final KMeansConfiguration<IntNearestNeighbours, int[]> conf = new KMeansConfiguration<IntNearestNeighbours, int[]>( K, assigner, I, B, pool); return conf; }
/** * Convenience method to quickly create an exact {@link FloatKMeans}. All * parameters other than the number of clusters are set * at their defaults, but can be manipulated through the configuration * returned by {@link #getConfiguration()}. * <p> * Euclidean distance is used to measure the distance between points. * * @param K * the number of clusters * @return a {@link FloatKMeans} instance configured for exact k-means */ public static FloatKMeans createExact(int K) { final KMeansConfiguration<FloatNearestNeighbours, float[]> conf = new KMeansConfiguration<FloatNearestNeighbours, float[]>(K, new FloatNearestNeighboursExact.Factory()); return new FloatKMeans(conf); }
/** * Convenience method to quickly create an exact {@link LongKMeans}. All * parameters other than the number of clusters are set * at their defaults, but can be manipulated through the configuration * returned by {@link #getConfiguration()}. * <p> * Euclidean distance is used to measure the distance between points. * * @param K * the number of clusters * @return a {@link LongKMeans} instance configured for exact k-means */ public static LongKMeans createExact(int K) { final KMeansConfiguration<LongNearestNeighbours, long[]> conf = new KMeansConfiguration<LongNearestNeighbours, long[]>(K, new LongNearestNeighboursExact.Factory()); return new LongKMeans(conf); }
/** * Convenience method to quickly create an exact {@link DoubleKMeans}. All * parameters other than the number of clusters are set * at their defaults, but can be manipulated through the configuration * returned by {@link #getConfiguration()}. * <p> * Euclidean distance is used to measure the distance between points. * * @param K * the number of clusters * @return a {@link DoubleKMeans} instance configured for exact k-means */ public static DoubleKMeans createExact(int K) { final KMeansConfiguration<DoubleNearestNeighbours, double[]> conf = new KMeansConfiguration<DoubleNearestNeighbours, double[]>(K, new DoubleNearestNeighboursExact.Factory()); return new DoubleKMeans(conf); }
/** * Convenience method to quickly create an exact {@link ByteKMeans}. All * parameters other than the number of clusters are set * at their defaults, but can be manipulated through the configuration * returned by {@link #getConfiguration()}. * <p> * Euclidean distance is used to measure the distance between points. * * @param K * the number of clusters * @return a {@link ByteKMeans} instance configured for exact k-means */ public static ByteKMeans createExact(int K) { final KMeansConfiguration<ByteNearestNeighbours, byte[]> conf = new KMeansConfiguration<ByteNearestNeighbours, byte[]>(K, new ByteNearestNeighboursExact.Factory()); return new ByteKMeans(conf); }