Esempio n. 1
0
        void Initialize()
        {
            performanceCounter = new ProcessPerformanceCounter();

            // Create fuzzy art map network.
            network = new SimplifiedFuzzyARTMap(Parameter.InputSize * 2,
                                                Parameter.NoOfClasses * 2, Parameter.ArtABasedVigilance, Parameter.ChoicingParam, Parameter.ArtABeta);
            network.FastCommitedSlowLearningOption = true;

            // Analyze max-min of input columns
            AnalyzeMaxMin();

            // Initialize inputtransformers level 1
            inputTransformers1 = new DataTransformChain[Parameter.InputSize];
            InitializeInputDataTransform(inputTransformers1, Parameter.InputSize);

            // inputtransformation level 2
            inputTransformers2 = new DataTransformChain();
            inputTransformers2.AppendDataTransform(new ComplementDataTransform(1.0));

            // Target column
            targetTransform = new DataTransformChain();
            targetTransform.AppendDataTransform(new OneOfNDataTransform(Parameter.NoOfClasses));
            targetTransform.AppendDataTransform(new ComplementDataTransform(1.0));

            // Output transform
            outputTransformers = new DataTransformChain();
            outputTransformers.AppendDataTransform(new UnComplementDataTransform());
            outputTransformers.AppendDataTransform(new ReverseOneOfNDataTransform(Parameter.NoOfClasses));
        }
Esempio n. 2
0
        public ModifiedFuzzyARTMap(int inputSize, int numberOfClasses,
                                   double choicingParam, double basedVigilance, double maximumEntropy,
                                   double maximumTotalEntropy, double vigilanceAdjustRate, double weightAdjustRate)
        {
            mm  = new ModifiedMapField(numberOfClasses);
            esa = new EntropyStatsAlgorithms(mm);

            tf = new DataTransformChain();
            tf.AppendDataTransform(new OneOfNDataTransform(numberOfClasses));
            tf.AppendDataTransform(new ComplementDataTransform(1.0));

            rtf = new DataTransformChain();
            rtf.AppendDataTransform(new UnComplementDataTransform());
            rtf.AppendDataTransform(new ReverseOneOfNDataTransform(numberOfClasses));

            this.inputSize           = inputSize;
            this.targetSize          = numberOfClasses * 2;
            this.numberOfClasses     = numberOfClasses;
            this.choicingParam       = choicingParam;
            this.basedVigilance      = basedVigilance;
            this.MaximumEntropy      = maximumEntropy;
            this.maximumTotalEntropy = maximumTotalEntropy;
            this.vigilanceAdjustRate = vigilanceAdjustRate;
            this.weightAdjustRate    = weightAdjustRate;

            vigilances            = new double[0];
            categoryTargetClasses = new int[0];
            categories            = new double[0][];

            // Create unprediction output
            NONPREDICT_OUTPUT = new double[targetSize];
        }
 public ModifiedClusteringOrderingAlgorithms(int numberOfClusters) : base(numberOfClusters)
 {
     transform = new DataTransformChain();
     transform.AppendDataTransform(new UnComplementDataTransform());
     transform.AppendDataTransform(new ReverseOneOfNDataTransform(numberOfClusters));
     selectedClasses = new int[numberOfClusters];
 }
Esempio n. 4
0
        public ModifiedFuzzyARTMap(int inputSize, int numberOfClasses, 
            double choicingParam, double basedVigilance, double maximumEntropy,
            double maximumTotalEntropy, double vigilanceAdjustRate, double weightAdjustRate)
        {
            mm = new ModifiedMapField(numberOfClasses);
            esa = new EntropyStatsAlgorithms(mm);

            tf = new DataTransformChain();
            tf.AppendDataTransform(new OneOfNDataTransform(numberOfClasses));
            tf.AppendDataTransform(new ComplementDataTransform(1.0));

            rtf = new DataTransformChain();
            rtf.AppendDataTransform(new UnComplementDataTransform());
            rtf.AppendDataTransform(new ReverseOneOfNDataTransform(numberOfClasses));

            this.inputSize = inputSize;
            this.targetSize = numberOfClasses*2;
            this.numberOfClasses = numberOfClasses;
            this.choicingParam = choicingParam;
            this.basedVigilance = basedVigilance;
            this.MaximumEntropy = maximumEntropy;
            this.maximumTotalEntropy = maximumTotalEntropy;
            this.vigilanceAdjustRate = vigilanceAdjustRate;
            this.weightAdjustRate = weightAdjustRate;

            vigilances = new double[0];
            categoryTargetClasses = new int[0];
            categories = new double[0][];

            // Create unprediction output
            NONPREDICT_OUTPUT = new double[targetSize];
        }
 public ModifiedClusteringOrderingAlgorithms(int numberOfClusters)
     : base(numberOfClusters)
 {
     transform = new DataTransformChain();
     transform.AppendDataTransform(new UnComplementDataTransform());
     transform.AppendDataTransform(new ReverseOneOfNDataTransform(numberOfClusters));
     selectedClasses = new int[numberOfClusters];
 }
Esempio n. 6
0
 public virtual void InitializeInputDataTransform(DataTransformChain[] inputTransformers, int inputSize)
 {
     // Normalize all input columns
     for (int i = 0; i < Parameter.InputSize; i++)
     {
         inputTransformers[i] = new DataTransformChain();
         if (!param.NormalizedValue)
         {
             inputTransformers[i].AppendDataTransform(new MinMaxDataTransform(analyzer.MinValues[i], analyzer.MaxValues[i]));
         }
     }
 }
 public virtual void InitializeInputDataTransform(DataTransformChain[] inputTransformers, int inputSize)
 {
     // Normalize all input columns
     for (int i = 0; i < Parameter.InputSize; i++)
     {
         inputTransformers[i] = new DataTransformChain();
         if (!parameter.NormalizedValue)
         {
             inputTransformers[i].AppendDataTransform(new MinMaxDataTransform(analyzer.MinValues[i], analyzer.MaxValues[i]));
         }
     }
 }
Esempio n. 8
0
        void Initialize()
        {
            performanceCounter = new ProcessPerformanceCounter();

            if (param.Mode == ProcessModifiedHybridFuzzyARTMapMode.INTERNAL ||
                param.Mode == ProcessModifiedHybridFuzzyARTMapMode.DUAL)
            {
                mfartmap = new ModifiedFuzzyARTMap(param.InputSize, param.NoOfClasses, param.ChoicingParam,
                                                   param.ArtABasedVigilance, param.MaximumEntropy, param.MaximumTotalEntropy, param.VigilanceAdjustRate, param.ArtABeta);
            }
            else
            {
                fartmap = new SimplifiedFuzzyARTMap(2 * param.InputSize, 2 * param.NoOfClasses, param.ArtABasedVigilance,
                                                    param.ChoicingParam, param.ArtABeta);
            }

            if (param.Mode == ProcessModifiedHybridFuzzyARTMapMode.EXTERNAL ||
                param.Mode == ProcessModifiedHybridFuzzyARTMapMode.DUAL)
            {
                mcoa = new ModifiedClusteringOrderingAlgorithms(param.NoOfClasses);
            }

            // Analyze max-min of input columns
            AnalyzeMaxMin();

            // Initialize inputtransformers level 1
            inputTransformers1 = new DataTransformChain[Parameter.InputSize];
            InitializeInputDataTransform(inputTransformers1, Parameter.InputSize);

            // inputtransformation level 2
            inputTransformers2 = new DataTransformChain();
            inputTransformers2.AppendDataTransform(new ComplementDataTransform(1.0));

            // Target column
            targetTransform = new DataTransformChain();
            targetTransform.AppendDataTransform(new OneOfNDataTransform(Parameter.NoOfClasses));
            targetTransform.AppendDataTransform(new ComplementDataTransform(1.0));

            // Output transform
            outputTransformers = new DataTransformChain();
            outputTransformers.AppendDataTransform(new UnComplementDataTransform());
            outputTransformers.AppendDataTransform(new ReverseOneOfNDataTransform(Parameter.NoOfClasses));
        }
        void Initialize()
        {
            performanceCounter = new ProcessPerformanceCounter();

            // Create fuzzy art map network.
            network = new SimplifiedFuzzyARTMap(Parameter.InputSize * 2,
                Parameter.NoOfClasses * 2, Parameter.ArtABasedVigilance, Parameter.ChoicingParam, Parameter.ArtABeta);
            network.FastCommitedSlowLearningOption = true;

            // Analyze max-min of input columns
            AnalyzeMaxMin();

            // Initialize inputtransformers level 1
            inputTransformers1 = new DataTransformChain[Parameter.InputSize];
            InitializeInputDataTransform(inputTransformers1, Parameter.InputSize);

            // inputtransformation level 2
            inputTransformers2 = new DataTransformChain();
            inputTransformers2.AppendDataTransform(new ComplementDataTransform(1.0));

            // Target column
            targetTransform = new DataTransformChain();
            targetTransform.AppendDataTransform(new OneOfNDataTransform(Parameter.NoOfClasses));
            targetTransform.AppendDataTransform(new ComplementDataTransform(1.0));

            // Output transform
            outputTransformers = new DataTransformChain();
            outputTransformers.AppendDataTransform(new UnComplementDataTransform());
            outputTransformers.AppendDataTransform(new ReverseOneOfNDataTransform(Parameter.NoOfClasses));
        }
        void Initialize()
        {
            performanceCounter = new ProcessPerformanceCounter();

            if (param.Mode == ProcessModifiedHybridFuzzyARTMapMode.INTERNAL ||
                    param.Mode == ProcessModifiedHybridFuzzyARTMapMode.DUAL)
            {
                mfartmap = new ModifiedFuzzyARTMap(param.InputSize, param.NoOfClasses, param.ChoicingParam,
                    param.ArtABasedVigilance, param.MaximumEntropy, param.MaximumTotalEntropy, param.VigilanceAdjustRate, param.ArtABeta);
            }
            else
            {
                fartmap = new SimplifiedFuzzyARTMap(2*param.InputSize, 2*param.NoOfClasses, param.ArtABasedVigilance,
                    param.ChoicingParam, param.ArtABeta);
            }

            if (param.Mode == ProcessModifiedHybridFuzzyARTMapMode.EXTERNAL ||
                    param.Mode == ProcessModifiedHybridFuzzyARTMapMode.DUAL)
            {
                mcoa = new ModifiedClusteringOrderingAlgorithms(param.NoOfClasses);
            }

            // Analyze max-min of input columns
            AnalyzeMaxMin();

            // Initialize inputtransformers level 1
            inputTransformers1 = new DataTransformChain[Parameter.InputSize];
            InitializeInputDataTransform(inputTransformers1, Parameter.InputSize);

            // inputtransformation level 2
            inputTransformers2 = new DataTransformChain();
            inputTransformers2.AppendDataTransform(new ComplementDataTransform(1.0));

            // Target column
            targetTransform = new DataTransformChain();
            targetTransform.AppendDataTransform(new OneOfNDataTransform(Parameter.NoOfClasses));
            targetTransform.AppendDataTransform(new ComplementDataTransform(1.0));

            // Output transform
            outputTransformers = new DataTransformChain();
            outputTransformers.AppendDataTransform(new UnComplementDataTransform());
            outputTransformers.AppendDataTransform(new ReverseOneOfNDataTransform(Parameter.NoOfClasses));
        }