wine | R Documentation |
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.
data(wine)
wine
is a data frame with 178 cases (rows) and 14 variables (columns) named:
Alcohol
continuous.
Malic.Acid
continuous.
Ash
continuous.
Alcalinity.of.Ash
continuous.
Magnesium
continuous.
Total.Phenols
continuous.
Flavanoids
continuous.
Nonflavanoid.Phenols
continuous.
Proanthocyanins
continuous.
Color.Intensity
continuous.
Hue
continuous.
OD280.OD315.of.Diluted.Wines
continuous.
Proline
continuous.
Cultivar
discrete 1
, 2
or 3
.
A. Asuncion and D. J. Newman. Uci machine learning repository, 2007. http://archive.ics.uci.edu/ml/.
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")}.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.