generateFunctionalANOVAData(obj, input, features, depth = 1L, fun = mean, bounds = c(qnorm(0.025), qnorm(0.975)), resample = "none", fmin, fmax, gridsize = 10L)
WrappedModel
]
Result of train
.data.frame
| Task
]
Input data.character
]
A vector of feature names contained in the training data.
If not specified all features in the input
will be used.integer(1)
]
An integer indicating the depth of interaction amongst the features to compute. Default 1.function
]
A function that accepts a numeric vector and returns either a single number
such as a measure of location such as the mean, or three numbers, which give a lower bound,
a measure of location, and an upper bound. Note if three numbers are returned they must be
in this order. The default is the mean.numeric(2)
]
The value (lower, upper) the estimated standard error is multiplied by to estimate the bound on a
confidence region for a partial dependence. Ignored if predict.type != "se"
for the learner.
Default is the 2.5 and 97.5 quantiles (-1.96, 1.96) of the Gaussian distribution.character(1)
]
Defines how the prediction grid for each feature is created. If bootstrap then
values are sampled with replacement from the training data. If subsample then
values are sampled without replacement from the training data. If none an evenly spaced
grid between either the empirical minimum and maximum, or the minimum and maximum defined by
fmin
and fmax
, is created.
Default is none.numeric
]
The minimum value that each element of features
can take.
This argument is only applicable if resample = NULL
and when the empirical minimum is higher
than the theoretical minimum for a given feature. This only applies to numeric features and a
NA
should be inserted into the vector if the corresponding feature is a factor.
Default is the empirical minimum of each numeric feature and NA for factor features.numeric
]
The maximum value that each element of features
can take.
This argument is only applicable if resample = "none"
and when the empirical maximum is lower
than the theoretical maximum for a given feature. This only applies to numeric features and a
NA
should be inserted into the vector if the corresponding feature is a factor.
Default is the empirical maximum of each numeric feature and NA for factor features.integer(1)
]
The length of the prediction grid created for each feature.
If resample = "bootstrap"
or resample = "subsample"
then this defines
the number of (possibly non-unique) values resampled. If resample = NULL
it defines the
length of the evenly spaced grid created. Default 10.predict
.FunctionalANOVAData
]. A named list, which contains the computed effects of the specified
depth amongst the features.Object members:generateCalibrationData
,
generateCritDifferencesData
,
generateFilterValuesData
,
generateLearningCurveData
,
generatePartialDependenceData
,
generateThreshVsPerfData
,
getFilterValues
fit = train("regr.rpart", bh.task)
fa = generateFunctionalANOVAData(fit, bh.task, c("lstat", "crim"), depth = 2L)
plotPartialDependence(fa)
Run the code above in your browser using DataLab