- Timestamp:
- 09/01/09 11:09:50 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
r2290 r2319 237 237 #endregion 238 238 239 HeuristicLab.GP.StructureIdentification.VariableEvaluationImpactCalculator evalImpactCalc = new HeuristicLab.GP.StructureIdentification.VariableEvaluationImpactCalculator(); 240 evalImpactCalc.GetVariableInfo("TrainingSamplesStart").ActualName = "ActualTrainingSamplesStart"; 241 evalImpactCalc.GetVariableInfo("TrainingSamplesEnd").ActualName = "ActualTrainingSamplesEnd"; 242 evalImpactCalc.GetVariableInfo("FunctionTree").ActualName = "LinearRegressionModel"; 243 HeuristicLab.Modeling.VariableQualityImpactCalculator qualImpactCalc = new HeuristicLab.GP.StructureIdentification.VariableQualityImpactCalculator(); 244 qualImpactCalc.GetVariableInfo("TrainingSamplesStart").ActualName = "ActualTrainingSamplesStart"; 245 qualImpactCalc.GetVariableInfo("TrainingSamplesEnd").ActualName = "ActualTrainingSamplesEnd"; 246 qualImpactCalc.GetVariableInfo("FunctionTree").ActualName = "LinearRegressionModel"; 239 VariableNamesExtractor namesExtractor = new VariableNamesExtractor(); 240 namesExtractor.GetVariableInfo("FunctionTree").ActualName = "LinearRegressionModel"; 241 namesExtractor.GetVariableInfo("VariableNames").ActualName = "InputVariableNames"; 242 PredictorBuilder predictorBuilder = new PredictorBuilder(); 243 predictorBuilder.GetVariableInfo("FunctionTree").ActualName = "LinearRegressionModel"; 244 VariableEvaluationImpactCalculator evalImpactCalc = new VariableEvaluationImpactCalculator(); 245 evalImpactCalc.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart"; 246 evalImpactCalc.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd"; 247 VariableQualityImpactCalculator qualImpactCalc = new VariableQualityImpactCalculator(); 248 qualImpactCalc.GetVariableInfo("SamplesStart").ActualName = "ActualTrainingSamplesStart"; 249 qualImpactCalc.GetVariableInfo("SamplesEnd").ActualName = "ActualTrainingSamplesEnd"; 247 250 seqProc.AddSubOperator(trainingMSE); 248 251 seqProc.AddSubOperator(validationMSE); … … 260 263 seqProc.AddSubOperator(validationVAF); 261 264 seqProc.AddSubOperator(testVAF); 265 seqProc.AddSubOperator(namesExtractor); 266 seqProc.AddSubOperator(predictorBuilder); 262 267 seqProc.AddSubOperator(qualImpactCalc); 263 268 seqProc.AddSubOperator(evalImpactCalc); … … 269 274 270 275 protected internal virtual IAnalyzerModel CreateLRModel(IScope bestModelScope) { 271 IGeneticProgrammingModel tree = bestModelScope.GetVariableValue<IGeneticProgrammingModel>("LinearRegressionModel", false);272 ITreeEvaluator evaluator = bestModelScope.GetVariableValue<ITreeEvaluator>("TreeEvaluator", true);273 276 IAnalyzerModel model = new AnalyzerModel(); 274 model.Predictor = new Predictor(evaluator, tree);277 model.Predictor = bestModelScope.GetVariableValue<IPredictor>("Predictor", true); 275 278 model.TrainingMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("TrainingQuality", false).Data; 276 279 model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data;
Note: See TracChangeset
for help on using the changeset viewer.