private Accord.Statistics.Analysis.LogisticRegressionAnalysis buildModel() { if (independent == null) { formatData(); } lr = new Accord.Statistics.Analysis.LogisticRegressionAnalysis(independent, dependent); if (lr.Compute(ConvergenceCriteria, TotalIterations)) { coefficients = lr.CoefficientValues; standarderror = lr.StandardErrors; waldstat = lr.WaldTests; loglikelihood = lr.LogLikelihood; deviance = lr.Deviance; x2 = lr.ChiSquare.Statistic; pv = lr.ChiSquare.PValue; return(lr); } else { System.Windows.Forms.MessageBox.Show("Could not compute logistic regression!!", "Compute", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); return(null); } }
private Accord.Statistics.Analysis.LogisticRegressionAnalysis buildModel() { if (independent == null) formatData(); lr = new Accord.Statistics.Analysis.LogisticRegressionAnalysis(independent,dependent); if (lr.Compute(ConvergenceCriteria, TotalIterations)) { coefficients = lr.CoefficientValues; standarderror = lr.StandardErrors; waldstat = lr.WaldTests; loglikelihood = lr.LogLikelihood; deviance = lr.Deviance; x2 = lr.ChiSquare.Statistic; pv = lr.ChiSquare.PValue; return lr; } else { System.Windows.Forms.MessageBox.Show("Could not compute logistic regression!!", "Compute", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); return null; } }