DiscoverSubgroups {rsubgroup} | R Documentation |
Performs subgroup discovery according to the given target and the configuration on the data.
DiscoverSubgroups(source, target, config= SDTaskConfig(), as.df=FALSE)
source |
a data.frame or the a character string giving the filename of an ARFF file to use. |
target |
the target variable (constructed by as.target) to consider for subgroup discovery. |
config |
an instance of SDTaskConfig providing various parameters for subgroup discovery. |
as.df |
TRUE, if the result patterns should be returned as
a data.frame using |
DiscoverSubgroupsByTask
.
as.target
CreateSDTask
SDTaskConfig
# subgroup discovery on a data.frame, for binary target data(credit.data) result1 <- DiscoverSubgroups( credit.data, as.target("class", "good"), new("SDTaskConfig", attributes=c("checking_status", "credit_amount", "employment", "purpose"))) result2 <- DiscoverSubgroups( credit.data, as.target("class", "good"), new("SDTaskConfig", attributes=c("checking_status", "employment"))) ToDataFrame(result1) ToDataFrame(result2) # subgroup discovery for numeric target variable result3 <- DiscoverSubgroups( credit.data, as.target("credit_amount"), new("SDTaskConfig", attributes=c("checking_status", "employment"))) ToDataFrame(result3)