'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)!
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, …)
# S3 method for default
template(object, …)
recode(object, …)
# S3 method for ZITrain
recode(object, new.levels, depth, …)
# S3 method for ZITest
recode(object, new.levels, depth, …)
contextSelection()
the root directory of the training set.
the root directory of the test set.
.zidb files or .zid files to use for data and vignettes in the training set.
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 template(object)
(with the add.others
argument
to TRUE for prepareTest()
and to FALSE
for prepareTrain()
)
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 NULL
,
indicate the name of the classification column (usually, Class
for
manual classification or Predicted
for automatic predictions). This
can also be a 'ZIClass' or 'mlearning' object that will be used for
classification of the particles first, ... or it can be a function that does
the classification.
name of the author of this classification (or the method, if done automatically).
a short description of this manual classification.
do we keep items in the '\_' subdirectory (corresponding to
unclassified ones)? Default to FALSE
in getTrain()
and to
NA
for getTest()
, which transforms all items in the '\_' or
one of its subdirectories into missing data.
do we remove item with missing data? By default, not.
a ZITrain file to use for building the model.
a character string with the name of the class to process.
a character string with the nazme of the predictive method to
use: "lm"
, "lda"
or "mda"
(by default).
a sample containing the particles to count.
the file containing the models for cells countings.
do we reset excisting counts for that class? By default, no.
a 'ZITrain' or 'ZITest' object. For prepareTest()
, a
'ZITrain' or 'ZIClass' object to use as reference to determine the
classes to make.
a character string of same length as the levels of
object$Class
with the labels of the new levels.
the depth in the hierachy of the classes as in the "path"
attribute of the object to use for recoding classes. If this argument is
provided, new.levels
is ignored and recomputed (and a warning is
issued if both arguments are provided).
further arguments passed to the method. For prepareXXX()
and addToXXX()
, it is further arguments passed to the prediction
function provided in classes
, or to the predict()
method for
'ZIClass' or 'mlearning' objects.