Changeset 14029 for branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views
- Timestamp:
- 07/08/16 14:40:02 (8 years ago)
- Location:
- branches/crossvalidation-2434
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crossvalidation-2434
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views
- Property svn:mergeinfo changed
-
branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs
r12720 r14029 43 43 44 44 protected override void UpdateModel(ISymbolicExpressionTree tree) { 45 var model = new SymbolicRegressionModel( tree, Content.Model.Interpreter, Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit);45 var model = new SymbolicRegressionModel(Content.ProblemData.TargetVariable, tree, Content.Model.Interpreter, Content.Model.LowerEstimationLimit, Content.Model.UpperEstimationLimit); 46 46 model.Scale(Content.ProblemData); 47 47 Content.Model = model; … … 73 73 var model = Content.Model; 74 74 SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(model.Interpreter, model.SymbolicExpressionTree, Content.ProblemData, Content.ProblemData.TrainingIndices, 75 applyLinearScaling: true, maxIterations: 50, up perEstimationLimit: model.UpperEstimationLimit, lowerEstimationLimit: model.LowerEstimationLimit);75 applyLinearScaling: true, maxIterations: 50, updateVariableWeights: true, lowerEstimationLimit: model.LowerEstimationLimit, upperEstimationLimit: model.UpperEstimationLimit); 76 76 UpdateModel(Content.Model.SymbolicExpressionTree); 77 77 } -
branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/Plugin.cs.frame
r12753 r14029 26 26 27 27 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views { 28 [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views", "Provides views for symbolic regression problem classes.", "3.4. 8.$WCREV$")]28 [Plugin("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views", "Provides views for symbolic regression problem classes.", "3.4.9.$WCREV$")] 29 29 [PluginFile("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4.dll",PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Algorithms.DataAnalysis", "3.4")] -
branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/Properties/AssemblyInfo.cs.frame
r12753 r14029 53 53 // by using the '*' as shown below: 54 54 [assembly: AssemblyVersion("3.4.0.0")] 55 [assembly: AssemblyFileVersion("3.4. 8.$WCREV$")]55 [assembly: AssemblyFileVersion("3.4.9.$WCREV$")] -
branches/crossvalidation-2434/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/SymbolicRegressionSolutionErrorCharacteristicsCurveView.cs
r12012 r14029 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 using System.Windows.Forms;25 25 using HeuristicLab.Algorithms.DataAnalysis; 26 26 using HeuristicLab.MainForm; … … 31 31 [Content(typeof(ISymbolicRegressionSolution))] 32 32 public partial class SymbolicRegressionSolutionErrorCharacteristicsCurveView : RegressionSolutionErrorCharacteristicsCurveView { 33 private IRegressionSolution linearRegressionSolution;34 33 public SymbolicRegressionSolutionErrorCharacteristicsCurveView() { 35 34 InitializeComponent(); … … 41 40 } 42 41 43 protected override void OnContentChanged() {44 if (Content != null)45 linearRegressionSolution = CreateLinearRegressionSolution();46 else47 linearRegressionSolution = null;48 49 base.OnContentChanged();50 }51 52 protected override void UpdateChart() {53 base.UpdateChart();54 if (Content == null || linearRegressionSolution == null) return;55 AddRegressionSolution(linearRegressionSolution);56 }57 58 42 private IRegressionSolution CreateLinearRegressionSolution() { 59 43 if (Content == null) throw new InvalidOperationException(); 60 44 double rmse, cvRmsError; 61 45 var problemData = (IRegressionProblemData)ProblemData.Clone(); 62 if (!problemData.TrainingIndices.Any()) return null; // don't create an LR model if the problem does not have a training set (e.g. loaded into an existing model)46 if (!problemData.TrainingIndices.Any()) return null; // don't create an LR model if the problem does not have a training set (e.g. loaded into an existing model) 63 47 64 48 //clear checked inputVariables … … 77 61 78 62 var solution = LinearRegression.CreateLinearRegressionSolution(problemData, out rmse, out cvRmsError); 79 solution.Name = " Linear Model";63 solution.Name = "Baseline (linear subset)"; 80 64 return solution; 81 65 } 82 66 83 protected override void Content_ModelChanged(object sender, EventArgs e) {84 linearRegressionSolution = CreateLinearRegressionSolution();85 base.Content_ModelChanged(sender, e);86 }87 67 88 protected override void Content_ProblemDataChanged(object sender, EventArgs e) {89 linearRegressionSolution = CreateLinearRegressionSolution();90 base.Content_ProblemDataChanged(sender, e);68 protected override IEnumerable<IRegressionSolution> CreateBaselineSolutions() { 69 foreach (var sol in base.CreateBaselineSolutions()) yield return sol; 70 yield return CreateLinearRegressionSolution(); 91 71 } 92 72 }
Note: See TracChangeset
for help on using the changeset viewer.