Last data update: 2014.03.03

R: Performs Subgroup Discovery
DiscoverSubgroupsR Documentation

Performs Subgroup Discovery

Description

Performs subgroup discovery according to the given target and the configuration on the data.

Usage

DiscoverSubgroups(source, target, config=new("SDTaskConfig"), as.df=FALSE)

Arguments

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 ToDataFrame

See Also

DiscoverSubgroupsByTask. as.target CreateSDTask SDTaskConfig

Examples

# 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)

Results