Changeset 15870 for branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Timestamp:
- 03/28/18 17:17:31 (7 years ago)
- Location:
- branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Files:
-
- 1 added
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2906_Transformations/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r15856 r15870 183 183 public override IDataAnalysisProblemData Transform() { 184 184 var transformedProblemData = (IRegressionProblemData)base.Transform(); 185 var targetVariable = GetTransformedTragetVariable(TargetVariable, Transformations);185 var targetVariable = RegressionTransformationModel.GetTransformedTragetVariable(TargetVariable, Transformations); 186 186 transformedProblemData.TargetVariable = targetVariable; 187 187 return transformedProblemData; … … 190 190 public override IDataAnalysisProblemData InverseTransform() { 191 191 var transformedProblemData = (IRegressionProblemData)base.InverseTransform(); 192 var targetVariable = GetOriginalTragetVariable(TargetVariable, Transformations);192 var targetVariable = RegressionTransformationModel.GetOriginalTragetVariable(TargetVariable, Transformations); 193 193 transformedProblemData.TargetVariable = targetVariable; 194 194 return transformedProblemData; 195 195 } 196 197 public static string GetTransformedTragetVariable(string originalTarget, IEnumerable<IDataAnalysisTransformation> transformations) {198 var transformedTarget = originalTarget;199 foreach (var transformation in transformations) {200 if (transformation.OriginalVariable == transformedTarget)201 transformedTarget = transformation.TransformedVariable;202 }203 return transformedTarget;204 }205 206 public static string GetOriginalTragetVariable(string transformedTarget, IEnumerable<IDataAnalysisTransformation> transformations) {207 var originalTarget = transformedTarget;208 foreach (var transformation in transformations.Reverse()) {209 if (transformation.TransformedVariable == originalTarget)210 originalTarget = transformation.OriginalVariable;211 }212 return originalTarget;213 }214 196 } 215 197 }
Note: See TracChangeset
for help on using the changeset viewer.