matrix_container-class(RTextTools)
matrix_container-class()所属R语言包:RTextTools
an S4 class containing the training and classification matrices.
S4类,包含的训练和分类矩阵。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
An S4 class containing all information necessary to train, classify, and generate analytics for a dataset.
S4类,包含所有必要的信息,培训,分类,并生成数据集的分析。
类对象----------Objects from the Class----------
Objects could in principle be created by calls of the form new("matrix_container", ...). The preferred form is to have them created via a call to create_container.
对象原则上可以通过检测的形式new("matrix_container", ...)创建的。优选的形式是通过调用create_container创建它们。
插槽----------Slots----------
training_matrix Object of class "matrix.csr":
training_matrix类的对象"matrix.csr":
training_codes Object of class "factor":
training_codes类的对象"factor":
classification_matrix Object of class "matrix.csr":
classification_matrix类的对象"matrix.csr":
testing_codes Object of class "factor":
testing_codes类的对象"factor":
column_names Object of class "vector":
column_names类的对象"vector":
virgin Object of class "logical":
virgin类的对象"logical":
(作者)----------Author(s)----------
Timothy P. Jurka <tpjurka@ucdavis.edu>
实例----------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=weightTfIdf)
container <- create_container(matrix,data$Topic.Code,trainSize=1:75, testSize=76:100,
virgin=FALSE)
container@training_matrix
container@training_codes
container@classification_matrix
container@testing_codes
container@column_names
container@virgin
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|