predict.CRF {hana.ml.r}R Documentation

Make Predictions from a CRF Object

Description

Similar to other predict methods, this function predicts fitted values from a fitted CRF object.

Usage

## S3 method for class 'CRF'
predict(model, data, used.cols = NULL,
  thread.ratio = NULL)

Arguments

model

R6Class object
CRF object for prediction. Connection to the SAP HANA system.

data

DataFrame
DataFrame that contains data for making prediction from a conditional random field model.

used.cols

list of character, optional
This parameter specifies the three columns used for training a conditional random field model. Namely, one column should correspond to Document ID, another column should correspond to word position, and a 3rd column corresponds to word. If not NULL, this parameter should be specified in two ways:

  • (1) used.cols = list("document.id" = "xxx", "word.pos" = "yyy", "word" = "zzz")

  • (2) used.cols = list("xxx", "yyy", "zzz")

In case (2), "xxx", "yyy" and "zzz" must be the column data of document ID, word position and word respectively.
Defaults to the first three column names of data if not provided.

thread.ratio

numeric, optional Specifies the ratio of total number of threads that can be used by this function. The range of this parameter is from 0 to 1, where 0 means only using 1 thread, and 1 means using at most all the currently available threads. Values outside this range are ignored and this function heuristically determines the number of threads to use.

Format

S3 methods

Value

See Also

hanaml.CRF


[Package hana.ml.r version 1.0.8 Index]