tropsvm_helper: Helper for 'cv.tropsvm'

View source: R/tropsvm_helper.R

tropsvm_helperR Documentation

Helper for cv.tropsvm

Description

Helper for cv.tropsvm

Usage

tropsvm_helper(x, y, assignment = NULL, ind = 1, newx = NULL, newy = NULL)

Arguments

x

a data matrix, of dimension nobs x nvars; each row is an observation vector.

y

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

assignment

a numeric vector of length 4 indicating the sectors of tropical hyperplane that the data will be assigned to. The first and third elements in the assignment are the coordinates of an observed point in data matrix x believed from the first category where the maximum and second maximum of the vector addition between the fitted optimal tropical hyperplane and the point itself are achieved. The meanings for the second and the fourth element in the assignment are the same but for the points in the second category. Namely, the first and second values in the assignment are the indices of sectors where the two point cloud will be assigned. Not needed when auto.assignment = TRUE. (default: NULL)

ind

a numeric value or a numeric vector ranging from 1 to 70 indicating which classification method to be used. There are 70 different classification methods. Details of a given method can be retrieved by summary. The different classification methods are proposed to resolve the issue when points fall on the intersections of sectors. Users can have personal choices if better knowledge is assumed. (default: 1)

newx

the same as "x" but only needed in cv.tropsvm, which is used as validation data. (default: NULL)

newy

the same as "y" but only needed in cv.tropsvm, which is used as validation labels (default: NULL)

Value

Classification accuracy


HoujieWang/Rtropical documentation built on May 18, 2022, 11:56 a.m.