Logistic Regression supported methods

27 views
Skip to first unread message

ahmad.jal...@gmail.com

unread,
Dec 18, 2012, 12:18:30 PM12/18/12
to accor...@googlegroups.com
Hi,

I am using Accord.NET library to do Logistic Regression in my application. I want to know about the methods it supports.

I think the default method it uses is 'Enter'. Does it support other methods like 'Backward', 'Forward', 'Stepwise' etc?

Many thanks.

Ahmad Qarshi

César

unread,
Dec 18, 2012, 1:26:35 PM12/18/12
to accor...@googlegroups.com
Hi Ahmad,

The framework supports stepwise logistic regression through the class StepwiseLogisticRegressionAnalysis. Unfortunately the class does not have a concrete usage example on the documentation, but its workings are very similar to the standard LogisticRegressionAnalysis.

Please see if it helps!

Regards,
Cesar

ahmad.jal...@gmail.com

unread,
Jan 3, 2013, 7:46:44 AM1/3/13
to accor...@googlegroups.com
Hi Cesar,

Thanks again for pointing me to the right direction. I am playing with the StepwiseLogisticRegressionAnalysis class.

In the Compute() function of this class there is an iterative call to the DoStep() function and finally it returns the indices of the variables finalized by the stepwise procedure. It also populates the Result variable with the resulting probabilities obtained by the logistic regression model. These probabilities are calculated using the original input data (i.e. all IVs).

My question is that shouldn't this Result variable contain probabilities calculated by using only those IVs which Stepwise procedure selected. If not then should we calculate it ourselves by calling the Current.Regression.Compute(...) function and passing it values of those IVs which the Stepwise procedure selected?

Thanks in anticipation.

Regards,

Ahmad Jalil Qarshi

César

unread,
Jan 3, 2013, 9:41:49 AM1/3/13
to accor...@googlegroups.com
Hi Ahmad,

You are correct about the issue. This should likely be a bug. The Results property should have been computed using only the IVs kept by the Stepwise procedure. As a workaround you may call the Current.Regression.Compute method manually, as you have suggested. The currently selected variable indices will be available on the Current.Variables property, and you may compute a submatrix from the original matrix by calling 

inputData.Submatrix(Current.Variables);

By the way, on December 20th I released a new version of the framework with an improved version of the Stepwise Logistic Regression Analysis, and this time with proper examples on the documentation. Perhaps you would like to give it a look!

Best regards,
Cesar

ahmad.jal...@gmail.com

unread,
Jan 3, 2013, 11:12:57 AM1/3/13
to accor...@googlegroups.com
Thanks Cesar,

I really appreciate your prompt response and many thanks for updating about new release.

Regards,

Ahmad Qarshi

Reply all
Reply to author
Forward
0 new messages