예제 #1
0
        public int[] Classify()
        {
            var clusterData = features.Select();
            var theta       = MinMaxTheta(clusterData);

            var args = new BsasArgs(theta, m_iterations, clusterData, m_thetaStepNum);

            var bsas     = new BasicSequentialAlgorithmicScheme(args);
            var clusters = bsas.CalculateClasses();
            var kmeans   = new KMeans(clusters, Distance.Euclidean);
            var idx      = kmeans.Compute(clusterData);

            return(idx);
        }
예제 #2
0
        public int[] Classify()
        {
            var clusterData = features.Select();
            var theta = MinMaxTheta(clusterData);

            var args = new BsasArgs(theta, m_iterations, clusterData, m_thetaStepNum);

            var bsas = new BasicSequentialAlgorithmicScheme(args);
            var clusters = bsas.CalculateClasses();
            var kmeans = new KMeans(clusters, Distance.Euclidean);
            var idx = kmeans.Compute(clusterData);

            return idx;
        }