DiscoverSubgroups {rsubgroup}R Documentation

Performs Subgroup Discovery

Description

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

Usage

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

Arguments

source

a data.frame or the a character string giving the filename of an ARFF file to use. Providing a file name directly provides the data to the subgroup discovery algorithms on the Java side, which is more memory efficient than converting the data frame to the Java representation.

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)

[Package rsubgroup version 1.1 Index]