I just started to studying machine learning and I saw a code. I don't know anything about it. Also I don't know how to search it... I am stuck here please help. Here is the example code:
from sklearn import datasets, model_selection
import matplotlib.pyplot as plt
import numpy
X, y = datasets.load_diabetes(return_X_y=True)
X = X[:, numpy.newaxis, 2] # I didn't understand this part
X_train, X_test, y_train, y_test = model_selection.train_test_split(X, y, test_size=0.33)
plt.scatter(X_test, y_test, color='black')
plt.show()
Where does 2 come from? What is np.newaxis (I think this is a method which returns None but I am not sure) Also what are these parameters separated with commas inside square brackets? Please tell me the name of it or explain what it is. Thank you :)