Cutout operation splits horizontally input PSG Matrix in N equally-sized sub-matrices and removes from the input matrix one sub-matrix. Cutout and Takein operations can be used, for instance, in N-fold cross-validation in statistical procedures, such as linear regression.
Syntax
Cutout(k,N,<matrix_init>),
Parameters
<matrix_init> |
name of input PSG Matrix; |
N |
number of (approximately) equally-sized sub-matrices; |
k |
sub-matrix number removed from the initial matrix. |
Description
Cutout operation splits the input matrix "<matrix_init>" in N approximately equal sub-matrices, and creates a new output matrix using this partitioning. Output matrix includes all sub-matrices except for k-th sub-matrix.
Example
Input matrix:
matrix_fact19:
x1 |
x2 |
scenario_benchmark |
-2 |
2 |
1 |
0 |
10 |
2 |
1 |
-1 |
15 |
5 |
15 |
11 |
7 |
-7 |
3 |
11 |
12 |
1 |
2 |
21 |
1 |
12 |
-2 |
11 |
19 |
9 |
4 |
15 |
5 |
15 |
17 |
7 |
3 |
9 |
-19 |
9 |
-12 |
5 |
7 |
10 |
1 |
2 |
13 |
3 |
8 |
25 |
5 |
12 |
-7 |
7 |
3 |
31 |
-3 |
1 |
3 |
3 |
13 |
For instance, operation cutout(2,3,matrix_fact19)splits input matrix, matrix_fact19, in three sub-matrices:
sub-matrix 1
-2 |
2 |
1 |
0 |
10 |
2 |
1 |
-1 |
15 |
5 |
15 |
11 |
7 |
-7 |
3 |
11 |
12 |
1 |
2 |
21 |
1 |
sub-matrix 2
12 |
-2 |
11 |
19 |
9 |
4 |
15 |
5 |
15 |
17 |
7 |
3 |
9 |
-19 |
9 |
-12 |
5 |
7 |
sub-matrix 3
10 |
1 |
2 |
13 |
3 |
8 |
25 |
5 |
12 |
-7 |
7 |
3 |
31 |
-3 |
1 |
3 |
3 |
13 |
Output matrix includes only sub-matrix 1 and 3 :
-2 |
2 |
1 |
0 |
10 |
2 |
1 |
-1 |
15 |
5 |
15 |
11 |
7 |
-7 |
3 |
11 |
12 |
1 |
2 |
21 |
1 |
10 |
1 |
2 |
13 |
3 |
8 |
25 |
5 |
12 |
-7 |
7 |
3 |
31 |
-3 |
1 |
3 |
3 |
13 |
See also
Block Operation for Matrix, Takein Operation for Matrix, CrossValidation Operation for Matrix.