Changeset 7823 for trunk/sources/HeuristicLab.Problems.DataAnalysis
- Timestamp:
- 05/15/12 13:54:24 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/ProblemInstancesRegressionAndClassification (added) merged: 7568-7572,7603,7605-7607,7610,7664-7667,7682-7685,7687,7698,7748-7755,7757-7759,7770-7774,7794,7805,7809-7810
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis (added) merged: 7570,7572,7603,7610,7664,7682-7683,7687,7750,7758-7759,7770-7771,7805,7809-7810
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r7678 r7823 180 180 <Compile Include="Implementation\Regression\RegressionSolution.cs" /> 181 181 <Compile Include="Plugin.cs" /> 182 <Compile Include="TableFileParser.cs" />183 182 <Compile Include="Implementation\Classification\ThresholdCalculators\AccuracyMaximizationThresholdCalculator.cs" /> 184 183 <Compile Include="Implementation\Classification\ThresholdCalculators\NormalDistributionCutPointsThresholdCalculator.cs" /> … … 236 235 <Name>HeuristicLab.PluginInfrastructure-3.3</Name> 237 236 <Private>False</Private> 237 </ProjectReference> 238 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj"> 239 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project> 240 <Name>HeuristicLab.Problems.Instances-3.3</Name> 238 241 </ProjectReference> 239 242 </ItemGroup> -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs
r7259 r7823 40 40 ProblemData = new ClassificationProblemData(); 41 41 } 42 43 public override void ImportProblemDataFromFile(string fileName) {44 ClassificationProblemData problemData = ClassificationProblemData.ImportFromFile(fileName);45 ProblemData = problemData;46 }47 42 } 48 43 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r7266 r7823 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO;25 24 using System.Linq; 26 25 using HeuristicLab.Common; … … 403 402 } 404 403 #endregion 405 406 #region Import from file407 public static ClassificationProblemData ImportFromFile(string fileName) {408 TableFileParser csvFileParser = new TableFileParser();409 csvFileParser.Parse(fileName);410 411 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);412 dataset.Name = Path.GetFileName(fileName);413 414 ClassificationProblemData problemData = new ClassificationProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());415 problemData.Name = "Data imported from " + Path.GetFileName(fileName);416 return problemData;417 }418 #endregion419 404 } 420 405 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblem.cs
r7259 r7823 38 38 ProblemData = new ClusteringProblemData(); 39 39 } 40 41 public override void ImportProblemDataFromFile(string fileName) {42 ClusteringProblemData problemData = ClusteringProblemData.ImportFromFile(fileName);43 ProblemData = problemData;44 }45 40 } 46 41 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
r7259 r7823 21 21 22 22 using System.Collections.Generic; 23 using System.IO;24 23 using HeuristicLab.Common; 25 24 using HeuristicLab.Core; … … 90 89 : base(dataset, allowedInputVariables) { 91 90 } 92 93 94 #region Import from file95 public static ClusteringProblemData ImportFromFile(string fileName) {96 TableFileParser csvFileParser = new TableFileParser();97 csvFileParser.Parse(fileName);98 99 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);100 dataset.Name = Path.GetFileName(fileName);101 102 ClusteringProblemData problemData = new ClusteringProblemData(dataset, dataset.DoubleVariables);103 problemData.Name = "Data imported from " + Path.GetFileName(fileName);104 return problemData;105 }106 #endregion107 91 } 108 92 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs
r7259 r7823 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Problems.Instances; 28 29 29 30 namespace HeuristicLab.Problems.DataAnalysis { 30 31 [StorableClass] 31 public abstract class DataAnalysisProblem<T> : Problem, 32 I DataAnalysisProblem<T>32 public abstract class DataAnalysisProblem<T> : Problem, IDataAnalysisProblem<T>, 33 IProblemInstanceConsumer<T>, IProblemInstanceExporter<T> 33 34 where T : class, IDataAnalysisProblemData { 34 35 private const string ProblemDataParameterName = "ProblemData"; … … 91 92 } 92 93 93 public abstract void ImportProblemDataFromFile(string fileName); 94 #region Import & Export 95 public void Load(T data) { 96 Name = data.Name; 97 Description = data.Description; 98 ProblemData = data; 99 OnReset(); 100 } 101 102 public T Export() { 103 return ProblemData; 104 } 105 #endregion 94 106 } 95 107 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs
r7259 r7823 40 40 ProblemData = new RegressionProblemData(); 41 41 } 42 43 public override void ImportProblemDataFromFile(string fileName) {44 RegressionProblemData problemData = RegressionProblemData.ImportFromFile(fileName);45 ProblemData = problemData;46 }47 42 } 48 43 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r7259 r7823 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO;25 24 using System.Linq; 26 25 using HeuristicLab.Common; … … 136 135 OnChanged(); 137 136 } 138 139 #region Import from file140 public static RegressionProblemData ImportFromFile(string fileName) {141 TableFileParser csvFileParser = new TableFileParser();142 csvFileParser.Parse(fileName);143 144 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);145 dataset.Name = Path.GetFileName(fileName);146 147 RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());148 problemData.Name = "Data imported from " + Path.GetFileName(fileName);149 return problemData;150 }151 #endregion152 137 } 153 138 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblem.cs
r7259 r7823 29 29 IDataAnalysisProblemData ProblemData { get; } 30 30 event EventHandler ProblemDataChanged; 31 32 void ImportProblemDataFromFile(string fileName);33 31 } 34 32 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Plugin.cs.frame
r7259 r7823 36 36 [PluginDependency("HeuristicLab.Parameters", "3.3")] 37 37 [PluginDependency("HeuristicLab.Persistence", "3.3")] 38 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] 38 39 public class HeuristicLabProblemsDataAnalysisPlugin : PluginBase { 39 40 }
Note: See TracChangeset
for help on using the changeset viewer.