NLoNModel: NLoN Model.

View source: R/model.R

NLoNModelR Documentation

NLoN Model.

Description

Train a NLoN model using glmnet.

Usage

NLoNModel(
  text,
  response,
  features = TriGramsAndFeatures,
  cv = "glmnet",
  repeats = 10,
  verbose = TRUE,
  ...
)

Arguments

text

A character vector containing the training text.

response

A factor response with levels NL (for natural language) and Not (for not natural language).

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.

cv

Specify whether to use 10-fold cross-validation and which function to use (cv.glmnet or train)

repeats

Number of repeats of the 10-fold cross-validation. Currently not implemented for cv.glmnet

verbose

If TRUE run cross-validation in verbose mode.

...

Additional parameters to pass to glmnet.

Value

A glmnet trained model.

See Also

glmnet


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