Changeset 2285 for trunk/sources/HeuristicLab.LinearRegression
- Timestamp:
- 08/13/09 17:28:07 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
r2270 r2285 69 69 } 70 70 71 public I Model Model {71 public IAnalyzerModel Model { 72 72 get { 73 73 if (!engine.Terminated) throw new InvalidOperationException("The algorithm is still running. Wait until the algorithm is terminated to retrieve the result."); … … 268 268 269 269 270 protected internal virtual Model CreateLRModel(IScope bestModelScope) { 271 Model model = new Model(); 270 protected internal virtual IAnalyzerModel CreateLRModel(IScope bestModelScope) { 271 IGeneticProgrammingModel tree = bestModelScope.GetVariableValue<IGeneticProgrammingModel>("LinearRegressionModel", false); 272 ITreeEvaluator evaluator = bestModelScope.GetVariableValue<ITreeEvaluator>("TreeEvaluator", false); 273 IAnalyzerModel model = new AnalyzerModel(); 274 model.Predictor = new Predictor(evaluator, tree); 272 275 model.TrainingMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TrainingQuality", false).Data; 273 276 model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data; … … 286 289 model.TestVarianceAccountedFor = bestModelScope.GetVariableValue<DoubleData>("TestVAF", false).Data; 287 290 288 model.Data = bestModelScope.GetVariableValue<IGeneticProgrammingModel>("LinearRegressionModel", false);289 291 HeuristicLab.DataAnalysis.Dataset ds = bestModelScope.GetVariableValue<Dataset>("Dataset", true); 290 292 model.Dataset = ds; … … 303 305 double impact = ((DoubleData)row[1]).Data; 304 306 model.SetVariableEvaluationImpact(variableName, impact); 305 model.AddInputVariable s(variableName);307 model.AddInputVariable(variableName); 306 308 } 307 309 foreach (ItemList row in qualityImpacts) { … … 309 311 double impact = ((DoubleData)row[1]).Data; 310 312 model.SetVariableQualityImpact(variableName, impact); 311 model.AddInputVariable s(variableName);313 model.AddInputVariable(variableName); 312 314 } 313 315
Note: See TracChangeset
for help on using the changeset viewer.