Skip to content

Instantly share code, notes, and snippets.

@aagnone3
Created October 30, 2020 00:20
Show Gist options
  • Save aagnone3/e3cd062b913eea3658c8445e9aabd145 to your computer and use it in GitHub Desktop.
Save aagnone3/e3cd062b913eea3658c8445e9aabd145 to your computer and use it in GitHub Desktop.
sf_crime_13.py
X_train, y_train = to.train.xs, to.train.ys.values.ravel()
X_validation, y_validation = to.valid.xs, to.valid.ys.values.ravel()
mask_positive_class = (y_validation == 1)
print(f"The train set has {np.bincount(y_train)[1]} positive labels.")
print(f"The validation set has {np.bincount(y_validation)[1]} positive labels.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment