private Tuple<double, double> MinMaxTheta(double[][] data) { var features = new BSASFeatures(data); var clusterData = features.Select(); double MinTheta = 500000; double MaxTheta = -500000; for (int i = 0; i < data.Length - 1; ++i) { double dist = Distance.Euclidean(clusterData[i], clusterData[i + 1]); if (dist < MinTheta) { MinTheta = dist; } if (dist > MaxTheta) { MaxTheta = dist; } } return Tuple.Create(MinTheta, MaxTheta); }
private Tuple <double, double> MinMaxTheta(double[][] data) { var features = new BSASFeatures(data); var clusterData = features.Select(); double MinTheta = 500000; double MaxTheta = -500000; for (int i = 0; i < data.Length - 1; ++i) { double dist = Distance.Euclidean(clusterData[i], clusterData[i + 1]); if (dist < MinTheta) { MinTheta = dist; } if (dist > MaxTheta) { MaxTheta = dist; } } return(Tuple.Create(MinTheta, MaxTheta)); }
public KMeansClustering(double[][] data, int iterations, double thetaStepNum) { features = new BSASFeatures(data); m_iterations = iterations; m_thetaStepNum = thetaStepNum; }