python to matlab [1,x] form question
1 Ansicht (letzte 30 Tage)
Hello ,there is a trick in python to turn every matrices of NX2 into an NX2 matrices where the first column is all '1'
as shown in python bellow. i tried the same trick in matlab, its not working.
Where did i got wrong?
feature_matrix = (feature_matrix - feature_matrix.mean()) / feature_matrix.std()
Peng Li am 13 Apr. 2020
why don't you zscore the x_mat first and add your column vector of all ones, although I don't quite understand why you want to do this. mathematically, std(ones(1, whateverLength)) is 0 and you divide 0 by 0 which will give you a nan.