Skip to content

Instantly share code, notes, and snippets.

@ImadDabbura
Created August 3, 2018 20:28
Show Gist options
  • Save ImadDabbura/c1c88ff62708ad64f125fab426bc9de8 to your computer and use it in GitHub Desktop.
Save ImadDabbura/c1c88ff62708ad64f125fab426bc9de8 to your computer and use it in GitHub Desktop.
# Get number of positve and negative examples
pos = df[df["left"] == 1].shape[0]
neg = df[df["left"] == 0].shape[0]
print("Positive examples = {}".format(pos))
print("Negative examples = {}".format(neg))
print("Proportion of positive to negative examples = {:.2f}%".format((pos / neg) * 100))
sns.countplot(df["left"])
plt.xticks((0, 1), ["Didn't leave", "Left"])
plt.xlabel("Left")
plt.ylabel("Count")
plt.title("Class counts");
@ImadDabbura
Copy link
Author

Added class_dist_employee_data.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment