contr.dummy: contr.dummy

contr.dummyR Documentation

contr.dummy

Description

Returns a matrix of contrasts for the train.kknn.

Usage

contr.dummy(n, contrasts = TRUE)

Arguments

n

A vector containing levels of a factor, or the number of levels.

contrasts

A logical value indicating whether contrasts should be computed.

Value

A matrix with n rows and n-1 columns for contr.ordinal, a matrix with n rows and n columns for contr.dummy and a vector of length n for contr.metric.


traineR documentation built on Nov. 10, 2023, 1:15 a.m.

Related to contr.dummy in traineR...