示例#1
0
文件: Cluster.cs 项目: vutiendung/RS
        private Dictionary <int, int> byKmeans(double[][] v)
        {
            K_means k_mean = new K_means();

            //k_mean.addSetting(k, maxLoop, Normalized(x), epsilon, sigma, T, M);
            k_mean.addSetting(k, maxLoop, x, epsilon, sigma, T, M);
            k_mean.run(v);
            v_Last = k_mean.getV();
            return(k_mean.get_Clustered_Data());
        }
示例#2
0
        public void run()
        {
            int n = x.Length;                               // n is number of user of group
            int d = x[0].Length;                            // d is number of Item of rating matrix

            double[][] v = new double[k][];
            v = CREATE_V_Init_01(x, k);

            for (int i = 0; i < 3; i++)
            {
                int     loop   = 1;
                K_means k_mean = new K_means();
                k_mean.addSetting(k, loop, x, epsilon, sigma, T, M);
                k_mean.run(v);
                v = k_mean.getV();

                //K_means_DCA k_mean_DCA = new K_means_DCA();
                //k_mean_DCA.addSetting(k, loop, x, epsilon, sigma, T, M);
                //k_mean_DCA.run(v);
                //v = k_mean_DCA.getV();
            }

            Repeat(n, d, v);
        }
示例#3
0
文件: Cluster.cs 项目: vutiendung/RS
 private Dictionary<int, int> byKmeans(double[][] v)
 {
     K_means k_mean = new K_means();
     //k_mean.addSetting(k, maxLoop, Normalized(x), epsilon, sigma, T, M);
     k_mean.addSetting(k, maxLoop, x, epsilon, sigma, T, M);
     k_mean.run(v);
     v_Last = k_mean.getV();
     return k_mean.get_Clustered_Data();
 }
示例#4
0
        public void run()
        {
            int n = x.Length;                               // n is number of user of group
            int d = x[0].Length;                            // d is number of Item of rating matrix
            double[][] v = new double[k][];
            v = CREATE_V_Init_01(x, k);

            for (int i = 0; i < 3; i++)
            {
                int loop = 1;
                K_means k_mean = new K_means();
                k_mean.addSetting(k, loop, x, epsilon, sigma, T, M);
                k_mean.run(v);
                v = k_mean.getV();

                //K_means_DCA k_mean_DCA = new K_means_DCA();
                //k_mean_DCA.addSetting(k, loop, x, epsilon, sigma, T, M);
                //k_mean_DCA.run(v);
                //v = k_mean_DCA.getV();
            }

            Repeat(n, d, v);
        }