R: creates a summary with ensemble coverage and precision.
create_ensembleSummary
R Documentation
creates a summary with ensemble coverage and precision.
Description
Creates a summary with ensemble coverage and precision values for an ensemble greater than the threshold specified.
Usage
create_ensembleSummary(document_summary)
Arguments
document_summary
The document_summary slot from the analytics-class generated by create_analytics.
Details
This summary is created in the create_analytics function. Note that a threshold value of 3 will return ensemble coverage and precision statistics for topic codes that had 3 or more (i.e. >=3) algorithms agree on the same topic code.
Author(s)
Loren Collingwood <lorenc2@uw.edu>, Timothy P. Jurka <tpjurka@ucdavis.edu>
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RTextTools)
Loading required package: SparseM
Attaching package: 'SparseM'
The following object is masked from 'package:base':
backsolve
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RTextTools/create_ensembleSummary.Rd_%03d_medium.png", width=480, height=480)
> ### Name: create_ensembleSummary
> ### Title: creates a summary with ensemble coverage and precision.
> ### Aliases: create_ensembleSummary
> ### Keywords: method
>
> ### ** Examples
>
> library(RTextTools)
> data(NYTimes)
> data <- NYTimes[sample(1:3100,size=100,replace=FALSE),]
> matrix <- create_matrix(cbind(data["Title"],data["Subject"]), language="english",
+ removeNumbers=TRUE, stemWords=FALSE, weighting=tm::weightTfIdf)
> container <- create_container(matrix,data$Topic.Code,trainSize=1:75, testSize=76:100,
+ virgin=FALSE)
> models <- train_models(container, algorithms=c("MAXENT","SVM"))
> results <- classify_models(container, models)
> analytics <- create_analytics(container, results)
>
> ensemble <- create_ensembleSummary(analytics@document_summary)
> ensemble
n-ENSEMBLE COVERAGE n-ENSEMBLE RECALL
n >= 1 1.00 0.32
n >= 2 0.24 0.33
>
>
>
>
>
> dev.off()
null device
1
>