hanaml.SVRanking {hana.ml.r}R Documentation

Support Vector Ranking

Description

hanaml.SVRanking is an R wrapper of PAL sVM for ranking.

Usage

hanaml.SVRanking (conn.context,
                  data = NULL,
                  key = NULL,
                  features = NULL,
                  label = NULL,
                  qid = NULL,
                  c = NULL,
                  kernel = NULL,
                  degree = NULL,
                  gamma = NULL,
                  coef.lin = NULL,
                  coef.const = NULL,
                  probability = NULL,
                  shrink = NULL,
                  tol = NULL,
                  evaluation.seed = NULL,
                  thread.ratio = NULL,
                  scale.info = NULL,
                  categorical.variable = NULL,
                  category.weight = NULL,
                  handle.missing = NULL)

Arguments

conn.context

ConnectionContext
The connection to the SAP HANA system.

data

DataFrame
DataFrame containing the data.

key

character, optional
Name of the ID column of data.

features

list of character, optional
Names of the feature columns.
If is not provided, it defaults to all non-ID, no-label columns.

label

character, optional
Name of the column in data that specifies the dependent variable.
If is not provided, it defaults the last column.

qid

character
Column name of QueryID. If not provided, it defaults to the last non-ID, non-label column.

c

double
Trade-off between training error and margin value range: > 0.
Defaults to 100.

kernel

{"linear", "poly", "rbf", "sigmoid"}, optionoal
kernel function. Defaults to "rbf".

degree

integer
Coefficient for the POLY KERNEL type. Value range: >= 1
Defaults to 3.

gamma

double, optional
Coefficient for the RBF KERNEL type.
Defaults to 1.0/number of features in the dataset Only valid for RBF KERNEL type.

coef.lin

double, optional
Coefficient for the POLY/SIGMOID KERNELtype.
Defaults to 0.

coef.const

double, optional
Coefficient for the POLY/SIGMOID KERNEL type.
Defaults to 0.

probability

logical, optional
If you want to output probability when scoring, set this to TRUE.
Defaults to FALSE.

shrink

logical, optional
Decides whether to use shrink strategy or not:

  • FALSE: Does not use shrink strategy.

  • TRUE: Uses shrink strategy.

Defaults to TRUE.

tol

double, optional
Specifies the error tolerance in the training process. The value must be greater than 0.
Defaults to 0.001.

evaluation.seed

integer, optional
The random seed in parameter selection. The value must be greater than 0.
Defaults to 0.

thread.ratio

double, optional
Controls the proportion of available threads that can be used by this function. The value range is from 0 to 1, where 0 indicates a single thread, and 1 indicates up to all available threads. Values between 0 and 1 will use up to that percentage of available threads.
Defaults to 0.0.

scale.info

character, optional

  • "no" : No scale

  • "standardization": The algorithm transforms the data to have zero mean and unit variance.

  • "rescale" : The algorithm rescales the range of the features to scale the range in [-1,1].

Defaults to "standardization".

categorical.variable

character or list of characters, optional
Column names in the data table used as category variable.

category.weight

double, optional
Represents the weight of category attributes. The value must be greater than 0.
Defaults to 0.707.

handle.missing

logical, optional
Whether to impute the missing values of the input data or not. If set to FALSE, all rows with missing values will be deleted.
Defaults to TRUE.

Format

R6Class object.

Value

Examples

## Not run: 
> features <- list("ATTRIBUTE1", "ATTRIBUTE2", "ATTRIBUTE3", "ATTRIBUTE4",
                  "ATTRIBUTE5")
> svranking <- hanaml.SVRanking(conn.context, df.fit, features, qid="QID",
                              gamma = 0.005)

## End(Not run)

[Package hana.ml.r version 1.0.8 Index]