You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mamlr/man/feat_select.Rd

30 lines
944 B

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feat_select.R
\name{feat_select}
\alias{feat_select}
\title{Select features using quanteda textstat_keyness}
\usage{
feat_select(topic, dfm, class_type, percentile, measure = "chi2")
}
\arguments{
\item{topic}{The topic to determine keywords for}
\item{dfm}{The input dfm}
\item{class_type}{Name of the column in docvars containing the classification}
\item{percentile}{Cutoff for the list of words that should be returned}
\item{measure}{Measure to use in determining keyness, default = chi2; see textstat_keyness for other options}
}
\value{
A vector of words that are key to the topic
}
\description{
Select features based on the textstat_keyness function and a percentile cutoff
Percentiles are based on absolute values i.e. both on words that are key and *not* key to the topic
}
\examples{
feat_select(topic, dfm, class_type, percentile, measure="chi2")
}