Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

minmaxscaler python

from numpy import asarray
from sklearn.preprocessing import MinMaxScaler
# define data
data = asarray([[100, 0.001],
				[8, 0.05],
				[50, 0.005],
				[88, 0.07],
				[4, 0.1]])
print(data)
# define min max scaler
scaler = MinMaxScaler()
# transform data
scaled = scaler.fit_transform(data)
print(scaled)
Comment

minmax python

# Were you looking for min max python?
# if this is the case (works also with sets and numpy array)

>>> l = [1,2,8,4,7,9,6,3]
>>> min(l)
1
>>> max(l)
9
Comment

PREVIOUS NEXT
Code Example
Python :: np.divide 
Python :: python all 
Python :: __call__() python 
Python :: remove element from a list python 
Python :: python iterrows 
Python :: dataframe names pandas 
Python :: Bellman-Ford 
Python :: if elif and else in python 
Python :: how to change datatype of column in pandas 
Python :: “Python unittest Framework 
Python :: Show all column names and indexes dataframe python 
Python :: enum 
Python :: Unreadable Notebook: jpyter 
Python :: django.core.exceptions.ImproperlyConfigured: Field name is not valid for model 
Python :: create tab in python text 
Python :: how to count the iteration a list python 
Python :: fcn tensorflow 
Python :: python get num chars 
Python :: print A to Z in python uppercase 
Python :: how to test webhook in python.py 
Python :: star question in pyton 
Python :: #finding the differences between setA and SetB: 
Python :: python how to make item assignemnt class 
Python :: whois eyedress 
Python :: mostFrequentDays python 
Python :: RuntimeError: DataLoader worker (pid(s) 13615) exited unexpectedly 
Python :: how to make python faster 
Python :: numpy move columns 
Python :: mhaan meaning in english 
Python :: how to import pil in spyder 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =