Row-normalize feature matrix and convert to tuple representation
(features)
| 317 | |
| 318 | |
| 319 | def _preprocess_features(features): |
| 320 | """Row-normalize feature matrix and convert to tuple representation""" |
| 321 | features = _normalize(features) |
| 322 | return np.asarray(features.todense()) |
| 323 | |
| 324 | |
| 325 | def _parse_index_file(filename): |