Diff of /man/summarize_states.Rd [000000] .. [409433]

Switch to unified view

a b/man/summarize_states.Rd
1
% Generated by roxygen2: do not edit by hand
2
% Please edit documentation in R/predict.R
3
\name{summarize_states}
4
\alias{summarize_states}
5
\title{Create summary of predictions}
6
\usage{
7
summarize_states(
8
  states_path = NULL,
9
  label_names = NULL,
10
  file_type = "h5",
11
  df = NULL
12
)
13
}
14
\arguments{
15
\item{states_path}{Folder containing state files or a single file with same ending as \code{file_type}.}
16
17
\item{label_names}{Names of predicted classes.}
18
19
\item{file_type}{\code{"h5"} or \code{"csv"}.}
20
21
\item{df}{A states data frame. Ignore \code{states_dir} argument if not \code{NULL}.}
22
}
23
\value{
24
A data frame of predictions summaries.
25
}
26
\description{
27
Create summary data frame for confidence predictions over 1 or several state files or a data frame.
28
Columns in file or data frame should be confidence predictions for one class,
29
i.e. each rows should sum to 1 and have nonnegative entries.
30
Output data frame contains average confidence scores, max score and percentage of votes for each class.
31
}
32
\examples{
33
m <- c(0.9,  0.1, 0.2, 0.01,
34
       0.05, 0.7, 0.2, 0,
35
       0.05, 0.2, 0.6, 0.99) \%>\% matrix(ncol = 3)
36
37
label_names <- paste0("class_", 1:3)
38
df <- as.data.frame(m)
39
pred_summary <- summarize_states(label_names = label_names, df = df)
40
pred_summary
41
42
}