Skip to content

Instantly share code, notes, and snippets.

View lakshaychhabra's full-sized avatar
👨‍💻
Focusing

Lakshay Chhabra lakshaychhabra

👨‍💻
Focusing
View GitHub Profile
labels = {"c#" : 0, "java" : 1, "c++" : 2, "c" : 3, "ios" : 4}
labels_map = { 0 : "c#" , 1 : "java" , 2 : "c++" , 3 : "c", 4 : "ios"}
processed["Tags"] = processed["Tags"].map(labels)
X = processed.Title.values
y = processed.Tags.values
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.20,stratify = y)
X_train, X_cv, y_train, y_cv = train_test_split(X_train, y_train, test_size=0.25, stratify = y_train)