NLoNPredict: NLoN Model.

View source: R/model.R

NLoNPredictR Documentation

NLoN Model.

Description

Train a NLoN model using glmnet.

Usage

NLoNPredict(
  model,
  text,
  lambda = "lambda.min",
  type = "class",
  features = TriGramsAndFeatures
)

Arguments

model

A glmnet model as returned by NLoNModel.

text

A character vector containing the text to predict.

lambda

Lambda parameter to pass to predict.glmnet.

type

Type of prediction made by predict.glmnet.

features

A function computing the feature values (a matrix, list of numeric vectors or data.frame) or a list of functions computing individual feature values.

Value

The output of predict.glmnet.

See Also

predict.glmnet


M3SOulu/NLoN documentation built on June 20, 2022, 6 p.m.