this method is from https://github.com/asheshjain399/RNNexp/blob/srnn/structural_rnn/CRFProblems/H3.6m/generateMotionData.py#L12
(normalized_data, data_mean, data_std, dimensions_to_ignore)
| 189 | |
| 190 | @staticmethod |
| 191 | def unnormalize_data(normalized_data, data_mean, data_std, dimensions_to_ignore): |
| 192 | """ |
| 193 | this method is from https://github.com/asheshjain399/RNNexp/blob/srnn/structural_rnn/CRFProblems/H3.6m/generateMotionData.py#L12 |
| 194 | """ |
| 195 | T = normalized_data.shape[0] |
| 196 | D = data_mean.shape[0] |
| 197 | |
| 198 | origData = np.zeros((T, D), dtype=np.float32) |
| 199 | dimensions_to_use = [] |
| 200 | for i in range(D): |
| 201 | if i in dimensions_to_ignore: |
| 202 | continue |
| 203 | dimensions_to_use.append(i) |
| 204 | dimensions_to_use = np.array(dimensions_to_use) |
| 205 | |
| 206 | origData[:, dimensions_to_use] = normalized_data |
| 207 | |
| 208 | # potentially inefficient, but only done once per experiment |
| 209 | stdMat = data_std.reshape((1, D)) |
| 210 | stdMat = np.repeat(stdMat, T, axis=0) |
| 211 | meanMat = data_mean.reshape((1, D)) |
| 212 | meanMat = np.repeat(meanMat, T, axis=0) |
| 213 | origData = np.multiply(origData, stdMat) + meanMat |
| 214 | |
| 215 | return origData |
nothing calls this directly
no outgoing calls
no test coverage detected