text_plain_output_1.png
from sklearn.model_selection import train_test_split,GridSearchCV

from sklearn.preprocessing import StandardScaler

import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

file = pd.read_csv('../input/pulsar_stars.csv')

y = file.target_class
X = file[file.columns[:8]]
X.shape

y.value_counts()

scaler = StandardScaler()
X_scaled = scaler.fit_transform(X.astype(np.float64))

X_train, X_test, y_train, y_test = train_test_split(X_scaled, y, test_size=0.3, random_state=0)
print('Number transactions X_train dataset: ', X_train.shape)
print('Number transactions y_train dataset: ', y_train.shape)
print('Number transactions X_test dataset: ', X_test.shape)
print('Number transactions y_test dataset: ', y_test.shape)