コード例 #1
0
ファイル: Program.cs プロジェクト: Kiza/POPTVR
        public static void starter()
        {
            ClusterSetting clusterSetting = ClusterSetting.getClusterSettings();

            string filename = AppConfig.getTrainFilename();
            DataSet dataset = DataFileReader.ReadData(filename);

            ClusterFacadeInterface clusterFacade;

            clusterFacade = new MlvqFacade();
            //clusterFacade = new SOclusterFacade();
            //clusterFacade = new RctFacade();
            //clusterFacade = new SrctFacade();

            PoptvrSystem popSystem = new PoptvrSystem(dataset, clusterSetting, clusterFacade);
            popSystem.InitClusters();
            popSystem.PopLearn();

            filename = AppConfig.getTestFilename();
            dataset = DataFileReader.ReadData(filename);
            popSystem.POPTVR = RsPopModel.AttributeReduction(popSystem.POPTVR, dataset);
            popSystem.POPTVR = RsPopModel.RuleReduction(popSystem.POPTVR, dataset);

            popSystem.PopTest(dataset);
        }
コード例 #2
0
        private void DoSlowProcess()
        {
            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                (ThreadStart)delegate()
                {
                    this.overallProgress_Label.Content = "Get Cluster Settings ...";
                }
            );
            ClusterSetting clusterSetting = ClusterSetting.getClusterSettings(Settings);

            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, 
                (ThreadStart) delegate()
                {
                    this.overallProgress_Label.Content = "Read Trainging Data ...";
                    this.overallProgress_Bar.Value += 1;
                }
            );
            string filename = Settings.TrainingFileAddress;
            DataSet dataset = DataFileReader.ReadData(filename);

            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                (ThreadStart)delegate()
                {
                    this.overallProgress_Label.Content = "Setup Network ...";
                    this.overallProgress_Bar.Value += 1;
                }
            );

            ClusterFacadeInterface clusterFacade = null;
            if (this.Settings.ClusterMethod.Equals("clusterMethod_MLVQ"))
            {
                clusterFacade = new MlvqFacade();
            }
            else if (this.Settings.ClusterMethod.Equals("clusterMethod_RCT"))
            {
                clusterFacade = new RctFacade();
            }
            else if (this.Settings.ClusterMethod.Equals("clusterMethod_SO"))
            {
                clusterFacade = new SOclusterFacade();
            }
            else if (this.Settings.ClusterMethod.Equals("Method_SRCT"))
            {
                clusterFacade = new SrctFacade();
            }
            PopSystem = new PoptvrSystem(dataset, clusterSetting, clusterFacade, this.Settings);
            PopSystem.InitClusters();

            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                (ThreadStart)delegate()
                {
                    this.overallProgress_Label.Content = "Training Network ...";
                    this.overallProgress_Bar.Value += 1;
                }
            );
            PopSystem.PopLearn();

            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                (ThreadStart)delegate()
                {
                    this.overallProgress_Label.Content = "Read Testing Data ...";
                    this.overallProgress_Bar.Value += 1;
                }
            );
            filename = Settings.TrainingFileAddress;
            dataset = DataFileReader.ReadData(filename);

            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                (ThreadStart)delegate()
                {
                    this.overallProgress_Label.Content = "Run Testing Data ...";
                    this.overallProgress_Bar.Value += 1;
                }
            );
            PopSystem.PopTest(dataset);
            
            
            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                    (ThreadStart)delegate()
                    {
                        this.overallProgress_Label.Content = "All Finished!";
                        this.overallProgress_Bar.Value += 1;
                        this.cancel_Button.Content = "Done";

                        this.Settings.TraingDone = true;
                        this.Settings.Save();

                        this.done = true;
                    }
                );
        }