The parameters “subset”, “features”, and “recode.target”
are ignored for the data.frame method.
getFunctionalFeatures(object, subset = NULL, features, recode.target = "no")
# S3 method for Task
getFunctionalFeatures(object, subset = NULL, features, recode.target = "no")
# S3 method for data.frame
getFunctionalFeatures(object, subset = NULL, features, recode.target = "no")
Arguments
object |
(Task/data.frame)
Object to check on. |
subset |
(integer | logical | NULL )
Selected cases. Either a logical or an index vector.
By default NULL if all observations are used. |
features |
(character | integer | logical)
Vector of selected inputs. You can either pass a character vector with the
feature names, a vector of indices, or a logical vector.
In case of an index vector each element denotes the position of the feature
name returned by getTaskFeatureNames.
Note that the target feature is always included in the
resulting task, you should not pass it here.
Default is to use all features. |
recode.target |
(character(1) )
Should target classes be recoded? Supported are binary and multilabel classification and survival.
Possible values for binary classification are “01”, “-1+1” and “drop.levels”.
In the two latter cases the target vector is converted into a numeric vector.
The positive class is coded as “+1” and the negative class either as “0” or “-1”.
“drop.levels” will remove empty factor levels in the target column.
In the multilabel case the logical targets can be converted to factors with “multilabel.factor”.
For survival, you may choose to recode the survival times to “left”, “right” or “interval2” censored times
using “lcens”, “rcens” or “icens”, respectively.
See survival::Surv for the format specification.
Default for both binary classification and survival is “no” (do nothing). |
Value
Returns a data.frame
containing only the functional features.