Description Usage Format Source References
The wine dataset contains the results of a chemical analysis of
wines grown in a specific area of Italy. Three types of wine are
represented in the 178 samples, with the results of 13 chemical
analyses recorded for each sample. The Type variable has been
transformed into a categoric variable.
The data contains no missing values and consits of only numeric data,
with a three class target variable (Type) for classification.
1 |
A data frame containing 178 observations of 13 variables.
TypeThe type of wine, into one of three classes, 1 (59 obs), 2(71 obs), and 3 (48 obs).
AlcoholAlcohol
MalicMalic acid
AshAsh
AlcalinityAlcalinity of ash
MagnesiumMagnesium
PhenolsTotal phenols
FlavanoidsFlavanoids
NonflavanoidsNonflavanoid phenols
ProanthocyaninsProanthocyanins
ColorColor intensity.
HueHue
DilutionD280/OD315 of diluted wines.
ProlineProline
The data was downloaded from the UCI Machine Learning Repository.
It was read as a CSV file with no header using
read.csv. The columns were then given the appropriate
names using colnames and the Type was transformed into a
factor using as.factor. The compressed R data file was
saved using save:
1 2 3 4 5 6 7 8 9 10 11 12 | UCI <- "http://archive.ics.uci.edu/ml"
REPOS <- "machine-learning-databases"
wine.url <- sprintf("
wine <- read.csv(wine.url, header=FALSE)
colnames(wine) <- c('Type', 'Alcohol', 'Malic', 'Ash',
'Alcalinity', 'Magnesium', 'Phenols',
'Flavanoids', 'Nonflavanoids',
'Proanthocyanins', 'Color', 'Hue',
'Dilution', 'Proline')
wine$Type <- as.factor(wine$Type)
save(wine, file="wine.Rdata", compress=TRUE)
|
Asuncion, A. & Newman, D.J. (2007). UCI Machine Learning Repository [http://www.ics.uci.edu/~mlearn/MLRepository.html]. Irvine, CA: University of California, School of Information and Computer Science.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.