Changeset 7758 for branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering
- Timestamp:
- 04/24/12 15:22:13 (13 years ago)
- Location:
- branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblem.cs
r7259 r7758 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 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Clustering/ClusteringProblemData.cs
r7603 r7758 21 21 22 22 using System.Collections.Generic; 23 using System.IO;24 23 using HeuristicLab.Common; 25 24 using HeuristicLab.Core; 26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Problems.Instances;28 26 29 27 namespace HeuristicLab.Problems.DataAnalysis { … … 91 89 : base(dataset, allowedInputVariables) { 92 90 } 93 94 95 #region Import from file96 public static ClusteringProblemData ImportFromFile(string fileName) {97 TableFileParser csvFileParser = new TableFileParser();98 csvFileParser.Parse(fileName);99 100 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);101 dataset.Name = Path.GetFileName(fileName);102 103 ClusteringProblemData problemData = new ClusteringProblemData(dataset, dataset.DoubleVariables);104 problemData.Name = "Data imported from " + Path.GetFileName(fileName);105 return problemData;106 }107 #endregion108 91 } 109 92 }
Note: See TracChangeset
for help on using the changeset viewer.