Fit a logistic model via the Global Adaptive Generative Adjustment algorithm using cpp
cpp_logistic_gaga(
X,
y,
s_alpha,
s_itrNum,
s_thresh,
s_flag,
s_lamda_0,
s_fdiag,
s_subItrNum
)
Coefficient vector.
Input matrix, of dimension nobs*nvars; each row is an observation.
If the intercept term needs to be considered in the estimation process, then the first column of X
must be all 1s.
should be either a factor with two levels.
Hyperparameter. The suggested value for alpha is 1 or 2. When the collinearity of the load matrix is serious, the hyperparameters can be selected larger, such as 5.
The number of iteration steps. In general, 20 steps are enough.
If the condition number of X
is large, it is recommended to greatly increase the
number of iteration steps.
Convergence threshold for beta Change, if max(abs(beta-beta_old))<threshold
, return.
It identifies whether to make model selection. The default is TRUE
.
The initial value of the regularization parameter for ridge regression. The running result of the algorithm is not sensitive to this value.
It identifies whether to use diag Approximation to speed up the algorithm.
Maximum number of steps for subprocess iterations.