Also borrowed for SRNN code. Computes mean, stdev and dimensions to ignore. https://github.com/asheshjain399/RNNexp/blob/srnn/structural_rnn/CRFProblems/H3.6m/processdata.py#L33 Args completeData: nx99 matrix with data to normalize Returns data_mean: vector of mean used
(completeData)
| 250 | |
| 251 | |
| 252 | def normalization_stats(completeData): |
| 253 | """" |
| 254 | Also borrowed for SRNN code. Computes mean, stdev and dimensions to ignore. |
| 255 | https://github.com/asheshjain399/RNNexp/blob/srnn/structural_rnn/CRFProblems/H3.6m/processdata.py#L33 |
| 256 | |
| 257 | Args |
| 258 | completeData: nx99 matrix with data to normalize |
| 259 | Returns |
| 260 | data_mean: vector of mean used to normalize the data |
| 261 | data_std: vector of standard deviation used to normalize the data |
| 262 | dimensions_to_ignore: vector with dimensions not used by the model |
| 263 | dimensions_to_use: vector with dimensions used by the model |
| 264 | """ |
| 265 | data_mean = np.mean(completeData, axis=0) |
| 266 | data_std = np.std(completeData, axis=0) |
| 267 | |
| 268 | dimensions_to_ignore = [] |
| 269 | dimensions_to_use = [] |
| 270 | |
| 271 | dimensions_to_ignore.extend(list(np.where(data_std < 1e-4)[0])) |
| 272 | dimensions_to_use.extend(list(np.where(data_std >= 1e-4)[0])) |
| 273 | |
| 274 | data_std[dimensions_to_ignore] = 1.0 |
| 275 | |
| 276 | return data_mean, data_std, dimensions_to_ignore, dimensions_to_use |
| 277 | |
| 278 | |
| 279 | def define_actions(action): |
nothing calls this directly
no outgoing calls
no test coverage detected