# Standardise the data

from sklearn.preprocessing import StandardScaler
import pandas
import numpy
url = "https://goo.gl/vhm1eU"
names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class']
dataFrame = pandas.read_csv(url, names=names)

# Separate array into input and output components
array = dataFrame.values
X = array[:, 0:8]
Y = array[:, 8]

scaler = StandardScaler().fit(X)
rescaledX = scaler.transform(X)

# Summarize

numpy.set_printoptions(precision=3)
print(rescaledX[0:5, :])

c5a96374ab3f14e9b6487379738c563adf25add9
<mask token>

<mask token>
numpy.set_printoptions(precision=3)
print(rescaledX[0:5, :])

<mask token>
url = 'https://goo.gl/vhm1eU'
names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class'
    ]
dataFrame = pandas.read_csv(url, names=names)
array = dataFrame.values
X = array[:, 0:8]
Y = array[:, 8]
scaler = StandardScaler().fit(X)
rescaledX = scaler.transform(X)
numpy.set_printoptions(precision=3)
print(rescaledX[0:5, :])

from sklearn.preprocessing import StandardScaler
import pandas
import numpy
url = 'https://goo.gl/vhm1eU'
names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class'
    ]
dataFrame = pandas.read_csv(url, names=names)
array = dataFrame.values
X = array[:, 0:8]
Y = array[:, 8]
scaler = StandardScaler().fit(X)
rescaledX = scaler.transform(X)
numpy.set_printoptions(precision=3)
print(rescaledX[0:5, :])

# Standardise the data

from sklearn.preprocessing import StandardScaler
import pandas
import numpy
url = "https://goo.gl/vhm1eU"
names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class']
dataFrame = pandas.read_csv(url, names=names)

# Separate array into input and output components
array = dataFrame.values
X = array[:, 0:8]
Y = array[:, 8]

scaler = StandardScaler().fit(X)
rescaledX = scaler.transform(X)

# Summarize

numpy.set_printoptions(precision=3)
print(rescaledX[0:5, :])
