Created
September 12, 2020 04:42
-
-
Save PhilipPurwoko/61336f592a7a8d092ca975666e3dce6f 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
# Memisahkan dataframe awal menjadi data dan label | |
data = dataframe_int.drop('Drug',axis=1) | |
label = dataframe_int['Drug'] | |
# Memisahkan dataframe menjadi data latihan dan data tes | |
from sklearn.model_selection import train_test_split | |
x_train, x_test, y_train, y_test = train_test_split(data,label,test_size=0.2) | |
# Print dataframe.shape untuk mengetahui bentuk dataframe | |
print(x_train.shape,y_train.shape) | |
print(x_test.shape,y_test.shape) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment