risk_mod_random_start {riskscores}R Documentation

Run risk model with random start

Description

Runs nstart iterations of risk_mod(), each with a different warm start, and selects the best model. Each coefficient start is randomly selected as -1, 0, or 1.

Usage

risk_mod_random_start(
  X,
  y,
  weights = NULL,
  lambda0 = 0,
  a = -10,
  b = 10,
  max_iters = 100,
  tol = 1e-05,
  seed = NULL,
  nstart = 5
)

Arguments

X

Input covariate matrix with dimension n \times p; every row is an observation.

y

Numeric vector for the (binomial) response variable.

weights

Numeric vector of length n with weights for each observation. Unless otherwise specified, default will give equal weight to each observation.

lambda0

Penalty coefficient for L0 term (default: 0). See cv_risk_mod() for lambda0 tuning.

a

Integer lower bound for coefficients (default: -10).

b

Integer upper bound for coefficients (default: 10).

max_iters

Maximum number of iterations (default: 100).

tol

Tolerance for convergence (default: 1e-5).

seed

An integer that is used as argument by set.seed() for offsetting the random number generator. Default is to not set a particular randomization seed.

nstart

Number of different random starts to try (default: 5).


[Package riskscores version 1.1.1 Index]