Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

feature scaling in python

from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler()
from sklearn.linear_model import Ridge
X_train, X_test, y_train, y_test = train_test_split(X_data, y_data,
                                                   random_state = 0)

X_train_scaled = scaler.fit_transform(X_train)
X_test_scaled = scaler.transform(X_test)
Comment

PREVIOUS NEXT
Code Example
Python :: changing the current working directory in python 
Python :: python compute SSIM 
Python :: python get first n elements of dict 
Python :: python socket check if still connected 
Python :: delete directory if exists python 
Python :: anagram program in python 
Python :: python turn off printing 
Python :: django orm count 
Python :: how to catch ctrl c in python 
Python :: python sort two key 
Python :: create and populate dictionary python 
Python :: pd df drop columns 
Python :: concatenate dataframes pandas without duplicates 
Python :: To View the entire Row and Column in a Dataframe 
Python :: python delete key from dictionary 
Python :: change color of butto in thkinter 
Python :: Plot regression line from sklearn 
Python :: permutation with repetition python 
Python :: django get group users 
Python :: python cheat sheet 
Python :: pandas dataframe read string as date 
Python :: set index in datarame 
Python :: append item to array python 
Python :: scipy euclidean distance 
Python :: custom save django 
Python :: pandas merge on index column 
Python :: python talib install windows 
Python :: how to get index of closest value in list python 
Python :: tkinter margin 
Python :: tkinter template 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =