testMarkers {pRoloc} | R Documentation |
Tests if the marker class sizes are large enough for the parameter
optimisation scheme, i.e. the size is greater that xval + n
,
where the default xval
is 5 and n
is 2. If the test
is unsuccessful, a warning is thrown.
testMarkers(object, xval = 5, n = 2, fcol = "markers", error = FALSE)
object |
An instance of class |
xval |
The number cross-validation partitions. See the
|
n |
Number of additional examples. |
fcol |
The name of the prediction column in the
|
error |
A |
In case the test indicates that a class contains too few examples,
it is advised to either add some or, if not possible, to remove
the class altogether (see minMarkers
)
as the parameter optimisation is likely to fail or, at least,
produce unreliable results for that class.
If successfull, the test invisibly returns NULL
. Else,
it invisibly returns the names of the classes that have too few examples.
Laurent Gatto
getMarkers
and minMarkers
library("pRolocdata") data(dunkley2006) getMarkers(dunkley2006) testMarkers(dunkley2006) toosmall <- testMarkers(dunkley2006, xval = 15) toosmall try(testMarkers(dunkley2006, xval = 15, error = TRUE))