mvpa2.misc.data_generators.random_affine_transformation

mvpa2.misc.data_generators.random_affine_transformation(ds, scale_fac=100.0, shift_fac=10.0)

Distort a dataset by random scale, shift, and rotation.

The original data samples are transformed by applying a random rotation, shifting by a random vector (randomly selected, scaled input sample), and scaled by a random factor (randomly selected input feature values, scaled by an additional factor). The effective transformation values are stored in the output dataset’s attribute collection as ‘random_rotation’, ‘random_shift’, and ‘random_scale’ respectively.

Parameters:

ds : Dataset

Input dataset. Its sample and features attributes will be assigned to the output dataset.

scale_fac : float

Factor by which the randomly selected value for data scaling is scaled itself.

shift_fac : float

Factor by which the randomly selected shift vector is scaled.