Skip to content

Instantly share code, notes, and snippets.

@JonnatasCabral
Created November 1, 2016 18:25
Show Gist options
  • Save JonnatasCabral/c4b9a3fd0840bbbe03401d19eaa34dba to your computer and use it in GitHub Desktop.
Save JonnatasCabral/c4b9a3fd0840bbbe03401d19eaa34dba to your computer and use it in GitHub Desktop.
import numpy as np
class Dataset(object):
data = None
target = None
target_names = None
def __repr__(self):
rep = "Dataset(\n data: {0}, \n target: {1}, \n target_names: {2},\n)"\
.format(self.data, self.target, self.target_names)
return rep
def __init__(self, data=[], target=[], target_names=[]):
self.data = np.array(data)
self.target = np.array(target)
self.target_names = np.array(target_names)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment