Created
August 1, 2020 13:55
-
-
Save arunm8489/7d96aabf388ca876d81a12315d0651d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# handling numeric features | |
train_numeric = np.concatenate((X_train['price'].values.reshape(-1, 1),X_train['teacher_number_of_previously_posted_projects'].values.reshape(-1, 1),X_train['quantity'].values.reshape(-1,1),X_train['presence_of_num'].values.reshape(-1, 1)),axis=1) | |
test_numeric = np.concatenate((X_test['price'].values.reshape(-1, 1), X_test['teacher_number_of_previously_posted_projects'].values.reshape(-1, 1),X_test['quantity'].values.reshape(-1,1),X_test['presence_of_num'].values.reshape(-1, 1)),axis=1) | |
stndardscalar = StandardScaler() | |
std_train_numeric = stndardscalar.fit_transform(train_numeric) | |
std_test_numeric = stndardscalar.transform(test_numeric) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment