bwlewis / glm Goto Github PK
View Code? Open in Web Editor NEWNotes on generalized linear models
Home Page: http://bwlewis.github.io/GLM
Notes on generalized linear models
Home Page: http://bwlewis.github.io/GLM
We'll roll all these methods in to an R package.
But, the SVD Newton method will be the primary non-distributed method. We should add the following to it:
Also note that the termination criterion is not the same as R, we should change that.
I always found your minimalist IRLS GLM algorithm at [http://bwlewis.github.io/GLM/ ] very handy to explain to students how GLMs work. I was wondering if, by any chance, you would also happen to have an equally minimalist implementation of multinomial & negative binomial GLMs available, ideally also using IRLS (as opposed to Newton-Raphson)?
These notes are incredibly useful.
I think I've found a bug though. Check "Algorithm IRLS: Iteratively reweighted least squares estimation" in the "Input" section. I think the line:
Let x_{j+1}=x_j+(A^TWA)^{โ1}A^TWz.
should be
Let x_{j+1}= (A^TWA)^{โ1}A^TWz.
I noticed that all algo's listed are significantly slower than the inbuilt glm.fit.
Why is this? Does glm.fit
use better starting values perhaps? Or is this due to the use of .Call(C_Cdqrls...)
in glm.fit
as opposed to the use of solve()
in the irls
code?
In the sparse and incremental variants, the resulting linear system is solved by Cholesky decomposition with pivoting. So
U <- chol(crossprod(X),pivot=TRUE)
p <- attr(U,"pivot")
backsolve(U,backsolve(U,crossprod(X,y)[p],transpose=TRUE))[p]
But shouldn't the final line be
backsolve(U,backsolve(U,crossprod(X,y)[p],transpose=TRUE))[order(p)]
to invert the original permutation?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.