Changeset 7842 for branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Timestamp:
- 05/16/12 16:28:49 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
- Property svn:mergeinfo changed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs
r7268 r7842 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 } -
branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r7268 r7842 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 }
Note: See TracChangeset
for help on using the changeset viewer.