Changeset 17812 for trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/GAM/GeneralizedAdditiveModelAlgorithm.cs
- Timestamp:
- 12/31/20 15:45:14 (4 years ago)
- Location:
- trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/GAM
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/GAM/GeneralizedAdditiveModelAlgorithm.cs
r15775 r17812 25 25 using System.Linq; 26 26 using System.Threading; 27 using HEAL.Attic; 27 28 using HeuristicLab.Analysis; 28 29 using HeuristicLab.Common; … … 31 32 using HeuristicLab.Optimization; 32 33 using HeuristicLab.Parameters; 33 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;34 34 using HeuristicLab.Problems.DataAnalysis; 35 35 using HeuristicLab.Random; 36 36 37 37 namespace HeuristicLab.Algorithms.DataAnalysis { 38 [Item("Generalized Additive Model (GAM)", 39 "Generalized Additive Model Algorithm")] 40 [StorableClass] 38 [Item("Generalized Additive Model (GAM)", "Generalized additive model using uni-variate penalized regression splines as base learner.")] 39 [StorableType("98A887E7-73DD-4602-BD6C-2F6B9E6FBBC5")] 41 40 [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 600)] 42 41 public sealed class GeneralizedAdditiveModelAlgorithm : FixedDataAnalysisAlgorithm<IRegressionProblem> { … … 104 103 105 104 [StorableConstructor] 106 private GeneralizedAdditiveModelAlgorithm( booldeserializing)105 private GeneralizedAdditiveModelAlgorithm(StorableConstructorFlag deserializing) 107 106 : base(deserializing) { 108 107 } … … 228 227 alglib.spline1dinterpolant s; 229 228 alglib.spline1dfitreport rep; 230 int numKnots = (int)Math.Min(50, 3 * Math.Sqrt(x.Length)); // heuristic for number of knots ( forgot the source, but it is probably the R documentation orElements of Statistical Learning)229 int numKnots = (int)Math.Min(50, 3 * Math.Sqrt(x.Length)); // heuristic for number of knots (Elements of Statistical Learning) 231 230 232 231 alglib.spline1dfitpenalized(x, y, numKnots, lambda, out info, out s, out rep);
Note: See TracChangeset
for help on using the changeset viewer.