nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Math.Core / Extensions

Extensions

Full name Microsoft.VisualBasic.Math.LinearAlgebra.Matrix.Extensions Assembly Microsoft.VisualBasic.Math.Core Members 19

01 Syntax

Microsoft.VisualBasic.Math.LinearAlgebra.Matrix.Extensions

02 Methods

NameOverloadsSummary
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.
Print 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

method ColumnVector #
ColumnVector(GeneralMatrix, Int32)

get a specific column data as vector

Parameters
NameTypeDescription
matrixGeneralMatrix

-

i%Int32

-

method rand #
rand(Int32, Int32)

Generate matrix with random elements

Parameters
NameTypeDescription
mInt32

Number of rows.

nInt32

Number of colums.

Returns

An m-by-n matrix with uniformly distributed random elements.

method CenterNormalize #
CenterNormalize(GeneralMatrix)

Centers each column of the data matrix at its mean. Normalizes the input matrix so that each column is centered at 0.

method Covariance #
Covariance(GeneralMatrix)

Constructs the covariance matrix for this data set. @return the covariance matrix of this data set

method Print #
Print(GeneralMatrix, String, StreamWriter)

Print the matrix data onto the console or a specific stream.

Parameters
NameTypeDescription
mGeneralMatrix

-

format$String

-

outStreamWriter

-

method t #
t(IEnumerable(Of Double))

Create column vector matrix

Parameters
NameTypeDescription
vIEnumerable(Of Double)

-

method r #
r(IEnumerable(Of Double))

Create row vector matrix

Parameters
NameTypeDescription
vIEnumerable(Of Double)

-

method Mean #
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
NameTypeDescription
matrixIEnumerable(Of Vector)

-

axis%Int32

-

method Apply #
Apply``2(IEnumerable(Of Vector), Func(Of IEnumerable(Of Double), ``0), Int32, Func(Of IEnumerable(Of ``0), ``1))
Type Parameters
NameDescription
T
Tout
Parameters
NameTypeDescription
matrixIEnumerable(Of Vector)

-

mathFunc(Of IEnumerable(Of Double), ``0)

-

axisInt32
  • 0 表示按列进行计算
  • 1 表示按行进行计算
  • 小于零则负数则表示所有元素作为一个向量来计算
aggregateFunc(Of IEnumerable(Of ``0), ``1)

-

method nrow #
method ncol #
method eig #
method size #
size(GeneralMatrix, Int32)
method flatten #
flatten(Vector)
method shape #
method Apply #
Apply(IEnumerable(Of Vector), Func(Of IEnumerable(Of Double), T), Int32, Func(Of IEnumerable(Of T), Tout))
method Std #
Std(IEnumerable(Of Vector), Int32)
method Sum #
Sum(IEnumerable(Of Vector), Int32)
method Sort #
Sort(IEnumerable(Of Vector), Nullable(Of Int32))