Esempio n. 1
0
def read_dataset():
    dataset = sets.Ocr()
    dataset = sets.OneHot(dataset.target, depth=2)(dataset, columns=['target'])
    dataset['data'] = dataset.data.reshape(dataset.data.shape[:-2] +
                                           (-1, )).astype(float)
    train, test = sets.Split(0.66)(dataset)
    return train, test
Esempio n. 2
0
def get_dataset():
    """Read dataset and flatten images."""
    dataset = sets.Ocr()
    dataset = sets.OneHot(dataset.target, depth=2)(dataset, columns=['target'])
    dataset['data'] = dataset.data.reshape(dataset.data.shape[:-2] +
                                           (-1, )).astype(float)
    train, test = sets.Split(0.66)(dataset)
    return train, test
Esempio n. 3
0
def test_ocr():
    dataset = sets.Ocr()
    dataset = sets.OneHot(dataset.target, depth=2)(dataset, columns=['target'])