Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

minmaxscaler transform

# Scale the features to between -1 and 1
from sklearn.preprocessing import MinMaxScaler
scaler=MinMaxScaler((-1,1))
x=scaler.fit_transform(features)
y=labels

# Inverse trasnforms
scaler.inverse_transform(x)
https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.MinMaxScaler.html
Comment

PREVIOUS NEXT
Code Example
Python :: Python __mul__ magic method 
Python :: reply_photo bot telegram python 
Python :: scatter density plot seaborn 
Python :: condition python 
Python :: numpy arange float step 
Python :: python keyboard input 
Python :: import matplotlib sub 
Python :: python glob.glob recursive 
Python :: Python Time duration in seconds 
Python :: how to merge dictionaries in python 
Python :: how to add zeros in front of numbers in pandas 
Python :: find string in list and return index python 
Python :: python django query 
Python :: how to use prettytable in python 
Python :: python machine learning model 
Python :: django on delete set default 
Python :: re.search() python 
Python :: negative indexing in python 
Python :: add list of dictionaries to pandas dataframe 
Python :: adding two strings together in python 
Python :: how to make a grid in python 
Python :: django model inheritance 
Python :: what is index in list in python 
Python :: match case in python 
Python :: split column values 
Python :: how to extract dictionary value from string in python 
Python :: render to response django 
Python :: python for loop 
Python :: matplotlib.pyplot 
Python :: mathplolib avec date 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =