Changeset 15169 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis
- Timestamp:
- 07/07/17 14:12:44 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelRidgeRegression.cs
r15164 r15169 29 29 using HeuristicLab.Parameters; 30 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 31 using HeuristicLab.PluginInfrastructure; 31 32 using HeuristicLab.Problems.DataAnalysis; 32 33 … … 57 58 58 59 #region parameter properties 59 public ValueParameter<IKernel> KernelParameter {60 get { return ( ValueParameter<IKernel>)Parameters[KernelParameterName]; }60 public IConstrainedValueParameter<IKernel> KernelParameter { 61 get { return (IConstrainedValueParameter<IKernel>)Parameters[KernelParameterName]; } 61 62 } 62 63 … … 102 103 public KernelRidgeRegression() { 103 104 Problem = new RegressionProblem(); 104 Parameters.Add(new ValueParameter<IKernel>(KernelParameterName, "The kernel", new GaussianKernel())); 105 var values = new ItemSet<IKernel>(ApplicationManager.Manager.GetInstances<IKernel>()); 106 Parameters.Add(new ConstrainedValueParameter<IKernel>(KernelParameterName, "The kernel", values, values.OfType<GaussianKernel>().FirstOrDefault())); 105 107 Parameters.Add(new FixedValueParameter<BoolValue>(ScaleInputVariablesParameterName, "Set to true if the input variables should be scaled to the interval [0..1]", new BoolValue(true))); 106 108 Parameters.Add(new FixedValueParameter<DoubleValue>(LambdaParameterName, "The log10-transformed weight for the regularization term lambda [-inf..+inf]. Small values produce more complex models, large values produce models with larger errors. Set to very small value (e.g. -1.0e15) for almost exact approximation", new DoubleValue(-2))); 107 Parameters.Add(new FixedValueParameter<DoubleValue>(BetaParameterName, "The beta parameter for the kernel", new DoubleValue(2)));109 Parameters.Add(new FixedValueParameter<DoubleValue>(BetaParameterName, "The inverse width of the kernel ]0..+inf]. The distance between points is divided by this value before beeing plugged into the kernel.", new DoubleValue(2))); 108 110 } 109 111
Note: See TracChangeset
for help on using the changeset viewer.