wine: Wine Recognition Data

wineR Documentation

Wine Recognition Data

Description

These data are the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars (1-3). The analysis determined the quantities of 13 constituents: alcohol, malic acid, ash, alcalinity of ash, magnesium, total phenols, flavanoids, nonflavanoid phenols, proanthocyanins, colour intensity, hue, OD280/OD315 of diluted wines, and proline found in each of the three types of the wines. The number of instances in classes 1 to 3 is 59, 71 and 48, respectively.

Usage

data(wine)

Format

wine is a data frame with 178 cases (rows) and 14 variables (columns) named:

  1. Alcohol continuous.

  2. Malic.Acid continuous.

  3. Ash continuous.

  4. Alcalinity.of.Ash continuous.

  5. Magnesium continuous.

  6. Total.Phenols continuous.

  7. Flavanoids continuous.

  8. Nonflavanoid.Phenols continuous.

  9. Proanthocyanins continuous.

  10. Color.Intensity continuous.

  11. Hue continuous.

  12. OD280.OD315.of.Diluted.Wines continuous.

  13. Proline continuous.

  14. Cultivar discrete 1, 2 or 3.

Source

A. Asuncion and D. J. Newman. Uci machine learning repository, 2007. http://archive.ics.uci.edu/ml/.

References

S. J. Roberts, R. Everson and I. Rezek. Maximum certainty data partitioning. Pattern Recognition, 33(5):833-839, 2000. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/S0031-3203(99)00086-2")}.

Examples

## Not run: 
devAskNewPage(ask = TRUE)

data(wine)

# Show level attributes.

levels(factor(wine[["Cultivar"]]))

# Split dataset into train (75

set.seed(3)

Wine <- split(p = 0.75, Dataset = wine, class = 14)

# Estimate number of components, component weights and component
# parameters for train subsets.

n <- range(a.ntrain(Wine))

K <- c(as.integer(1 + log2(n[1])), # Minimum v follows Sturges rule.
  as.integer(10 * log10(n[2]))) # Maximum v follows log10 rule.

K <- c(floor(K[1]^(1/13)), ceiling(K[2]^(1/13)))

wineest <- REBMIX(model = "REBMVNORM",
  Dataset = a.train(Wine),
  Preprocessing = "kernel density estimation",
  cmax = 10,
  Criterion = "ICL-BIC",
  pdf = rep("normal", 13),
  K = K[1]:K[2],
  Restraints = "loose",
  Mode = "outliersplus")

plot(wineest, pos = 1, nrow = 7, ncol = 6, what = c("pdf"))
plot(wineest, pos = 2, nrow = 7, ncol = 6, what = c("pdf"))
plot(wineest, pos = 3, nrow = 7, ncol = 6, what = c("pdf"))

# Selected chunks.

winecla <- RCLSMIX(model = "RCLSMVNORM",
  x = list(wineest),
  Dataset = a.test(Wine),
  Zt = a.Zt(Wine))

winecla

summary(winecla)

# Plot selected chunks.

plot(winecla, nrow = 7, ncol = 6)

## End(Not run)

rebmix documentation built on Sept. 11, 2024, 6:30 p.m.