Created
July 1, 2013 05:51
-
-
Save aita/5898640 to your computer and use it in GitHub Desktop.
標準化変量の計算
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scipy.stats | |
| import numpy as np | |
| import scipy as sp | |
| DATA = [ | |
| (400, 60), | |
| (15, 30), | |
| (480, 365), | |
| (993, 190), | |
| (600, 136), | |
| (150, 15), | |
| (115, 37), | |
| (50, 100), | |
| (0, 170), | |
| (130, 70), | |
| (3000, 783), | |
| (500, 560), | |
| (200, 50), | |
| (55, 35), | |
| (2200, 595), | |
| (1, 200), | |
| (900, 300), | |
| (1000, 356), | |
| (450, 155), | |
| (400, 250) | |
| ] | |
| d1, d2 = zip(*DATA) | |
| print [(x-np.mean(d1)) / np.std(d1) for x in d1] | |
| print [(x-np.mean(d2)) / np.std(d2) for x in d2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment