This reference class object fits a binary classification model, using the logistic_reg function. The model can be used to predict the classes of new samples. The sample classes must be 0 or 1, and the prediction returns the estimated probabilities that each sample is class 1. A decision threshold should be subsequently.
X
An nxd matrix with samples as rows and features as columns.
y
A length-n vector of 0s and 1s indicating true sample classes.
coeffs
A length-d vector of model coefficients.
lambda
regularization parameter
initialize(X, y, lambda = 1e-06)
Provide X and y and the coeffs field will be calculated using logistic_reg
predict(X_test)
Provide a matrix of new samples and a vector of P(y=1) is returned
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.