mlearner version: 0.2.0
create_dataset
create_dataset(config, n)
Generate a Dataset.
Attributes
-
config
:dict
Dictionary for dataset configuration: p.e.:
dict = {
- `'A'` : data_uniform(0, 1, n),
- `'B'` : data_normal(n),
- `'C'` : data_normal(mu=5, sd=2, n=n),
- `'D'` : data_gamma(a=5, n=n)
}
-
n
:int
number of data in the dataset.
Returns
data
: Dataset
Examples
For usage examples, please see https://jaisenbe58r.github.io/MLearner/user_guide/data/create_dataset/
data_gamma
data_gamma(a=5, n=100)
Generate a Gamma data distribution.
Attributes
-
a
:int
orfloat
Parameter form.
-
n
:int
number of data in the dataset.
Returns
data
: Uniform data distribution.
Examples
For usage examples, please see https://jaisenbe58r.github.io/MLearner/user_guide/data/data_gamma/
data_normal
data_normal(mu=0, sd=1, n=100)
Generate a Normal data distribution.
Attributes
-
mu
:int
orfloat
mean value.
-
sd
:int
orfloat
standard deviation.
-
n
:int
number of data in the dataset.
Returns
data
: Uniform data distribution.
Examples
For usage examples, please see https://jaisenbe58r.github.io/MLearner/user_guide/data/data_normal/
data_uniform
data_uniform(a, b, n)
Generate a Uniform data distribution.
Attributes
-
a
:int
orfloat
manimum value of the entire dataset.
-
b
:int
orfloat
maximum value of the entire dataset.
-
n
:int
number of data in the dataset.
Returns
data
: Uniform data distribution.
Examples
For usage examples, please see https://jaisenbe58r.github.io/MLearner/user_guide/data/data_uniform/
wine_data
wine_data()
Wine dataset.
Source: https://archive.ics.uci.edu/ml/datasets/Wine Number of samples: 178 Class labels: {0, 1, 2}, distribution: [59, 71, 48]
Data Set Information:
These data are the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars. The analysis determined the quantities of 13 constituents found in each of the three types of wines.
The attributes are (dontated by Riccardo Leardi, riclea@anchem.unige.it)
- 1) Alcohol
- 2) Malic acid
- 3) Ash
- 4) Alcalinity of ash
- 5) Magnesium
- 6) Total phenols
- 7) Flavanoids
- 8) Nonflavanoid phenols
- 9) Proanthocyanins
- 10) Color intensity
- 11) Hue
- 12) OD280/OD315 of diluted wines
- 13) Proline
In a classification context, this is a well posed problem with "well behaved" class structures. A good data set for first testing of a new classifier, but not very challenging.
Returns
-
X, y
: [n_samples, n_features], [n_class_labels]X is the feature matrix with 178 wine samples as rows and 13 feature columns. y is a 1-dimensional array of the 3 class labels 0, 1, 2
Examples
For usage examples, please see https://jaisenbe58r.github.io/MLearner/user_guide/data/wine_data
adapted from
https://github.com/rasbt/mlxtend/blob/master/mlxtend/data/wine.py
Author: Sebastian Raschka <sebastianraschka.com>
License: BSD 3 clause