Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = [1, 2, 3, 4]
- def normalize(x):
- for i in range(len(x)):
- return [(x[i] - min(x)) / (max(x) - min(x))]
- normalize(x):
- [0.0]
- [0.00, 0.33, 0.66, 1.00]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement