Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/05/15 07:46:38 (9 years ago)
Author:
gkronber
Message:

#2497: added hidden parameter to turn on/off scaling of input variables in Gaussian process models

File:
1 edited

Legend:

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

    r12012 r13118  
    3838    private const string NegativeLogLikelihoodParameterName = "NegativeLogLikelihood";
    3939    private const string HyperparameterGradientsParameterName = "HyperparameterGradients";
     40    protected const string ScaleInputValuesParameterName = "ScaleInputValues";
    4041
    4142    #region Parameter Properties
     
    6061      get { return (ILookupParameter<DoubleValue>)Parameters[NegativeLogLikelihoodParameterName]; }
    6162    }
    62 
     63    public ILookupParameter<BoolValue> ScaleInputValuesParameter {
     64      get { return (ILookupParameter<BoolValue>)Parameters[ScaleInputValuesParameterName]; }
     65    }
    6366    #endregion
    6467
     
    6770    protected IMeanFunction MeanFunction { get { return MeanFunctionParameter.ActualValue; } }
    6871    protected ICovarianceFunction CovarianceFunction { get { return CovarianceFunctionParameter.ActualValue; } }
     72    public bool ScaleInputValues { get { return ScaleInputValuesParameter.ActualValue.Value; } }
    6973    #endregion
    7074
     
    8286      Parameters.Add(new LookupParameter<RealVector>(HyperparameterGradientsParameterName, "The gradients of the hyperparameters for the produced Gaussian process model (necessary for hyperparameter optimization)"));
    8387      Parameters.Add(new LookupParameter<DoubleValue>(NegativeLogLikelihoodParameterName, "The negative log-likelihood of the produced Gaussian process model given the data."));
     88
     89
     90      Parameters.Add(new LookupParameter<BoolValue>(ScaleInputValuesParameterName,
     91        "Determines if the input variable values are scaled to the range [0..1] for training."));
     92      Parameters[ScaleInputValuesParameterName].Hidden = true;
     93    }
     94
     95    [StorableHook(HookType.AfterDeserialization)]
     96    private void AfterDeserialization() {
     97      if (!Parameters.ContainsKey(ScaleInputValuesParameterName)) {
     98        Parameters.Add(new LookupParameter<BoolValue>(ScaleInputValuesParameterName,
     99          "Determines if the input variable values are scaled to the range [0..1] for training."));
     100        Parameters[ScaleInputValuesParameterName].Hidden = true;
     101      }
    84102    }
    85103  }
Note: See TracChangeset for help on using the changeset viewer.