Description Usage Arguments Details Value Examples
View source: R/hist.trainOcc_ggplot.R View source: R/hist.trainOcc.R
The histogram of the predicted unlabeled data is shown together with the hold-out predictions of the positive and unlabeled traning data (boxplots).
1 2 3 4 5 |
x |
an object of class |
predUn |
a vector of unlabeled predictions (if |
th |
draw vertical lines in the histogram, indication for a threshold. |
cab |
for a color-coded histogram a list with
elements |
main |
a title for the plot. if not given the parameters of the model are added. |
ylim |
the y limits of the plot. |
breaks |
see identically named argument in |
col |
a colour to be used to fill the bars. |
border |
the color of the border around the bars. |
add_calBoxplot |
bool. Should the positive calibration predictions be plotted? Defaults to |
noWarnRasHist |
Supresses warning when histogram is derived from raster. |
... |
other arguments that can be passed to |
hist.trainOcc
Diagnostic distributions plot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | data(bananas)
### an underfitted model
oc <- trainOcc (x = bananas$tr[, -1], y = bananas$tr[, 1],
tuneGrid=expand.grid(sigma=0.1,
cNeg=0.5,
cMultiplier=16))
### predict 10% or the unlabeled data and plot
# the diagnostic distributions plot
# and the model in the 2D feature space
set.seed(123)
idx.pred <- sample(400*400, 16000)
hist(oc, predict(oc, bananas$x[][idx.pred,]), th=0)
featurespace(oc, th=0)
### an overfitted model
oc <- trainOcc (x = bananas$tr[, -1], y = bananas$tr[, 1],
tuneGrid=expand.grid(sigma=1,
cNeg=32,
cMultiplier=16))
### predict 10% or the unlabeled data and plot
# the diagnostic distributions plot
# and the model in the 2D feature space
set.seed(123)
idx.pred <- sample(400*400, 16000)
hist(oc, predict(oc, bananas$x[][idx.pred,]), th=0)
featurespace(oc, th=0)
### a good model
oc <- trainOcc (x = bananas$tr[, -1], y = bananas$tr[, 1],
tuneGrid=expand.grid(sigma=1,
cNeg=0.0625,
cMultiplier=64))
### predict 10% or the unlabeled data and plot
# the diagnostic distributions plot
# and the model in the 2D feature space
set.seed(123)
idx.pred <- sample(400*400, 16000)
hist(oc, predict(oc, bananas$x[][idx.pred,]), th=0)
featurespace(oc, th=0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.