예제 #1
0
        ///// <summary>
        ///// Update grid with new data
        ///// </summary>
        ///// <param name="y"></param>
        //public void FillGPPredictionResult(double[][] y)
        //{
        //    // FillGPPredictionResult(y[0]);
        //    if(Projects==null && y!=null && y.Length>0)
        //    {
        //        FillGPPredictionResult(y[0]);
        //        return;
        //    }

        //    var colOut=Projects.GetColumnOutputCount();
        //     var cols= Projects.GetColumnsFromOutput();
        //     for (int i = 0; i < listView1.Items.Count; i++)
        //     {
        //         var row = listView1.Items[i];
        //         for (int j = 0; j < colOut; j++)
        //         {
        //             var c = cols[j];
        //             double Ymodel = y[j][i];
        //             if (c.ColumnDataType== ColumnDataType.Categorical)
        //             {
        //               var str=  c.GetCategoryFromNumeric(Ymodel, null);
        //               row.SubItems[row.SubItems.Count - colOut + j].Text = str;
        //             }
        //             else if(c.ColumnDataType== ColumnDataType.Binary)
        //             {
        //                 var str = c.GetBinaryClassFromNumeric(Ymodel, null);
        //                 row.SubItems[row.SubItems.Count - colOut + j].Text = str;
        //             }
        //             else
        //                row.SubItems[row.SubItems.Count - colOut+j].Text = Math.Round(Ymodel, 5).ToString();
        //         }
        //     }
        //}



        public void ReportProgress(TestPanelData data)
        {
            if (this.InvokeRequired)
            {
                // Execute the same method, but this time on the GUI thread
                this.Invoke(
                    new Action(() =>
                {
                    ReportProgressSync(data);
                }
                               ));
            }
            else
            {
                ReportProgressSync(data);
            }
        }
예제 #2
0
        /// <summary>
        /// Deserilization of run condition
        /// </summary>
        /// <param name="p"></param>
        public void ActivatePanel(TestPanelData data)
        {
            //clear previous data if exist
            this.zedModel.GraphPane.CurveList.Clear();
            //
            this.zedModel.GraphPane.CurveList.Add(data.gpCalculateOutput);
            this.zedModel.GraphPane.CurveList.Add(data.experimentalData);
            this.zedModel.GraphPane.AxisChange(this.CreateGraphics());



            if (data.OutputType != BasicTypes.ColumnType.Numeric)
            {
                for (int i = 0; i < data.experimentalData.Points.Count; i++)
                {
                    if (data.experimentalData.Points[i].Y > max)
                    {
                        max = data.experimentalData.Points[i].Y;
                    }
                }
                Classes = data.Classes;
                zedModel.GraphPane.YAxis.ScaleFormatEvent += YAxis_ScaleFormatEvent;
            }
            else
            {
                zedModel.GraphPane.YAxis.Scale.MaxAuto = true;
                zedModel.GraphPane.YAxis.Scale.MinAuto = true;

                zedModel.GraphPane.YAxis.MajorGrid.IsVisible = false;
                zedModel.GraphPane.XAxis.MajorGrid.IsVisible = false;

                zedModel.GraphPane.YAxis.Scale.MajorStepAuto = true;
                zedModel.GraphPane.YAxis.Scale.MinorStepAuto = true;

                zedModel.GraphPane.XAxis.Scale.MajorStep = 1;
                zedModel.GraphPane.XAxis.Scale.MinorStep = 0;
            }
            zedModel.GraphPane.YAxis.Title.Text = data.Label;
            this.zedModel.RestoreScale(zedModel.GraphPane);
        }
예제 #3
0
 public void ReportProgressSync(TestPanelData data)
 {
     //eb_currentIteration.Text = data.CurrentIteration.ToString(CultureInfo.InvariantCulture);
     //eb_currentFitness.Text = data.BestFitness.ToString(CultureInfo.InvariantCulture);
     //eb_bestSolutionFound.Text = data.ChangedAtGeneration.ToString(CultureInfo.InvariantCulture);
 }