[Python语音识别项目笔记] 2矩阵标准化和去标准化
生活随笔
收集整理的這篇文章主要介紹了
[Python语音识别项目笔记] 2矩阵标准化和去标准化
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?標準化以標準化多維數組的列。功能Standardize將多維數組數據_矩陣作為其輸入參數。它從每一列中提取平均值并除以標準差。它返回標準化矩陣、平均值行和標準偏差行。
def standardise(data_matrix): ### BEGIN SOLUTION row_of_means = np.mean(data_matrix, axis=0) standardised_matrix = data_matrix - row_of_means row_of_stds = np.std(standardised_matrix, axis=0) return (standardised_matrix / row_of_stds), row_of_means, row_of_stds ### END SOLUTION def de_standardise(standardised_matrix, row_of_means, row_of_stds): ### BEGIN SOLUTION matrix = np.copy(standardised_matrix * row_of_stds) return matrix + row_of_means ### END SOLUTION 與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的[Python语音识别项目笔记] 2矩阵标准化和去标准化的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 科大星云诗社动态20201203
- 下一篇: java map同步访问_同步 - J