Closed sevmardi closed 5 years ago
So training input is the actual input data from the dataset. The training size is how many data points to use from the principle component analysis.
Would you please briefly explain what's really is happening in this code
# Now some sample should be picked to train the model from training_input = {key: (X_train[Y_train == k, :])[:training_size] for k, key in enumerate(class_labels)} test_input = {key: (X_train[Y_train == k, :])[training_size:( training_size+test_size)] for k, key in enumerate(class_labels)}
Also, how can we know the size of the training_input which is fed to the model?
Was able to figure things out.
Hi, I was playing around with this tutorial. For some reason I don't seem to understand the what's really happening in the code below. And I am kinda confused. Please allow me to elaborate. If we set the
training_size=20
how is this different fromtraining_input
? What does training_size 20 and test 10 stand for in this case?See, as you mentioned, the dataset has indeed 30 features, and 569 datapoints. Are we only interested in the features or datapoints as well? Because (to clear-out my confusion) I am not sure how many datapoints we are using. I do see 20 in the plot. Can we increase this number?
# Now some sample should be picked to train the model from training_input = {key: (X_train[Y_train == k, :])[:training_size] for k, key in enumerate(class_labels)} test_input = {key: (X_train[Y_train == k, :])[training_size:( training_size+test_size)] for k, key in enumerate(class_labels)}