Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/31/17 20:01:02 (6 years ago)
Author:
gkronber
Message:

#2789: added cross-validation and automatic determination of regularization parameter (naive CV is slow!).

Research produced ACM Algorithm 642.f (Fortran) for univariate cubic spline smoothing with generalized cross-validation in O(n) described in HUTCHINSON, M. F., AND DE HOOG, F.R. Smoothing noisy data with spline functions. Numer. Math. 4 7 (1985), 99-106. (TODO: translate to C#)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/MathNetNumerics-Exploration-2789/HeuristicLab.Algorithms.DataAnalysis.Experimental/GAM.cs

    r15436 r15442  
    218218          product = product.Zip(problemData.Dataset.GetDoubleValues(inputVars[i], problemData.TrainingIndices), (pi, vi) => pi * vi).ToArray();
    219219        }
    220         // Umständlich!
    221         return Splines.CalculatePenalizedRegressionSpline(
     220        double optTolerance, looRMSE;
     221        return Splines.CalculateSmoothingSplineReinsch(
    222222          product,
    223           (double[])target.Clone(), lambda,
    224           problemData.TargetVariable, inputVars
     223          (double[])target.Clone(), inputVars,
     224          problemData.TargetVariable,
     225          out optTolerance, out looRMSE
    225226          );
    226227      } else return new ConstantModel(target.Average(), problemData.TargetVariable);
Note: See TracChangeset for help on using the changeset viewer.