linearity.class: Measures of linearity

Description Usage Arguments Details Value See Also Examples

View source: R/linearity.R

Description

Classification task. The linearity measures try to quantify if it is possible to separate the classes by a hyperplane. The underlying assumption is that a linearly separable problem can be considered simpler than a problem requiring a non-linear decision boundary.

Usage

1
2
3
4
5
6
7
linearity.class(...)

## Default S3 method:
linearity.class(x, y, measures = "all", ...)

## S3 method for class 'formula'
linearity.class(formula, data, measures = "all", ...)

Arguments

...

Not used.

x

A data.frame contained only the input attributes.

y

A factor response vector with one label for each row/component of x.

measures

A list of measures names or "all" to include all them.

formula

A formula to define the class column.

data

A data.frame dataset contained the input attributes and class.

Details

The following measures are allowed for this method:

"L1"

Sum of the error distance by linear programming (L1) computes the sum of the distances of incorrectly classified examples to a linear boundary used in their classification.

"L2"

Error rate of linear classifier (L2) computes the error rate of the linear SVM classifier induced from dataset.

"L3"

Non-linearity of a linear classifier (L3) creates a new dataset randomly interpolating pairs of training examples of the same class and then induce a linear SVM on the original data and measure the error rate in the new data points.

"LX_partial"

X in [1,2,3]. It is the decomposed version of the correponding LX function. Instead of giving a single complexity value for the dataset, it returns one complexity value per class.

Value

A list named by the requested linearity measure.

See Also

Other complexity-measures: neighborhood, overlapping

Examples

1
2
3
## Extract all linearity measures
data(iris)
linearity.class(Species ~ ., iris)

victorhb/ImbCoL documentation built on May 20, 2021, 12:18 p.m.