Changeset 2454 for trunk/sources/HeuristicLab.LinearRegression
- Timestamp:
- 10/29/09 16:07:55 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.LinearRegression/3.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearClassification.cs
r2363 r2454 54 54 } 55 55 56 protected override IAnalyzerModel CreateLRModel(IScope bestModelScope) { 57 var model = new AnalyzerModel(); 56 protected override void CreateSpecificLRModel(IScope bestModelScope, IAnalyzerModel model) { 58 57 DefaultClassificationOperators.PopulateAnalyzerModel(bestModelScope, model); 59 return model;60 58 } 61 59 } -
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
r2440 r2454 215 215 seq.AddSubOperator(namesExtractor); 216 216 seq.AddSubOperator(predictorBuilder); 217 VariableQualityImpactCalculator qualityImpactCalculator = new VariableQualityImpactCalculator(); 218 qualityImpactCalculator.GetVariableInfo("SamplesStart").ActualName = "TrainingSamplesStart"; 219 qualityImpactCalculator.GetVariableInfo("SamplesEnd").ActualName = "TrainingSamplesEnd"; 220 221 seq.AddSubOperator(qualityImpactCalculator); 217 222 #endregion 218 223 219 224 seq.AddSubOperator(CreateModelAnalyzerOperator()); 225 226 227 220 228 221 229 op.OperatorGraph.AddOperator(seq); … … 230 238 protected virtual IAnalyzerModel CreateLRModel(IScope bestModelScope) { 231 239 var model = new AnalyzerModel(); 240 CreateSpecificLRModel(bestModelScope, model); 241 #region variable impacts 242 ItemList qualityImpacts = bestModelScope.GetVariableValue<ItemList>(ModelingResult.VariableQualityImpact.ToString(), false); 243 foreach (ItemList row in qualityImpacts) { 244 string variableName = ((StringData)row[0]).Data; 245 double impact = ((DoubleData)row[1]).Data; 246 model.SetVariableResult(ModelingResult.VariableQualityImpact, variableName, impact); 247 model.AddInputVariable(variableName); 248 } 249 #endregion 250 return model; 251 } 252 253 protected virtual void CreateSpecificLRModel(IScope bestModelScope, IAnalyzerModel model) { 232 254 DefaultRegressionOperators.PopulateAnalyzerModel(bestModelScope, model); 233 return model;234 255 } 235 256 … … 257 278 #region persistence 258 279 public override object Clone(IDictionary<Guid, object> clonedObjects) { 259 LinearRegression clone = (LinearRegression) 280 LinearRegression clone = (LinearRegression)base.Clone(clonedObjects); 260 281 clone.engine = (IEngine)Auxiliary.Clone(Engine, clonedObjects); 261 282 return clone; -
trunk/sources/HeuristicLab.LinearRegression/3.2/LinearTimeSeriesPrognosis.cs
r2363 r2454 73 73 } 74 74 75 protected override IAnalyzerModel CreateLRModel(IScope bestModelScope) { 76 var model = new AnalyzerModel(); 75 protected override void CreateSpecificLRModel(IScope bestModelScope, IAnalyzerModel model) { 77 76 DefaultTimeSeriesOperators.PopulateAnalyzerModel(bestModelScope, model); 78 return model;79 77 } 80 78 }
Note: See TracChangeset
for help on using the changeset viewer.