Free cookie consent management tool by TermsFeed Policy Generator

Changeset 18238


Ignore:
Timestamp:
03/15/22 10:09:28 (3 years ago)
Author:
pfleck
Message:

#3040 Print MSE progress for constant opt in simplifier.

Location:
branches/3040_VectorBasedGP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views/3.4/InteractiveSymbolicRegressionSolutionSimplifierView.cs

    r17786 r18238  
    7474            double newProgressValue = progress.ProgressValue + (1.0 / (constOptIterations + 2) / maxRepetitions); // (constOptIterations + 2) iterations are reported
    7575            progress.ProgressValue = Math.Min(newProgressValue, 1.0);
     76            progress.Message = $"MSE: { func / regressionProblemData.TrainingPartition.Size }";
    7677          });
    7778        result = SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(model.Interpreter, tree,
     
    9495      return TensorFlowConstantOptimizationEvaluator.OptimizeTree(tree, regressionProblemData,
    9596        regressionProblemData.TrainingIndices,
    96         applyLinearScaling: false, updateVariableWeights: true, maxIterations: maxIterations, learningRate: learningRate,
     97        applyLinearScaling: true, updateVariableWeights: true, maxIterations: maxIterations, learningRate: learningRate,
    9798        cancellationToken: cancellationToken,
    9899        progress: new SynchronousProgress<double>(cost => {
     
    125126            double newProgressValue = progress.ProgressValue + (1.0 / (constOptIterations + 2) / maxRepetitions); // (constOptIterations + 2) iterations are reported
    126127            progress.ProgressValue = Math.Min(newProgressValue, 1.0);
     128            progress.Message = $"MSE: { func / regressionProblemData.TrainingPartition.Size }";
    127129          });
    128130        result = SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(model.Interpreter, tree,
     
    155157            double newProgressValue = progress.ProgressValue + (1.0 / (constOptIterations + 2) / maxRepetitions); // (constOptIterations + 2) iterations are reported
    156158            progress.ProgressValue = Math.Min(newProgressValue, 1.0);
     159            progress.Message = $"MSE: { func / regressionProblemData.TrainingPartition.Size }";
    157160          });
    158161        result = SymbolicRegressionSingleObjectivePearsonRSquaredEvaluator.Calculate(model.Interpreter, tree,
  • branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Converters/TreeToTensorConverter.cs

    r18237 r18238  
    256256          var beta_arr = np.array(0.0f).reshape(1, 1);
    257257          var beta = tf.Variable(beta_arr, name: "beta", dtype: DataType);
     258          variables.Add(beta);
    258259          variables.Add(alpha);
    259           variables.Add(beta);
    260260          var t = ConvertNode(node.GetSubtree(0));
    261261          prediction = t * alpha + beta;
Note: See TracChangeset for help on using the changeset viewer.