public void getReport(double alpha) { Forms.RunningProcess.frmRunningProcessDialog rd = new Forms.RunningProcess.frmRunningProcessDialog(false); rd.Text = "Logistic Regression Results"; rd.TopLevel = true; rd.pgbProcess.Visible = false; rd.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; rd.addMessage("LogLikelihood = " + LogLikelihood.ToString()); rd.addMessage("Deviance = " + Deviance.ToString()); rd.addMessage("Likelihood Ratio Chi-squared = " + X2.ToString() + " DF = " + DegreesOfFredom.ToString() + " p-value = " + PValue.ToString()); rd.addMessage("\n\nClasses: " + String.Join(", ", Categories)); rd.addMessage("Reference Class = " + Categories[0]); rd.addMessage("\nParameter coefficients:\n"); rd.addMessage("intercept, " + String.Join(", ", IndependentFieldNames)); rd.addMessage("Coef: " + String.Join(" ", (from double d in Coefficients select d.ToString()).ToArray())); rd.addMessage("STE: " + String.Join(", ", (from double d in StandardError select d.ToString()).ToArray())); rd.addMessage("\n\nWald stats for coefficients:\nchi-sq: " + String.Join(", ", (from Accord.Statistics.Testing.WaldTest d in WaldStatistic select d.Statistic.ToString()).ToArray())); rd.addMessage("p-value: " + String.Join(", ", (from Accord.Statistics.Testing.WaldTest d in WaldStatistic select d.PValue.ToString()).ToArray())); try { if (ModelHelper.chartingAvailable() && System.Windows.Forms.MessageBox.Show("Do you want to build probability graphs?", "Graphs", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) { createRegChart(); } } catch { System.Windows.Forms.MessageBox.Show("Cannot create charts"); } rd.Show(); rd.enableClose(); }
public void getReport(double alpha) { Forms.RunningProcess.frmRunningProcessDialog rd = new Forms.RunningProcess.frmRunningProcessDialog(false); rd.Text = "PLR Results"; rd.TopLevel = true; rd.pgbProcess.Visible = false; rd.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; rd.addMessage("Iterations = " + NumberOfIterationsToConverge.ToString()); rd.addMessage("Convergence = " + Delta.ToString()); rd.addMessage("LogLikelihood = " + LogLikelihood.ToString()); rd.addMessage("Deviance = " + Deviance.ToString()); rd.addMessage("Likelihood Ratio Chi-squared = " + X2.ToString() + " DF = " + DegreesOfFredom.ToString() + " p-value = " + PValue.ToString()); rd.addMessage("\n\nClasses: " + String.Join(", ", Categories)); rd.addMessage("Reference Class = " + Categories[0]); rd.addMessage("\nParameter coefficients:\n"); rd.addMessage("intercept, " + String.Join(", ", IndependentFieldNames)); for (int i = 0; i < Coefficients.Length; i++) { double[] c = Coefficients[i]; rd.addMessage(String.Join(" ", (from double d in c select d.ToString()).ToArray())); } rd.addMessage("\nParameter standard error:"); for (int i = 0; i < StandardError.Length; i++) { double[] c = StandardError[i]; rd.addMessage(String.Join(", ", (from double d in c select d.ToString()).ToArray())); } rd.addMessage("\nParameter Wald Chi-Squared:"); for (int i = 0; i < WaldStatistic.Length; i++) { double[] c = WaldStatistic[i]; rd.addMessage(String.Join(", ", (from double d in c select d.ToString()).ToArray())); } rd.addMessage("\nParameter Wald P-value:"); for (int i = 0; i < WaldPvalue.Length; i++) { double[] c = WaldPvalue[i]; rd.addMessage(String.Join(", ", (from double d in c select d.ToString()).ToArray())); } try { if (ModelHelper.chartingAvailable() && System.Windows.Forms.MessageBox.Show("Do you want to build probability graphs?", "Graphs", System.Windows.Forms.MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) { regChart(); //if (mlr == null) mlr = buildModel(); } } catch { System.Windows.Forms.MessageBox.Show("Cannot create charts"); } rd.Show(); rd.enableClose(); }