Skip to content

Instantly share code, notes, and snippets.

@claustres
Created November 15, 2020 20:53
Show Gist options
  • Save claustres/ddbd3a3f89038374ccfa497cfd5ac35a to your computer and use it in GitHub Desktop.
Save claustres/ddbd3a3f89038374ccfa497cfd5ac35a to your computer and use it in GitHub Desktop.
Machine Learning in a Nutshell
// Select the model to use and its hyperparameters
model = new Model(hyperparameters)
// Split available data into train and test datasets
x_train, y_train, x_test, y_test = split_data(x, y)
// Perform training
model.fit(x_train, y_train)
// Compute model performance over test dataset
model.compute_accuracy(x_test, y_test)
// Use model to predict new data
y = model.predict(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment