lincoef | R Documentation |
Get linear model coefficients
lincoef(
x,
y,
weights = NULL,
method = "glmnet",
type = c("Regression", "Classification", "Survival"),
learning.rate = 1,
alpha = 1,
lambda = 0.05,
lambda.seq = NULL,
cv.glmnet.nfolds = 5,
which.cv.glmnet.lambda = c("lambda.min", "lambda.1se"),
nbest = 1,
nvmax = 8,
sgd.model = "glm",
sgd.model.control = list(lambda1 = 0, lambda2 = 0),
sgd.control = list(method = "ai-sgd"),
trace = 0
)
x |
Feature matrix or data.frame. Will be coerced to data.frame for method = "allSubsets", "forwardStepwise", or "backwardStepwise" |
y |
Outcome |
weights |
Float, vector: Case weights |
method |
Character: Method to use:
|
type |
Character: "Regression", "Classification", or "Survival" |
learning.rate |
Numeric: Coefficients will be multiplied by this number |
alpha |
Float: |
lambda |
Float: The lambda value for |
lambda.seq |
Float, vector: lambda sequence for |
cv.glmnet.nfolds |
Integer: Number of folds for |
which.cv.glmnet.lambda |
Character: Whitch lambda to pick from cv.glmnet: "lambda.min": Lambda that gives minimum cross-validated error; |
nbest |
Integer: For |
nvmax |
Integer: For |
sgd.model |
Character: Model to use for |
sgd.model.control |
List: |
sgd.control |
List: |
trace |
Integer: If set to zero, all warnings are ignored |
This function minimizes checks for speed. It doesn't check dimensionality
of x
.
Only use methods "glm", "sgd", or "solve" if there is only one feature in
x
.
Named numeric vector of linear coefficients
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.