MatrixWrapper<T extends MatrixBase<T>> class
- Inheritance
-
- Mixed-in types
-
- Implementers
Properties
-
abs
→ T
-
no setterinherited
-
acos
→ T
-
no setterinherited
-
acosh
→ T
-
no setterinherited
-
adjugate
→ T
-
Get the adjoint matrix of a square matrix.
no setterinherited
-
asin
→ T
-
no setterinherited
-
asinh
→ T
-
no setterinherited
-
atan
→ T
-
no setterinherited
-
atanh
→ T
-
no setterinherited
-
ceil
→ T
-
no setterinherited
-
cos
→ T
-
no setterinherited
-
cosh
→ T
-
no setterinherited
-
cube
→ T
-
no setterinherited
-
deepcopy
→ T
-
no setterinherited
-
degree
→ T
-
no setterinherited
-
det
→ double
-
The determinant of a square matrix.
no setterinherited
-
exp
→ T
-
no setterinherited
-
flattened
→ List<double>
-
The matrix is flattened horizontally to a vector.
no setterinherited
-
floor
→ T
-
no setterinherited
-
hashCode
→ int
-
When two objects
==
is true, the hashCode must also be the same.
Reference: https://api.dart.dev/dart-core/Object/hashCode.html
no setterinherited
-
inverse
→ T
-
Get the inverse of a nonsingular square matrix.
no setterinherited
-
isSquare
→ bool
-
Determine whether a matrix is a square matrix.
no setterinherited
-
log
→ T
-
no setterinherited
-
log10
→ T
-
no setterinherited
-
radian
→ T
-
no setterinherited
-
rank
→ int
-
Get the rank of a square matrix.
no setterinherited
-
round
→ T
-
no setterinherited
-
rref
→ T
-
Reducing the number of elements to the simplest row echelon form by Gaussian elimination.
no setterinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
self
↔ List<List<double>>
-
getter/setter pairinherited
-
sgn
→ T
-
Mapping to symbolic matrix.
no setterinherited
-
shape
↔ List<int>
-
getter/setter pairinherited
-
sin
→ T
-
Some general mathematical methods for single variables.
no setterinherited
-
sinh
→ T
-
no setterinherited
-
size
→ int
-
Data volume.
no setterinherited
-
sqrt
→ T
-
no setterinherited
-
square
→ T
-
no setterinherited
-
T_
→ T
-
no setterinherited
-
tan
→ T
-
no setterinherited
-
tanh
→ T
-
no setterinherited
Methods
-
add({required Object other, int dim = -1})
→ T
-
Addition of two matrices with the same position data or a matrix and a number.
This method supports broadcasting. If
dim
is 0, it is in the row direction, and if dim is 1, it is in the column direction.
Otherwise, it has the same effect as adding two matrices of the same shape.
inherited
-
all(bool conditon(double), {int dim = -1})
→ Object
-
Determine whether all elements meet the conditions.
inherited
-
any(bool condition(double), {int dim = -1})
→ Object
-
Determine whether there are elements that meet the conditions.
inherited
-
append(List<double> data, {bool horizontal = true})
→ void
-
Add data to the matrix. At the beginning of the design, it was stipulated that the matrix can be increased or decreased.
inherited
-
argmax({int dim = -1})
→ Object
-
Get the index of the maximum value of a matrix.
inherited
-
argmin({int dim = -1})
→ Object
-
Get the index of the minimum value of a matrix。
inherited
-
atan2({required double number, bool reverse = false})
→ T
-
Azimuth formula,
reverse
is true means number
is the denominator, reverse is the numerator.
inherited
-
clip(double condition(double), {required double lb, required double ub, bool reverse = false})
→ T
-
Clip data,
lb
represents the lower limit, ub
represents the upper limit.
If reverse
is true, keep the data on both sides.
Otherwise, keep the data in the range. Perform conditional mapping for those that do not meet the condition
.
inherited
-
coincidental({required int row, required int column})
→ T
-
Get the remainder of the matrix without
row
and column
.
inherited
-
column_(int index)
→ List<double>
-
Get a copy of a column.
inherited
-
compare({required T other, int which = -1})
→ List<BoolList>
-
Compare the corresponding elements of the two matrices one by one.
The which is 0 for greater than, 1 for less than, 2 for greater than or equal to,
3 for less than or equal to, 4 for not equal to, and other values for equal to.
Return the bool value for each comparison position, and finally form a two-dimensional Boolean array.
inherited
-
concat({required T other, bool horizontal = true})
→ T
-
Concatenate two matrices.
inherited
-
confront(double condition(double, double), {required T other})
→ T
-
Conditional mapping of data at the same position in two matrices.
inherited
-
contain(double element)
→ bool
-
Whether the matrix contains certain data, excluding double.nan.
inherited
-
count(bool condition(double), {int dim = -1})
→ Object
-
Count the values that meet a
condition
.
inherited
-
customize(double condition(double))
→ T
-
Customize data mapping.
inherited
-
dft()
→ List<List<Complex>>
-
Fourier transform of a matrix.
inherited
-
dftComplex()
→ T
-
Fourier transform of a complex matrix.
inherited
-
diff(double func(double))
→ T
-
Function Derivation Based on Central Difference.
inherited
-
divide({required Object other, int dim = -1})
→ T
-
The division of two matrices with the same position data or a matrix and a number.
This method supports broadcasting. If
dim
is 0, it is divided in the row direction, and if dim is 1, it is divided in the column direction.
Otherwise, it has the same effect as the division of two matrices of the same shape.
inherited
-
drop({required Set<int> target, bool horizontal = true})
→ T
-
Get the matrix consisting of the remaining parts after removing some indices.
The input is a Set of integers.
inherited
-
elementaryAdd({required int index1, required int index2, required double number, bool horizontal = true})
→ void
-
Elementary transformation of matrices - multiply a row (column)
index2
and add it to another row (column) index1
.
inherited
-
elementaryExchange({required int index1, required int index2, bool horizontal = true})
→ void
-
Elementary transformation of matrices - swapping.
inherited
-
elementaryMultiply({required int index, required double number, bool horizontal = true})
→ void
-
Elementary transformation of a matrix - multiply a row(column), where 0 is allowed.
inherited
-
ELU({required double alpha})
→ T
-
Activation function ELU.
inherited
-
equalTo(Object other)
→ bool
-
Determine whether two matrices of the same type have the same data or whether the matrices are all certain data,
while the
==
operator can only compare matrices of the same type
inherited
-
fftComplex()
→ T
-
Fast Fourier transform based on Cooley–Tukey FFT algorithm.
By default, each row is the real and imaginary parts of a Complex number,
and the number of Complex numbers must be a power of 2.
inherited
-
flatten({bool horizontal = true})
→ T
-
Flatten the matrix into a vector according to the direction.
inherited
-
getRange({int dim = -1})
→ Object
-
Get the value range of the matrix. The return value is a type related to Range.
inherited
-
hasSameShape(covariant MatrixBase<MatrixBase> other)
→ bool
-
Determine whether they are of the same shape.
inherited
-
isShared(covariant MatrixBase<MatrixBase> other)
→ bool
-
Determine whether two matrices share the same data.
inherited
-
kronecker({required T other})
→ T
-
Kronecker product.
inherited
-
LeakyReLU({double alpha = 0.01})
→ T
-
Map the data through LeakyReLU.
inherited
-
MAE({required List<List<double>> other, int dim = -1})
→ Object
-
Mean absolute error, which is the average of the absolute errors between the predicted and observed values.
inherited
-
max({int dim = -1})
→ Object
-
Get the maximum value of a matrix.
inherited
-
mean({int dim = -1})
→ Object
-
Get the mean.
inherited
-
median({int dim = -1})
→ Object
-
Get the median. If the target sequence is an even number, return the mean of the two middle values.
inherited
-
min({int dim = -1})
→ Object
-
Get the minimum value of a matrix.
inherited
-
minus({required Object other, int dim = -1})
→ T
-
Subtract the data in the same position of two matrices or the matrix and the number.
This method supports broadcasting. If
dim
is 0, it is in the row direction, and if dim is 1, it is in the column direction.
Otherwise, it has the same effect as subtracting two matrices of the same shape.
inherited
-
mode({int dim = -1})
→ dynamic
-
According to the rules, get the majority among n elements.
When the number of elements is the same, return null.
When there are t elements with the same number (t<n), take the first element.
inherited
-
MSE({required List<List<double>> other, int dim = -1})
→ Object
-
MSE measures the predictive performance of the model by calculating
the average of the squared errors between the predicted values and the true values.
inherited
-
multiply({required Object other, int dim = -1})
→ T
-
Multiply two matrices with the same position data or a matrix and a number.
This method supports broadcasting. If
dim
is 0, it is in the row direction, and if dim is 1, it is in the column direction.
Otherwise, it has the same effect as multiplying two matrices of the same shape.
inherited
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
power({required double number, bool reverse = false})
→ T
-
The matrix data is the power of
number
. If reverse
is true, it means that the matrix data is a power.
inherited
-
product({required T other})
→ T
-
Standard matrix multiplication.
inherited
-
projectionTransform({required double ux, required double uy})
→ T
-
Projection Transformation.
ux
and uy
are the projection components on the x-axis and y-axis respectively.
inherited
-
reduce(double condition(double, double), {double? element, int dim = -1})
→ Object
-
Perform cumulative operations on the matrix,
element
is used to initialize and record the accumulated value if set.
inherited
-
ReLU()
→ T
-
Activation function ReLU.
inherited
-
replace(bool condition(double), {required double cope(double)})
→ void
-
Replace the value that meets the
condition
. cope
is the replacement method.
inherited
-
replaceRow(int index, List<double> value)
→ void
-
inherited
-
reshape({required int row, required int column})
→ T
-
Reshape the matrix to ensure that the size of the previous and next shapes are the same.
inherited
-
resize({required int row, required int column, double number = 0.0})
→ T
-
Reshape the matrix. If the size becomes smaller,
remove the redundant data; if the size becomes larger, use
number
to supplement it.
inherited
-
rotateTransform({required double theta, bool radian = true})
→ T
-
Rotation Transformation.
radian
is true to indicate radians.
inherited
-
row_(int index)
→ List<double>
-
Get a copy of a row.
inherited
-
scaleTransform({required double sx, required double sy})
→ T
-
Scaling transformation,
sx
and sy
are the scaling factors of the x-axis and y-axis coordinates respectively.
inherited
-
select({required List<int> target, bool horizontal = true})
→ T
-
Select specified rows or columns to form a new matrix.
The selection can be in any order.
Can be repeated.
inherited
-
setMask({double? nan_mask, double? inf_mask, double? nag_inf_mask})
→ void
-
Determines whether to replace nan or infinity in the matrix based on the input value.
inherited
-
shakePercent({double bias = 1.0, double percent = 0.5, int? seed})
→ void
-
Randomly jitter the specified proportion of data, range (-bias, bias).
inherited
-
shakeProbably({double bias = 1.0, double p = 0.5, int? seed})
→ void
-
For each data, add random jitter, range (-bias, bias).
inherited
-
shakeTotal({double bias = 1.0, int? seed})
→ void
-
Randomly jitter the data, range (-bias, bias).
inherited
-
shearTransform({required double k, bool alongX = true})
→ T
-
Shear transformation,
alongX
is true along the x-axis, otherwise along the y-axis.
k
is the shear coefficient.
inherited
-
shuffle({int? seed, int dim = -1})
→ void
-
Shuffle the data.
inherited
-
Sigmoid()
→ T
-
Activation function, also known as S-shaped growth curve.
inherited
-
slice({required int start, int? end, bool horizontal = true})
→ T
-
Slice operation, get the part from
start
to end
.
If end is not set, the rest is intercepted from start.
Allow start to be greater than end to perform reverse interception
inherited
-
Softmax({int dim = -1})
→ T
-
When the data is mapped through Softmax,
the maximum value in the data will be excluded in practice, which is not considered here.
inherited
-
Softplus()
→ T
-
The Softplus function can be seen as a smoothing of the ReLU function.
inherited
-
Softsign()
→ T
-
Softsign function is another alternative to Tanh function.
inherited
-
sort({bool reverse = false, int dim = -1})
→ void
-
Sorting matrix data.
inherited
-
sum({int dim = -1})
→ Object
-
Sum.
inherited
-
Swish()
→ T
-
Swish is a self-gating activation function.
inherited
-
toBar()
→ Map<double, int>
-
Abstract histogram statistics.
inherited
-
toComplexLike({bool isReal = true})
→ T
-
Convert a row * column matrix to a size complex matrix.
If
isReal
is true, the elements of the matrix are the real part of the complex number, otherwise they are the imaginary part.
inherited
-
toHist({required double start, required double end, required int counts})
→ Map<Range, int>
-
Generates a visual abstraction that matches the histogram.
start
is the starting point of the count value, and end
is the end point of the count value.
counts
indicates the number of intervals, and the interval follows the principle of left-closed and right-open.
The flexibility of this method is that it can count the histogram of some interval data.
Please extract and handle special values.
inherited
-
toList(Typed type)
→ List
-
Convert a matrix to a list of different types of data.
When converting to complex numbers, the matrix column must be 2.
inherited
-
toString({String? format, String color = '#ffd700'})
→ String
-
Format the output matrix.
format
is the unified format of the output data. If not, use data_format instead.
data_format is a global variable that can be modified to control the output.
color
indicates the color of the data, which is a hexadecimal string.
inherited
-
trace()
→ double
-
The trace of the matrix. If it is not a square matrix,
the trace of the square matrix is taken as the minimum value of the row and column.
inherited
-
transpose()
→ T
-
Transpose a matrix.
inherited
-
visible({String? format, String color = '#ffd700', String? start_point, String? end_point})
→ void
-
Wraps the toString function and adds additional character printing function.
Quickly view the matrix.
inherited