Changeset 8599
- Timestamp:
- 09/07/12 16:01:26 (12 years ago)
- Location:
- trunk/sources
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3
- Property svn:ignore
-
old new 1 1 Plugin.cs 2 bin 3 obj
-
- Property svn:ignore
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.Designer.cs
r8598 r8599 27 27 this.OkButton = new System.Windows.Forms.Button(); 28 28 this.CancelButton = new System.Windows.Forms.Button(); 29 this.TrainingTestTrackBar = new System.Windows.Forms.TrackBar(); 30 this.TrainingTestGroupBox = new System.Windows.Forms.GroupBox(); 31 this.TestLabel = new System.Windows.Forms.Label(); 32 this.TrainingLabel = new System.Windows.Forms.Label(); 33 ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).BeginInit(); 34 this.TrainingTestGroupBox.SuspendLayout(); 29 35 this.SuspendLayout(); 30 36 // … … 32 38 // 33 39 this.ShuffelDataCheckbox.AutoSize = true; 34 this.ShuffelDataCheckbox.Location = new System.Drawing.Point( 61, 12);40 this.ShuffelDataCheckbox.Location = new System.Drawing.Point(18, 12); 35 41 this.ShuffelDataCheckbox.Name = "ShuffelDataCheckbox"; 36 42 this.ShuffelDataCheckbox.Size = new System.Drawing.Size(91, 17); … … 42 48 // 43 49 this.OkButton.DialogResult = System.Windows.Forms.DialogResult.OK; 44 this.OkButton.Location = new System.Drawing.Point(1 2, 35);50 this.OkButton.Location = new System.Drawing.Point(18, 121); 45 51 this.OkButton.Name = "OkButton"; 46 52 this.OkButton.Size = new System.Drawing.Size(75, 23); … … 52 58 // 53 59 this.CancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 54 this.CancelButton.Location = new System.Drawing.Point(1 15, 35);60 this.CancelButton.Location = new System.Drawing.Point(142, 121); 55 61 this.CancelButton.Name = "CancelButton"; 56 62 this.CancelButton.Size = new System.Drawing.Size(75, 23); … … 59 65 this.CancelButton.UseVisualStyleBackColor = true; 60 66 // 67 // TrainingTestTrackBar 68 // 69 this.TrainingTestTrackBar.Location = new System.Drawing.Point(6, 19); 70 this.TrainingTestTrackBar.Maximum = 100; 71 this.TrainingTestTrackBar.Name = "TrainingTestTrackBar"; 72 this.TrainingTestTrackBar.Size = new System.Drawing.Size(210, 45); 73 this.TrainingTestTrackBar.TabIndex = 4; 74 this.TrainingTestTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; 75 this.TrainingTestTrackBar.Value = 66; 76 this.TrainingTestTrackBar.ValueChanged += new System.EventHandler(this.TrainingTestTrackBar_ValueChanged); 77 // 78 // TrainingTestGroupBox 79 // 80 this.TrainingTestGroupBox.Controls.Add(this.TestLabel); 81 this.TrainingTestGroupBox.Controls.Add(this.TrainingLabel); 82 this.TrainingTestGroupBox.Controls.Add(this.TrainingTestTrackBar); 83 this.TrainingTestGroupBox.Location = new System.Drawing.Point(4, 35); 84 this.TrainingTestGroupBox.Name = "TrainingTestGroupBox"; 85 this.TrainingTestGroupBox.Size = new System.Drawing.Size(222, 80); 86 this.TrainingTestGroupBox.TabIndex = 5; 87 this.TrainingTestGroupBox.TabStop = false; 88 this.TrainingTestGroupBox.Text = "Training/Test"; 89 // 90 // TestLabel 91 // 92 this.TestLabel.AutoSize = true; 93 this.TestLabel.Location = new System.Drawing.Point(108, 51); 94 this.TestLabel.Name = "TestLabel"; 95 this.TestLabel.Size = new System.Drawing.Size(57, 13); 96 this.TestLabel.TabIndex = 6; 97 this.TestLabel.Text = "Test: 34 %"; 98 // 99 // TrainingLabel 100 // 101 this.TrainingLabel.AutoSize = true; 102 this.TrainingLabel.Location = new System.Drawing.Point(11, 51); 103 this.TrainingLabel.Name = "TrainingLabel"; 104 this.TrainingLabel.Size = new System.Drawing.Size(74, 13); 105 this.TrainingLabel.TabIndex = 5; 106 this.TrainingLabel.Text = "Training: 66 %"; 107 // 61 108 // DataAnalysisImportTypeDialog 62 109 // 63 110 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 64 111 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 65 this.ClientSize = new System.Drawing.Size(2 02, 69);112 this.ClientSize = new System.Drawing.Size(229, 151); 66 113 this.Controls.Add(this.CancelButton); 67 114 this.Controls.Add(this.OkButton); 68 115 this.Controls.Add(this.ShuffelDataCheckbox); 116 this.Controls.Add(this.TrainingTestGroupBox); 69 117 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; 70 118 this.Name = "DataAnalysisImportTypeDialog"; 71 119 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 72 120 this.Text = "DataAnalysisImportTypeDialog"; 121 ((System.ComponentModel.ISupportInitialize)(this.TrainingTestTrackBar)).EndInit(); 122 this.TrainingTestGroupBox.ResumeLayout(false); 123 this.TrainingTestGroupBox.PerformLayout(); 73 124 this.ResumeLayout(false); 74 125 this.PerformLayout(); 126 75 127 } 76 128 … … 80 132 protected System.Windows.Forms.Button OkButton; 81 133 protected System.Windows.Forms.Button CancelButton; 134 private System.Windows.Forms.TrackBar TrainingTestTrackBar; 135 private System.Windows.Forms.GroupBox TrainingTestGroupBox; 136 private System.Windows.Forms.Label TestLabel; 137 private System.Windows.Forms.Label TrainingLabel; 82 138 83 139 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisImportTypeDialog.cs
r8598 r8599 25 25 public partial class DataAnalysisImportTypeDialog : Form { 26 26 27 public bool Shuffel { get { return ShuffelDataCheckbox.Checked; } } 27 public DataAnalysisImportType ImportType { 28 get { 29 return new DataAnalysisImportType() { 30 Shuffle = ShuffelDataCheckbox.Checked, 31 Training = TrainingTestTrackBar.Value 32 }; 33 } 34 } 28 35 29 36 public DataAnalysisImportTypeDialog() { 30 37 InitializeComponent(); 31 38 } 39 40 private void TrainingTestTrackBar_ValueChanged(object sender, System.EventArgs e) { 41 TrainingLabel.Text = "Training: " + TrainingTestTrackBar.Value + " %"; 42 TestLabel.Text = "Test: " + (TrainingTestTrackBar.Maximum - TrainingTestTrackBar.Value) + " %"; 43 } 32 44 } 33 45 } -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/DataAnalysisInstanceConsumerView.cs
r8598 r8599 25 25 using HeuristicLab.MainForm; 26 26 using HeuristicLab.Problems.DataAnalysis; 27 using HeuristicLab.Problems.Instances.DataAnalysis;28 using HeuristicLab.Problems.Instances.DataAnalysis.Views;29 27 using HeuristicLab.Problems.Instances.Views; 30 28 … … 55 53 DataAnalysisImportTypeDialog importTypeDialog = new DataAnalysisImportTypeDialog(); 56 54 if (importTypeDialog.ShowDialog() == DialogResult.OK) { 57 instance = provider.ImportData(openFileDialog.FileName, new DataAnalysisImportType() { Shuffle = importTypeDialog.Shuffel });55 instance = provider.ImportData(openFileDialog.FileName, importTypeDialog.ImportType); 58 56 } else { 59 57 return; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis.Views/3.3/HeuristicLab.Problems.Instances.DataAnalysis.Views-3.3.csproj
r8598 r8599 55 55 <DependentUpon>DataAnalysisImportTypeDialog.cs</DependentUpon> 56 56 </Compile> 57 <Compile Include="DataAnalysisInstanceConsumerView.cs" /> 57 <Compile Include="DataAnalysisInstanceConsumerView.cs"> 58 <SubType>UserControl</SubType> 59 </Compile> 58 60 <Compile Include="DataAnalysisInstanceConsumerView.Designer.cs"> 59 61 <DependentUpon>DataAnalysisInstanceConsumerView.cs</DependentUpon> -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/CSV/ClassifiactionCSVInstanceProvider.cs
r8598 r8599 70 70 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 71 71 foreach (var variableName in dataset.DoubleVariables) { 72 if ( dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&72 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 73 73 variableName != targetVar) 74 74 allowedInputVars.Add(variableName); … … 102 102 // turn of input variables that are constant in the training partition 103 103 var allowedInputVars = new List<string>(); 104 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 104 int trainingPartEnd = (csvFileParser.Rows * type.Training) / 100; 105 var trainingIndizes = Enumerable.Range(0, trainingPartEnd); 105 106 foreach (var variableName in dataset.DoubleVariables) { 106 if ( dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&107 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 107 108 variableName != targetVar) 108 109 allowedInputVars.Add(variableName); … … 111 112 ClassificationProblemData classificationData = new ClassificationProblemData(dataset, allowedInputVars, targetVar); 112 113 113 int trainingPartEnd = trainingIndizes.Last(); 114 classificationData.TrainingPartition.Start = trainingIndizes.First(); 114 classificationData.TrainingPartition.Start = 0; 115 115 classificationData.TrainingPartition.End = trainingPartEnd; 116 116 classificationData.TestPartition.Start = trainingPartEnd; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Clustering/CSV/ClusteringCSVInstanceProvider.cs
r8598 r8599 69 69 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 70 70 foreach (var variableName in dataset.DoubleVariables) { 71 if ( dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&71 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 72 72 variableName != targetVar) 73 73 allowedInputVars.Add(variableName); … … 101 101 // turn of input variables that are constant in the training partition 102 102 var allowedInputVars = new List<string>(); 103 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 103 int trainingPartEnd = (csvFileParser.Rows * type.Training) / 100; 104 var trainingIndizes = Enumerable.Range(0, trainingPartEnd); 104 105 foreach (var variableName in dataset.DoubleVariables) { 105 if ( dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&106 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 106 107 variableName != targetVar) 107 108 allowedInputVars.Add(variableName); … … 110 111 ClusteringProblemData clusteringData = new ClusteringProblemData(dataset, allowedInputVars); 111 112 112 int trainingPartEnd = trainingIndizes.Last(); 113 clusteringData.TrainingPartition.Start = trainingIndizes.First(); 113 clusteringData.TrainingPartition.Start = 0; 114 114 clusteringData.TrainingPartition.End = trainingPartEnd; 115 115 clusteringData.TestPartition.Start = trainingPartEnd; -
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Regression/CSV/RegressionCSVInstanceProvider.cs
r8598 r8599 68 68 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 69 69 foreach (var variableName in dataset.DoubleVariables) { 70 if ( dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&70 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 71 71 variableName != targetVar) 72 72 allowedInputVars.Add(variableName); … … 99 99 // turn of input variables that are constant in the training partition 100 100 var allowedInputVars = new List<string>(); 101 var trainingIndizes = Enumerable.Range(0, (csvFileParser.Rows * 2) / 3); 101 int trainingPartEnd = (csvFileParser.Rows * type.Training) / 100; 102 var trainingIndizes = Enumerable.Range(0, trainingPartEnd); 102 103 foreach (var variableName in dataset.DoubleVariables) { 103 if ( dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 &&104 if (trainingIndizes.Count() >= 2 && dataset.GetDoubleValues(variableName, trainingIndizes).Range() > 0 && 104 105 variableName != targetVar) 105 106 allowedInputVars.Add(variableName); … … 108 109 RegressionProblemData regressionData = new RegressionProblemData(dataset, allowedInputVars, targetVar); 109 110 110 int trainingPartEnd = trainingIndizes.Last(); 111 regressionData.TrainingPartition.Start = trainingIndizes.First(); 111 regressionData.TrainingPartition.Start = 0; 112 112 regressionData.TrainingPartition.End = trainingPartEnd; 113 113 regressionData.TestPartition.Start = trainingPartEnd;
Note: See TracChangeset
for help on using the changeset viewer.