Changeset 10236
- Timestamp:
- 12/18/13 13:21:20 (11 years ago)
- Location:
- branches/DataPreprocessing
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj
r10221 r10236 84 84 <DependentUpon>DataPreprocessingView.cs</DependentUpon> 85 85 </Compile> 86 <Compile Include="Implementations\DataGridContent.cs" /> 86 87 <Compile Include="Implementations\PreprocessingContext.cs" /> 87 88 <Compile Include="Implementations\PreprocessingData.cs" /> 88 89 <Compile Include="Implementations\PreprocessingDataManipulation.cs" /> 90 <Compile Include="Implementations\SearchLogic.cs" /> 89 91 <Compile Include="Implementations\StatisticInfo.cs" /> 92 <Compile Include="DataGridContentView.cs"> 93 <SubType>UserControl</SubType> 94 </Compile> 95 <Compile Include="DataGridContentView.Designer.cs"> 96 <DependentUpon>DataGridContentView.cs</DependentUpon> 97 </Compile> 98 <Compile Include="Interfaces\IDataGridContent.cs" /> 90 99 <Compile Include="Interfaces\IPreprocessingContext.cs" /> 100 <Compile Include="Interfaces\ISearchLogic.cs" /> 91 101 <Compile Include="Interfaces\IStatisticInfo.cs" /> 92 102 <Compile Include="Interfaces\IPreprocessingData.cs" /> … … 122 132 <Private>False</Private> 123 133 </ProjectReference> 134 <ProjectReference Include="..\..\HeuristicLab.Data.Views\3.3\HeuristicLab.Data.Views-3.3.csproj"> 135 <Project>{72104a0b-90e7-42f3-9abe-9bbbadd4b943}</Project> 136 <Name>HeuristicLab.Data.Views-3.3</Name> 137 </ProjectReference> 124 138 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj"> 125 139 <Project>{bbab9df5-5ef3-4ba8-ade9-b36e82114937}</Project> … … 149 163 </ProjectReference> 150 164 </ItemGroup> 151 <ItemGroup /> 165 <ItemGroup> 166 <EmbeddedResource Include="DataPreprocessingView.resx"> 167 <DependentUpon>DataPreprocessingView.cs</DependentUpon> 168 </EmbeddedResource> 169 </ItemGroup> 152 170 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 153 171 <PropertyGroup> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingData.cs
r10235 r10236 102 102 } 103 103 104 public string GetCellAsString(string variableName, int row) { 105 return variableValues[variableName][row].ToString(); 106 } 107 104 108 public IEnumerable<T> GetValues<T>(string variableName) { 105 109 // TODO: test if cast is valid … … 145 149 } 146 150 147 public I Enumerable<string> VariableNames {151 public IList<string> VariableNames { 148 152 get { return variableNames; } 149 153 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/PreprocessingDataManipulation.cs
r10234 r10236 14 14 public PreprocessingDataManipulation(IPreprocessingData _prepocessingData) { 15 15 preprocessingData = _prepocessingData; 16 statisticInfo = new StatisticInfo(preprocessingData); 16 //todo 17 statisticInfo = new StatisticInfo(preprocessingData, new SearchLogic(preprocessingData)); 17 18 } 18 19 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/StatisticInfo.cs
r10216 r10236 7 7 public class StatisticInfo : IStatisticInfo { 8 8 9 private IPreprocessingData preprocessingData; 9 private readonly IPreprocessingData preprocessingData; 10 private readonly ISearchLogic searchLogic; 10 11 11 public StatisticInfo(IPreprocessingData thePreprocessingData ) {12 public StatisticInfo(IPreprocessingData thePreprocessingData, ISearchLogic theSearchLogic) { 12 13 preprocessingData = thePreprocessingData; 14 searchLogic = theSearchLogic; 13 15 } 14 16 … … 44 46 45 47 public int GetMissingValueCount(string variableName) { 46 return preprocessingData.GetMissingValueIndices(variableName).Count();48 return searchLogic.GetMissingValueIndices(variableName).Count(); 47 49 } 48 50 … … 103 105 int count = 0; 104 106 foreach (var variableName in preprocessingData.VariableNames) { 105 if ( preprocessingData.IsMissingValue(variableName, rowIndex)) {107 if (searchLogic.IsMissingValue(variableName, rowIndex)) { 106 108 ++count; 107 109 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IPreprocessingData.cs
r10221 r10236 30 30 T GetCell<T>(string variableName, int row); 31 31 void SetCell<T>(string variableName, int row, T value); 32 string GetCellAsString(string variableName, int row); 32 33 33 34 IEnumerable<T> GetValues<T>(string variableName); … … 43 44 IntRange TestPartition { get; } 44 45 45 I Enumerable<string> VariableNames { get; }46 IList<string> VariableNames { get; } 46 47 bool IsType<T>(string variableName); 47 48 … … 49 50 int Rows { get; } 50 51 51 /// <summary>52 /// Return the indices of the missing values where the key53 /// correspdonds to the variable name and the values to the row indices54 /// </summary>55 /// <returns></returns>56 IDictionary<string, IEnumerable<int>> GetMissingValueIndices();57 58 /// <summary>59 /// Return the row indices of the cells which contain a missing value60 /// </summary>61 /// <returns></returns>62 IEnumerable<int> GetMissingValueIndices(string variableName);63 64 bool IsMissingValue(string variableName, int rowIndex);65 66 52 Dataset ExportToDataset(); 67 53 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.Designer.cs
r10134 r10236 47 47 this.FeatureCorrelationButton = new System.Windows.Forms.Button(); 48 48 this.DataPreprocessingButton = new System.Windows.Forms.Button(); 49 this.button1 = new System.Windows.Forms.Button(); 49 50 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 50 51 this.SuspendLayout(); … … 82 83 this.DataPreprocessingButton.Click += new System.EventHandler(this.DataPreprocessingButton_Click); 83 84 // 85 // button1 86 // 87 this.button1.Location = new System.Drawing.Point(438, 45); 88 this.button1.Name = "button1"; 89 this.button1.Size = new System.Drawing.Size(49, 24); 90 this.button1.TabIndex = 6; 91 this.button1.Text = "Data Preprocessing"; 92 this.button1.UseVisualStyleBackColor = true; 93 this.button1.Click += new System.EventHandler(this.button1_Click); 94 // 84 95 // ProblemDataView 85 96 // 86 97 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 87 98 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 99 this.Controls.Add(this.button1); 88 100 this.Controls.Add(this.DataPreprocessingButton); 89 101 this.Controls.Add(this.FeatureCorrelationButton); … … 95 107 this.Controls.SetChildIndex(this.FeatureCorrelationButton, 0); 96 108 this.Controls.SetChildIndex(this.DataPreprocessingButton, 0); 109 this.Controls.SetChildIndex(this.button1, 0); 97 110 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 98 111 this.ResumeLayout(false); … … 105 118 protected System.Windows.Forms.Button FeatureCorrelationButton; 106 119 protected System.Windows.Forms.Button DataPreprocessingButton; 120 protected System.Windows.Forms.Button button1; 107 121 108 122 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.cs
r10235 r10236 123 123 return itemView.Content; 124 124 } 125 126 private void button1_Click(object sender, EventArgs e) { 127 Type viewType = MainFormManager.GetViewTypes(typeof(IDataGridContent), true).FirstOrDefault(t => typeof(DataGridContentView).IsAssignableFrom(t)); 128 MainFormManager.MainForm.ShowContent(new DataGridContent(new PreprocessingData(Content)), viewType); 129 } 125 130 } 126 131 } -
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Views/3.4/ProblemDataView.resx
r10134 r10236 121 121 <value>17, 17</value> 122 122 </metadata> 123 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">124 <value>17, 17</value>125 </metadata>126 123 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 124 <value>140, 17</value>
Note: See TracChangeset
for help on using the changeset viewer.