correlation: Correlation filter

correlationR Documentation

Correlation filter

Description

The algorithm finds weights of continous attributes basing on their correlation with continous class attribute.

Usage

linear.correlation(formula, data)
rank.correlation(formula, data)

Arguments

formula

a symbolic description of a model

data

data to process

Details

linear.correlation uses Pearson's correlation

rank.correlation uses Spearman's correlation

Rows with NA values are not taken into consideration.

Value

a data.frame containing the worth of attributes in the first column and their names as row names

Author(s)

Piotr Romanski

Examples

  library(mlbench)
  data(BostonHousing)
  d=BostonHousing[-4] # only numeric variables
  
  weights <- linear.correlation(medv~., d)
  print(weights)
  subset <- cutoff.k(weights, 3)
  f <- as.simple.formula(subset, "medv")
  print(f)

  weights <- rank.correlation(medv~., d)
  print(weights)
  subset <- cutoff.k(weights, 3)
  f <- as.simple.formula(subset, "medv")
  print(f)

FSelector documentation built on Aug. 23, 2023, 1:08 a.m.