I examined the arguments in model_selection.train_test_split.
Then the following contents will appear.
test_size: Specify the percentage of test data between 0.0 and 1.0.
train_size: Specifies the percentage of training data between 0.0 and 1.0.
I was wondering how to recognize training data and test data here.
Please check if your recognition of this function is correct below.
model_selection.train_test_split returns two lists for the given data.
Take the ratio of the previous list of the two lists as an argument: train_size
The ratio of the list after the two lists is specified by the argument: test_size.
data_train, data_test =
Training data, test data
Therefore, if you decide the ratio of the previous list, you can change the ratio of training data, and if you change the ratio of the latter list, you can change the ratio of test data.
Is it this recognition?
"" "Classified into learning data and verification data" "" from sklearn import model_selection data_train, data_test = model_selection.train_test_split (data, train_size = 0.8)
Answer # 1
Is it this recognition?
correct. If you specify the ratio of either test_size or train_size, the other can be calculated by 1 --test_size (or 1- train_size), so you can specify test_size = 0.2.
- about python argument and data definition
- python - about downloading youtube videos by youtube-dl
- python - about hamiltonian neural networks
- python - about write loop to csv
- python 3x - about downloading anaconda
- python - if you want to put a number directly in the argument of most_similar of gensim
- python - about the optimum angle of rotation matrix
- python 3x - i want to get the nth array with an argument using python3 argparse
- about processing to exclude the character string group specified from list in python
- python - about "" "of" "" select === = "" "
- python - what i don't understand about yolo9000 (v2)
- about batch change of file name using python
- about the python speedtest code
- about the implementation of combinations in python
- please tell me about the role of python tag = "mychr"
- about python def issues
- about the operation of python's speedtest module (library)
- python, about the fire spread step of forest fire simulation
- python - about x-axis adjustment in matplotlib
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
- sh - 'apt-get' is not recognized as an internal or external command, operable program or batch file