Changeset 7758 for branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Timestamp:
- 04/24/12 15:22:13 (13 years ago)
- Location:
- branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs
r7683 r7758 46 46 } 47 47 48 public override void ImportProblemDataFromFile(string fileName) {49 RegressionProblemData problemData = RegressionProblemData.ImportFromFile(fileName);50 ProblemData = problemData;51 }52 53 48 public void Load(RegressionData data) { 54 49 Name = data.Name; -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r7603 r7758 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.IO;25 24 using System.Linq; 26 25 using HeuristicLab.Common; … … 29 28 using HeuristicLab.Parameters; 30 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 using HeuristicLab.Problems.Instances;32 30 33 31 namespace HeuristicLab.Problems.DataAnalysis { … … 137 135 OnChanged(); 138 136 } 139 140 #region Import from file141 public static RegressionProblemData ImportFromFile(string fileName) {142 TableFileParser csvFileParser = new TableFileParser();143 csvFileParser.Parse(fileName);144 145 Dataset dataset = new Dataset(csvFileParser.VariableNames, csvFileParser.Values);146 dataset.Name = Path.GetFileName(fileName);147 148 RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First());149 problemData.Name = "Data imported from " + Path.GetFileName(fileName);150 return problemData;151 }152 #endregion153 137 } 154 138 }
Note: See TracChangeset
for help on using the changeset viewer.