public LogPrior(LogPrior.LogPriorType type, double sigma, double epsilon) { this.type = type; if (type != LogPrior.LogPriorType.Adapt) { SetSigma(sigma); SetEpsilon(epsilon); } }
/// <summary> /// IMPORTANT NOTE: This constructor allows non-uniform regularization, but it /// transforms the inputs C (like the machine learning people like) to sigma /// (like we NLP folks like). /// </summary> /// <remarks> /// IMPORTANT NOTE: This constructor allows non-uniform regularization, but it /// transforms the inputs C (like the machine learning people like) to sigma /// (like we NLP folks like). C = 1/\sigma^2 /// </remarks> public LogPrior(double[] C) { // this is the C variable in CSFoo's MM paper C = 1/\sigma^2 // private double[] regularizationHyperparameters = null; // public double[] getRegularizationHyperparameters() { // return regularizationHyperparameters; // } // // public void setRegularizationHyperparameters( // double[] regularizationHyperparameters) { // this.regularizationHyperparameters = regularizationHyperparameters; // } this.type = LogPrior.LogPriorType.MultipleQuadratic; double[] sigmaSqM = new double[C.Length]; for (int i = 0; i < C.Length; i++) { sigmaSqM[i] = 1.0 / C[i]; } this.sigmaSqM = sigmaSqM; SetSigmaSquaredM(sigmaSqM); }
public LogPrior(LogPrior.LogPriorType type) : this(type, 1.0, 0.1) { }