Esempio n. 1
0
        public Page(int Number, Dendogram D)
        {
            InitializeComponent();
            ChangeNumber(Number);
            d   = D;
            btm = d.GetPicture(d.AutoCount);
            pictureBox.Width       = btm.Width;
            pictureBox.Height      = btm.Height;
            pictureBox.Image       = btm;
            countOfClustersTB.Text = d.AutoCount.ToString();
            infoOfClustersRTB.Text = GetInfoOfClusters();
            pictureBox.Show();
            double F1 = (AnalysisOfClustering.F1(d.fullData, d.clusters));
            double F2 = (AnalysisOfClustering.F4(d.fullData, d.clusters));

            F1Lb.Text = F1.ToString();
            F2Lb.Text = F2.ToString() + "\n" + (F1 / F2).ToString();
            string s1 = ""; string s2 = "";

            for (int i = 1; i <= d.fullData.Count; i++)
            {
                btm = d.GetPicture(i);
                s1 += (AnalysisOfClustering.F1(d.fullData, d.clusters)).ToString() + "\t";
                s2 += (AnalysisOfClustering.F4(d.fullData, d.clusters)).ToString() + "\t";
            }
            infoOfClustersRTB.Text += "F1:" + s1 + "\n";
            infoOfClustersRTB.Text += "F2:" + s2 + "\n";
        }
Esempio n. 2
0
        private void ExecuteBtn_Click_1(object sender, EventArgs e)
        {
            int countOfClusters;

            if (Int32.TryParse(countOfClustersTB.Text, out countOfClusters))
            {
                btm = d.GetPicture(countOfClusters);
                pictureBox.Image       = d.GetPicture(countOfClusters);
                infoOfClustersRTB.Text = GetInfoOfClusters();
                double F1 = (AnalysisOfClustering.F1(d.fullData, d.clusters));
                double F2 = (AnalysisOfClustering.F4(d.fullData, d.clusters));
                F1Lb.Text = F1.ToString();
                F2Lb.Text = F2.ToString() + "\n" + (F1 / F2).ToString();
            }
            else
            {
                MessageBox.Show("Not digital count of clusters");
            }
        }