ordinalRidge: Ordinal regression with a ridge regularization penalty

Description Usage Arguments Value Methods (by generic)

View source: R/ordinal_ridge.R

Description

Ordinal regression with a ridge regularization penalty

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ordinalRidge(
  K,
  y,
  kernel = (nrow(K) == ncol(K)),
  lambda = 0.1,
  eps = 1e-05,
  maxIter = 10,
  verbose = TRUE
)

## S3 method for class 'ordinalRidge'
predict(mdl, newdata)

Arguments

K

an n-by-p matrix of n samples in p dimensions or an n-by-n kernel matrix

y

n-by-1 vector of (ordinal) labels

kernel

set TRUE if K is a kernel matrix (Default: TRUE if K is a square matrix, FALSE otherwise)

lambda

regularization coefficient

eps

convergence tolerance

maxIter

maximum number of iterations

verbose

if TRUE, reports objective function value at each iteration

mdl

model returned by ordinalRidge()

newdata

n1-by-n kernel matrix of n1 new points against n points used for training

Value

OrdinalRidge returns a list with the following elements: #'

v

A n-by-1 vector of kernel weights

b

A nb-by-1 vector of bias terms to be used as decision boundaries

classes

Names of classes from the original vector of labels y

predict() returns a list with the following elements:

score

An n1-by-1 vector of scores

pred

A factor of length n1 containing predictions

prob

An n1-by-nb matrix of probabilities for each of the nb decision boundaries

Methods (by generic)


labsyspharm/ordinalRidge documentation built on Dec. 21, 2021, 8:49 a.m.