val: Evaluate an algorithm with one dfm

View source: R/val.R

valR Documentation

Evaluate an algorithm with one dfm

Description

Evaluate an algorithm with one dfm

Usage

val(
  x,
  y,
  set = "training",
  alg = NULL,
  pred = stats::predict,
  as_matrix = FALSE,
  positive = TRUE,
  pb = NULL,
  what = NULL,
  write_out = FALSE
)

Arguments

x

A dfm to evaluate.

y

A variable in docvars of the dfms with the class (must be logical for now).

set

A variable in docvars indicating membership to training or test set.

alg

A functions containing the algorithm to be evaluated (see example)

pred

A function used for prediction (most packages use predict(), which is the default).

as_matrix

Logical. Indicating if alg needs the dfm converted to a matrix.

positive

value for the positive class.

pb, what

Used to display status bar when used in batch mode.

write_out

Should intermediate results be written to the working directory.

Value

A confusion matrix object.


JBGruber/smlhelper documentation built on Oct. 7, 2022, 3:43 p.m.