Changeset 15169


Ignore:
Timestamp:
07/07/17 14:12:44 (2 weeks ago)
Author:
bwerth
Message:

#2699 made KernelParameter a ConstrainedValueParameter; added some description to BetaParameter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelRidgeRegression.cs

    r15164 r15169  
    2929using HeuristicLab.Parameters;
    3030using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     31using HeuristicLab.PluginInfrastructure;
    3132using HeuristicLab.Problems.DataAnalysis;
    3233
     
    5758
    5859    #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]; }
    6162    }
    6263
     
    102103    public KernelRidgeRegression() {
    103104      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()));
    105107      Parameters.Add(new FixedValueParameter<BoolValue>(ScaleInputVariablesParameterName, "Set to true if the input variables should be scaled to the interval [0..1]", new BoolValue(true)));
    106108      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)));
    108110    }
    109111
Note: See TracChangeset for help on using the changeset viewer.