create_training_matrix: Create a matrix from a vector of text. This function does not...

Description Usage Arguments Value

Description

Create a matrix from a vector of text. This function does not do any text cleaning.

Usage

1
2
3
create_training_matrix(text, labels, minDocFreq = 0, maxDocFreq = 1,
  minWordLength = 0, maxWordLength = Inf, weighting = "count",
  ngrams = 1, features = NULL, verbose = FALSE)

Arguments

text

A vector of strings to be made into a matrix

labels

Labels for classification

minDocFreq

Minimum frequency of a word to be included (count or fraction)

maxDocFreq

Maxmimum frequency of a word to be included (count or fraction)

minWordLength

Minimum wordlength for a word to be included

maxWordLength

Maximum wordlength for a word to be included

weighting

Weighting to use. Choose between frequency, relFreq, relMaxFreq, logFreq, tfidf (See dfm_weight)

ngrams

Vector that specifies type of ngrams to generate

Value

A document feature matrix


jlricon/MaxClassify documentation built on May 29, 2019, 2:56 p.m.