Extensions
01 Syntax
Microsoft.VisualBasic.Math.LinearAlgebra.Matrix.Extensions
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| ColumnVector | 1 | get a specific column data as vector |
| rand | 1 | Generate matrix with random elements |
| CenterNormalize | 1 | Centers each column of the data matrix at its mean. |
| Covariance | 1 | Constructs the covariance matrix for this data set. |
| 1 | Print the matrix data onto the console or a specific stream. | |
| t | 1 | Create column vector matrix |
| r | 1 | Create row vector matrix |
| Mean | 1 | Returns the average of the array elements. |
| Apply | 1 | |
| nrow | 1 | |
| ncol | 1 | |
| eig | 1 | |
| size | 1 | |
| flatten | 1 | |
| shape | 1 | |
| Apply | 1 | |
| Std | 1 | |
| Sum | 1 | |
| Sort | 1 |
03 Members
ColumnVector(GeneralMatrix,
Int32)get a specific column data as vector
Parameters
| Name | Type | Description |
|---|---|---|
matrix | GeneralMatrix | - |
i% | Int32 | - |
rand(
Int32, Int32)Generate matrix with random elements
Parameters
| Name | Type | Description |
|---|---|---|
m | Int32 | Number of rows. |
n | Int32 | Number of colums. |
Returns
An m-by-n matrix with uniformly distributed random elements.
CenterNormalize(GeneralMatrix)
Centers each column of the data matrix at its mean. Normalizes the input matrix so that each column is centered at 0.
Covariance(GeneralMatrix)
Constructs the covariance matrix for this data set. @return the covariance matrix of this data set
Print the matrix data onto the console or a specific stream.
Parameters
| Name | Type | Description |
|---|---|---|
m | GeneralMatrix | - |
format$ | String | - |
out | StreamWriter | - |
t(
IEnumerable(Of Double))Create column vector matrix
Parameters
| Name | Type | Description |
|---|---|---|
v | IEnumerable(Of Double) | - |
r(
IEnumerable(Of Double))Create row vector matrix
Parameters
| Name | Type | Description |
|---|---|---|
v | IEnumerable(Of Double) | - |
Mean(
IEnumerable(Of Vector), Int32)Returns the average of the array elements. The average is taken over the flattened array by default, otherwise over the specified axis. float64 intermediate and return values are used for integer inputs.
Parameters
| Name | Type | Description |
|---|---|---|
matrix | IEnumerable(Of Vector) | - |
axis% | Int32 | - |
Apply``2(
IEnumerable(Of Vector), Func(Of IEnumerable(Of Double), ``0), Int32, Func(Of IEnumerable(Of ``0), ``1))Type Parameters
| Name | Description |
|---|---|
T | |
Tout |
Parameters
| Name | Type | Description |
|---|---|---|
matrix | IEnumerable(Of Vector) | - |
math | Func(Of IEnumerable(Of Double), ``0) | - |
axis | Int32 |
|
aggregate | Func(Of IEnumerable(Of ``0), ``1) | - |
nrow(GeneralMatrix)
ncol(GeneralMatrix)
eig(GeneralMatrix)
size(GeneralMatrix,
Int32)flatten(Vector)
shape(GeneralMatrix)
Apply(
IEnumerable(Of Vector), Func(Of IEnumerable(Of Double), T), Int32, Func(Of IEnumerable(Of T), Tout))Std(
IEnumerable(Of Vector), Int32)Sum(
IEnumerable(Of Vector), Int32)Sort(
IEnumerable(Of Vector), Nullable(Of Int32))