示例#1
0
 /// <summary>
 ///   Gets the Likelihood Ratio between two models.
 /// </summary>
 /// <remarks>
 ///   The deviance is defined as -2*Log-Likelihood.
 /// </remarks>
 /// <param name="input">A set of input data.</param>
 /// <param name="output">A set of output data.</param>
 /// <param name="regression">Another Logistic Regression model.</param>
 /// <returns>The Log-Likelihood ratio (a measure of performance
 /// between two models) calculated over the given data sets.</returns>
 public double GetLogLikelihoodRatio(double[][] input, double[] output, LogisticRegression regression)
 {
     return(2.0 * (this.GetLogLikelihood(input, output) - regression.GetLogLikelihood(input, output)));
 }