Skip to content

Instantly share code, notes, and snippets.

@merylldindin
Created August 28, 2019 17:53
Show Gist options
  • Save merylldindin/52bfa7acc77ddc3b055c81d65c99b664 to your computer and use it in GitHub Desktop.
Save merylldindin/52bfa7acc77ddc3b055c81d65c99b664 to your computer and use it in GitHub Desktop.
# Load the dataset
x,y = load_iris(return_X_y=True)
# Split it in training and validation
x_t, x_v, y_t, y_v = train_test_split(x, y, test_size=0.2, shuffle=True, random_state=42)
# Build a representation of the problem
arg = {'threads': cpu_count(), 'weights': False}
prb = Prototype(x_t, x_v, y_t, y_v, 'ETS', 'classification', 'acc', **arg)
# Instantiate and run a one-shot learning based on the given configuration
exp = Experiment()
exp.single(prb, random_state=42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment