Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

standardscaler in machine learning

# example of a standardization
from numpy import asarray
from sklearn.preprocessing import StandardScaler
# define data
data = asarray([[100, 0.001],
				[8, 0.05],
				[50, 0.005],
				[88, 0.07],
				[4, 0.1]])
print(data)
# define standard scaler
scaler = StandardScaler()
# transform data
scaled = scaler.fit_transform(data)
print(scaled)
Comment

standardscaler

# Preprocessing allows us to standarsize our data
from sklearn import preprocessing
# define standard scaler
scaler = StandardScaler()
# transform data
scaled = scaler.fit_transform(data)
Comment

PREVIOUS NEXT
Code Example
Python :: selenium refresh till the element appears python 
Python :: mean class accuracy sklearn 
Python :: plot pandas figsize 
Python :: spike python 
Python :: vs code run python in terminal invalid syntax 
Python :: alarm when code finishes 
Python :: python live server 
Python :: Removing all non-numeric characters from string in Python 
Python :: python check if all dictionary values are False 
Python :: django update increment 
Python :: view point cloud open3d 
Python :: for each value in column pandas 
Python :: django import timezone 
Python :: replace multiple spaces with single space python 
Python :: python number with comma to float 
Python :: django not saving images forms 
Python :: mario dance dance revolution 
Python :: pil image shape 
Python :: nlargest 
Python :: get a list of all files python 
Python :: average within group by pandas 
Python :: python better while loop that count up 
Python :: random number pythn 
Python :: rename files in a folder python 
Python :: pyqt pylatex 
Python :: python rickroll code 
Python :: python read png file 
Python :: open text file in python 
Python :: dask show progress bar 
Python :: windows alert python 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =