normalization - Normalizing data in python 3 -
i creating 20 points python using gaussian distribution shown below:
xpoints1 = np.random.normal(2,1,20) ypoints1 = np.random.normal(3,1,20) xpoints2 = np.random.normal(10,1,20) ypoints2 = np.random.normal(8,1,20)
these points later used in order logistic regression , need normalize data feature scaling , not sure whether have done correctly .
normalization done below subtracting mean , dividing standard deviation :
for in range(0,len(xpoints1)): xpoints1[i] = (xpoints1[i]-2)/1 ypoints1[i] = (ypoints1[i] - 3) / 1 xpoints2[i] = (xpoints2[i] - 10) / 1 ypoints2[i] = (ypoints2[i] - 8) / 1
Comments
Post a Comment