All Downloads are FREE. Search and download functionalities are using the official Maven repository.

moa.clusterers.streamkm.Point Maven / Gradle / Ivy

Go to download

Massive On-line Analysis is an environment for massive data mining. MOA provides a framework for data stream mining and includes tools for evaluation and a collection of machine learning algorithms. Related to the WEKA project, also written in Java, while scaling to more demanding problems.

The newest version!
package moa.clusterers.streamkm;

import moa.cluster.Cluster;
import moa.cluster.SphereCluster;

import com.yahoo.labs.samoa.instances.Instance;

/**
 *
 * @author Marcel R. Ackermann, Christiane Lammersen, Marcus Maertens, Christoph Raupach, 
Christian Sohler, Kamil Swierkot
 */
public class Point {

	//dimension
	int dimension;

	//Clustering Features (weight, squareSum, linearSum)
	double weight;
	double squareSum;
	double[] coordinates;

	//cost and index of the centre, the point is currently assigned to
	double curCost;
	int centreIndex;
	
	//id and class (if there is class information in the file)
	int id;
	int cl;

	public Point(int dimension){
		this.weight = 1.0;
		this.squareSum = 0.0;
		this.dimension = dimension;
		this.coordinates = new double[dimension];
		this.id = -1;
		this.cl = -1;
		this.curCost = 0;
		this.centreIndex = -1;
		for(int l=0;l




© 2015 - 2025 Weber Informatics LLC | Privacy Policy