ZITrain {zooimage} | R Documentation |
Manipulate training and testsets 'ZITrain'/'ZITest' objects
Description
'ZITrain' contain a hierarchy of classes (taxonomic or not) and a link to a series of items belonging to these classes. It can be obtained after manual or automatic classification of various objects from .zid or .zidb files. 'ZITest' objects are almost identical, but with a constraint on the classes that must match the ones of the reference 'ZItrain' or 'ZIClass' object (a necessity to allow for comparisons)!
Usage
prepareTrain(traindir, zidbfiles, template = c("[Basic]", "[Detailed]",
"[Very detailed]"), classes = NULL, ...)
addToTrain(traindir, zidbfiles, classes = NULL, ...)
getTrain(traindir, creator = NULL, desc = NULL, keep_ = FALSE, na.rm = FALSE)
prepareTest(testdir, zidbfiles, template, classes = NULL, ...)
addToTest(testdir, zidbfiles, classes = NULL, ...)
getTest(testdir, creator = NULL, desc = NULL, keep_ = NA, na.rm = FALSE)
cellModel(train, traindir, class, method = "mda")
cellCompute(data, cellModels)
cellCount(traindir, class, reset = FALSE)
template(object, ...)
## Default S3 method:
template(object, ...)
recode(object, ...)
## S3 method for class 'ZITrain'
recode(object, new.levels, depth, ...)
## S3 method for class 'ZITest'
recode(object, new.levels, depth, ...)
contextSelection()
Arguments
traindir |
the root directory of the training set. |
testdir |
the root directory of the test set. |
zidbfiles |
.zidb files or .zid files to use for data and vignettes in the training set. |
template |
file containing subdirectories template to use for creating
classes in the training or test set. Either a defaut template between [], or
the name of a .zic file, or a template extracted from a 'ZITrain' or 'ZIClass'
object using |
classes |
if vignettes are already classified in the zid(b) files, should
they be sorted that way in the created training or test set? If not |
creator |
name of the author of this classification (or the method, if done automatically). |
desc |
a short description of this manual classification. |
keep_ |
do we keep items in the '\_' subdirectory (corresponding to
unclassified ones)? Default to |
na.rm |
do we remove item with missing data? By default, not. |
train |
a ZITrain file to use for building the model. |
class |
a character string with the name of the class to process. |
method |
a character string with the nazme of the predictive method to
use: |
data |
a sample containing the particles to count. |
cellModels |
the file containing the models for cells countings. |
reset |
do we reset excisting counts for that class? By default, no. |
object |
a 'ZITrain' or 'ZITest' object. For |
new.levels |
a character string of same length as the levels of
|
depth |
the depth in the hierachy of the classes as in the |
... |
further arguments passed to the method. For |
Author(s)
Philippe Grosjean <Philippe.Grosjean@umons.ac.be>
See Also
Examples
##TODO...