Thank you for the reply.
This is how I get the y_pred.
I am developing a model to classify the behavior of people so that necessary actions can be taken for each individual.
This is how I get the y_pred.
# split data from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split( X, y, test_size=0.25, random_state=0, shuffle=True) # Feature Scaling from sklearn.preprocessing import StandardScaler sc = StandardScaler() X_train = sc.fit_transform(X_train) X_test = sc.transform(X_test) # Fitting SVM from sklearn.svm import SVC classifier = SVC(kernel = 'linear', random_state = 0) classifier.fit(X_train, y_train) # Predicting the Test y_pred = classifier.predict(X_test)This is my desired result dataset.
df1 = pd.concat([X_test.reset_index(drop='True'),y_pred.reset_index(drop='True')],axis=1)I want to join the x_test+y_pred so that i can compare the predicted result one by one. By doing above concat, does each row of y_test and y_pred align in the same order as in x_test?
I am developing a model to classify the behavior of people so that necessary actions can be taken for each individual.