Skip to content

Instantly share code, notes, and snippets.

@pjankiewicz
Created January 26, 2015 12:36
Show Gist options
  • Save pjankiewicz/6dd2081a70e31656407b to your computer and use it in GitHub Desktop.
Save pjankiewicz/6dd2081a70e31656407b to your computer and use it in GitHub Desktop.
#dataX - variables
#datay - labels
rows = dataX.shape[0]
out_of_fold_predictions = zeros(rows) # this is our out of fold prediction vector
for tr, te in cross_validation(10):
model = fit(dataX[tr,], datay[tr])
out_of_fold_predictions[te] = model.predict(data[te,])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment