Description Usage Arguments Details Value Examples
Fit a single mean or largest class model
1 2 3 4 5 6 7 |
x |
An optional matrix or data frame of predictors. These values are not used in the model fit |
y |
A numeric vector (for regression) or factor (for classification) of outcomes |
... |
Optional arguments (not yet used) |
object |
An object of class |
newdata |
A matrix or data frame of predictors (only used to determine the number of predictions to return) |
type |
Either "raw" (for regression), "class" or "prob" (for classification) |
nullModel
emulates other model building functions, but returns the simplest model possible given a training set: a single mean for numeric outcomes and the most prevalent class for factor outcomes. When class probabilities are requested, the percentage of the training set samples with the most prevalent class is returned.
The output of nullModel
is a list of class nullModel
with elements
call |
the function call |
value |
the mean of |
levels |
when |
pct |
when |
n |
the number of elements in |
predict.nullModel
returns a either a factor or numeric vector depending on the class of y
. All predictions are always the same.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.