Dear all,
Qn. How can we save features using pickle in python
Ans.
import pickle
pickle.dump(X, open('X.pkl', 'wb'))
pickle.dump(y, open('y.pkl', 'wb'))
X = pickle.load(open('X.pkl', 'rb'))
y = pickle.load(open('y.pkl', 'rb'))
//And split to make testing
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.3)
No comments:
Post a Comment