This function implements multinomial logistic regression, generalizing to k classes
1 | my_multinom(X, Y, lr, max_n, tol = 1e-10)
|
X |
a model matrix, the X variables as columns |
Y |
a factor vector, the response variable |
lr |
the learning rate |
max_n |
max number of iterations (a positive integer) |
tol |
the difference threshold for which we will exit the algorithm for iterations less than max_n |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.