forked from elizagrames/topictagger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_model.Rd
executable file
·27 lines (22 loc) · 987 Bytes
/
check_model.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tag_smartly.R
\name{check_model}
\alias{check_model}
\title{Check model performance}
\usage{
check_model(mod, indices, tags, modfam, xdat, cutoff)
}
\arguments{
\item{mod}{a glmnet model}
\item{indices}{a numeric vector of documents belonging to a subset used to fit the model}
\item{tags}{a character vector of document classifications or tags for documents at indices}
\item{modfam}{a string of length 1; options are "binomial" or "multinomial"}
\item{xdat}{a sparse document-feature matrix of class ngCMatrix}
\item{cutoff}{What probability should be used as a cutoff for topic classification? Options are proportions between 0-1, or NULL to find an optimal cutoff based on model accuracy.}
}
\value{
a vector containing the cutoff used and model accuracy at that cutoff
}
\description{
Given model inputs, checks model performance based on optimal or specified cutoff in classification probability
}