Closed ruchikasonagote closed 8 months ago
Thanks for the PR. It looks promising!
A few things to take care of:
warning ("glmfit: message.")
instead of disp ('warning: ....')
fminsearch
to compute beta
.b
instead of beta
for returning argument to be more consistent with MATLAB.link
argument as pair name-value style, to maintain MATLAB compatibilitySure, I will work on it.
See the changes I 've made. Add input validation tests at the bottom using %!error
syntax. Check other functions in statistics to get the idea
I have merged this PR because I am about to make a new release. See the new issue about glmfit
and let's continue there
Description
glmfit
function fits a generalized linear model to the given data using the specified link function and distribution of the response variable.IRLS
method.X -> predictor data
,y -> response
,distribution
,link
and returns a vectorbeta
of coefficient estimates for glm.poisson
distribution.Issue
(https://github.com/gnu-octave/statistics/issues/49) Implementing multinomial regression and generalized linear models functions
TestCase
ScreenShot of output
beta_true is similar to beta