Completed
Push — master ( 3e1d4c...f31f72 )
by Bart
27s
created

Iris.__init__()   A

Complexity

Conditions 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 5
rs 9.4285
1
from fuel.datasets import H5PYDataset
2
from fuel.utils import find_in_data_path
3
4
5
class Iris(H5PYDataset):
6
    u"""Iris dataset.
7
8
    Iris [IRIS] is a simple pattern recognition dataset, which consist of
9
    3 classes of 50 examples each having 4 real-valued features each, where
10
    each class refers to a type of iris plant. It is accessible through the
11
    UCI Machine Learning repository [UCIIRIS].
12
13
    .. [IRIS] Ronald A. Fisher, *The use of multiple measurements in
14
       taxonomic problems*, Annual Eugenics, 7, Part II, 179-188,
15
       September 1936.
16
    .. [UCIIRIS] https://archive.ics.uci.edu/ml/datasets/Iris
17
18
    Parameters
19
    ----------
20
    which_sets : tuple of str
21
        Which split to load. Valid value is 'all'
22
        corresponding to 150 examples.
23
24
    """
25
    filename = 'iris.hdf5'
26
27
    def __init__(self, which_sets, **kwargs):
28
        kwargs.setdefault('load_in_memory', True)
29
        super(Iris, self).__init__(
30
            file_or_path=find_in_data_path(self.filename),
31
            which_sets=which_sets, **kwargs)
32