예제 #1
0
        public static double[,] calcProximityMetrics(List<double> input, Lattice neurons)
        {
            double[,] distances = new double[neurons.getSize(), neurons.getSize()];
            int latticeSize = neurons.getSize();

            for (int rowInd = 0; rowInd < latticeSize; ++rowInd)
            {
                for (int colInd = 0; colInd < latticeSize; ++colInd)
                {
                    distances[rowInd, colInd] = calculateProximity(input, neurons.get(rowInd, colInd).weights_);
                }
            }
            return distances;
        }
예제 #2
0
        public Algorithm(int latticeSize, int featuresCnt, 
                         int epochsNumber = 1000, double learningRate = 0.01, int tau2 = 1000, double trainingError = 1e-3)
        {
            latticeSize_ = latticeSize;
            featuresCnt_ = featuresCnt;
            epochsNumber_ = epochsNumber;
            learningRate_ = learningRate;
            tau2_ = tau2;
            trainingError_ = trainingError;

            neurons_ = new Lattice(latticeSize, featuresCnt);
            width_ = neurons_.getWidth();
            tau1_ = epochsNumber_ / (width_ * 1.0);
        }
예제 #3
0
        public Algorithm(int latticeSize, int featuresCnt,
                         int epochsNumber = 1000, double learningRate = 0.01, int tau2 = 1000, double trainingError = 1e-3)
        {
            latticeSize_   = latticeSize;
            featuresCnt_   = featuresCnt;
            epochsNumber_  = epochsNumber;
            learningRate_  = learningRate;
            tau2_          = tau2;
            trainingError_ = trainingError;

            neurons_ = new Lattice(latticeSize, featuresCnt);
            width_   = neurons_.getWidth();
            tau1_    = epochsNumber_ / (width_ * 1.0);
        }
예제 #4
0
        public static double[,] calcProximityMetrics(List <double> input, Lattice neurons)
        {
            double[,] distances = new double[neurons.getSize(), neurons.getSize()];
            int latticeSize = neurons.getSize();

            for (int rowInd = 0; rowInd < latticeSize; ++rowInd)
            {
                for (int colInd = 0; colInd < latticeSize; ++colInd)
                {
                    distances[rowInd, colInd] = calculateProximity(input, neurons.get(rowInd, colInd).weights_);
                }
            }
            return(distances);
        }