Last active
February 12, 2018 12:54
-
-
Save quiye/49c8f3b25583c4176871a3998a0d94c6 to your computer and use it in GitHub Desktop.
平均を0にする正規化のやり方
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 numpy as np | |
from numpy.random import * | |
m = 5 | |
n = 3 | |
a = rand(m,n) | |
v = np.full((n,n),1) | |
u = np.full((m,m),1) | |
print('a => 入力の行列') | |
print(a) | |
print("a-1/n*a.dot(vv) => 各行の和が0") | |
print(a-1/n*a.dot(v)) | |
print("a-1/m*uu.dot(a) => 各列の和が0") | |
print(a-1/m*u.dot(a)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vv
,uu
ではなく、単にv
,u
なのでは?