The TransformView allows one to transform a dataset via an arbitrary transformation matrix. The usual rules of matrix algebra apply along with one other restriction - the matrix must not produce more columns than the parent dataset. This effectively restricts the matrix which can be used to an matrix where is the number of columns of the parent dataset.
For an example, let's create a view which transforms a 2D dataset from a standard orthogonal basis to the orthogonal basis . The matrix we'll use is .
>>> ds = Dataset(MLab.rand(4,2)) >>> tv = TransformView(ds, Numeric.array([[0.5, 0.5], ... [0.5, -0.5]])) >>> ds.getData() [[ 0.78208232, 0.64115632,] [ 0.6568898 , 0.91970539,] [ 0.19737017, 0.42274952,] [ 0.32603681, 0.25608519,]] >>> tv.getData() [[ 0.71161932, 0.070463 ,] [ 0.78829759,-0.1314078 ,] [ 0.31005985,-0.11268967,] [ 0.291061 , 0.03497581,]]