https://github.com/cran/FSelector
Revision a6a4107a08051dfddc3c733102d002fd8617ab9e authored by Lars Kotthoff on 25 October 2014, 00:00:00 UTC, committed by Gabor Csardi on 25 October 2014, 00:00:00 UTC
1 parent c389439
Raw File
Tip revision: a6a4107a08051dfddc3c733102d002fd8617ab9e authored by Lars Kotthoff on 25 October 2014, 00:00:00 UTC
version 0.20
Tip revision: a6a4107
chi.squared.Rd
\name{chi.squared}
\alias{chi.squared}
\title{ Chi-squared filter }
\description{
  The algorithm finds weights of discrete attributes basing on a chi-squared test.
}
\usage{
chi.squared(formula, data)
}
\arguments{
  \item{formula}{ a symbolic description of a model }
  \item{data}{ a symbolic description of a model }
}
\details{
  The result is equal to Cramer's V coefficient between source attributes and destination attribute.
}
\value{
a data.frame containing the worth of attributes in the first column and their names as row names
}
\author{ Piotr Romanski }
\examples{
  library(mlbench)
  data(HouseVotes84)

  weights <- chi.squared(Class~., HouseVotes84)
  print(weights)
  subset <- cutoff.k(weights, 5)
  f <- as.simple.formula(subset, "Class")
  print(f)
}
back to top