Skip to content

Commit 59ea27b

Browse files
committed
NEW
1 parent ca19258 commit 59ea27b

11 files changed

Lines changed: 481 additions & 32 deletions

File tree

‎src/pkg/MatPly_Dart/doc/API/Dart/constructor.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,3 +519,43 @@ main(){
519519
* */
520520
```
521521

522+
## 获取对称对角阵,设置sub为true得到副对角线对称阵[new from V1.0.7]
523+
```text
524+
MatrixType.Diag({
525+
required int n,
526+
required double start,
527+
required double end,
528+
bool sub = false,
529+
int? seed
530+
})
531+
```
532+
533+
### example
534+
```dart
535+
import 'core.dart';
536+
537+
main(){
538+
MatrixType.Diag(n: 5, start: 1, end: 5, seed: 1)..visible();
539+
MatrixType.Diag(n: 5, start: 1, end: 5, seed: 2, sub: true)..visible();
540+
}
541+
542+
/*
543+
output
544+
[
545+
[1.00501 3.25434 1.77322 4.23496 3.34004 ]
546+
[3.25434 2.91949 2.40117 4.58385 4.29136 ]
547+
[1.77322 2.40117 3.98642 1.69643 4.43577 ]
548+
[4.23496 4.58385 1.69643 3.84201 3.05414 ]
549+
[3.34004 4.29136 4.43577 3.05414 2.21598 ]
550+
]
551+
[
552+
[2.81829 4.53539 4.92505 3.23591 4.59923 ]
553+
[1.87490 1.81277 1.07398 2.30680 3.23591 ]
554+
[3.30927 4.70702 2.54448 1.07398 4.92505 ]
555+
[4.67260 4.63939 4.70702 1.81277 4.53539 ]
556+
[2.34758 4.67260 3.30927 1.87490 2.81829 ]
557+
]
558+
559+
* */
560+
```
561+

‎src/pkg/MatPly_Dart/doc/API/Dart/methods.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,38 @@ clip_reverse的无返回值方式
225225
## mirror[new from V1.0.6]
226226
获取矩阵的镜像,mode == 0表示横向镜像、其他值表示总线镜像
227227

228+
## decentralizate[new from V1.0.7]
229+
获取去中心化的矩阵
230+
231+
## covariance[new from V1.0.7]
232+
计算两个矩阵的协方差值
233+
234+
## cov[new from V1.0.7]
235+
当不传入另一个矩阵时,计算当前矩阵的协方差矩阵,否则获取二者的协方差矩阵。底层实现时,视纵向为变量,横向为特征
236+
237+
## pearsonCoef[new from V1.0.7]
238+
皮尔森系数计算
239+
240+
## MSE[new from V1.0.7]
241+
均方误差。在几个评分标准中,传入的矩阵参数(rea)表示真实数据,而本身表示预测数据
242+
243+
## RMSE[new from V1.0.7]
244+
均方根误差
245+
246+
## MAE[new from V1.0.7]
247+
平均绝对误差
248+
249+
## MAPE[new from V1.0.7]
250+
平均绝对百分比误差
251+
252+
## R2[new from V1.0.7]
253+
决定系数
254+
255+
## SMAPE[new from V1.0.7]
256+
对称平均绝对百分比误差
257+
258+
## fill_diagonal[new from V1.0.7]
259+
对矩阵的最小维度对角上的值换为number
260+
261+
## choice[new from V1.0.7]
262+
如果根据权重获取数据,权重可以是等列长一维列表,也可以是同形状矩阵。视行为样本。其中method方法分别为0、1、其他整数时,权重映射为原值、sigmoid函数值、绝对值;如果不传入权重,则按照等概率处理
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# 支持的语言与平台一览
22

3-
## [Dart on Windows](../API/Dart/index.md)
3+
## [Dart on Windows/Linux/Android](../API/Dart/index.md)

‎src/pkg/MatPly_Dart/doc/index.md‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
# MatPly
22

33
```text
4-
__ ___ __ ____ __
5-
/ |/ /___ _/ /_/ __ \/ /_ __
6-
/ /|_/ / __ `/ __/ /_/ / / / / /
7-
/ / / / /_/ / /_/ ____/ / /_/ /
8-
/_/ /_/\__,_/\__/_/ /_/\__, /
9-
/____/
4+
__ ___ __ ____ __
5+
/ |/ /___ _/ /_/ __ \/ /_ __
6+
/ /|_/ / __ `/ __/ /_/ / / / / /
7+
/ / / / /_/ / /_/ ____/ / /_/ /
8+
/_/ /_/\__,_/\__/_/ /_/\__, /
9+
/____/
1010
```
1111

1212
## 什么是MatPly?
13-
> MatPly是使用C语言为基础,利用其他语言特性实现的矩阵库
13+
> MatPly是使用C语言实现并被转换为多个语言版本的矩阵操作库
1414
> 目前提供的语言以及支持平台的版本有:
15-
> - Windows平台下Dart语言版本
15+
> - Windows/Linux/Android平台下Dart语言版本
16+
17+
## 网页文档版本
18+
> [https://www.robot-shadow.cn/src/pkg/MatPly_Dart/site/](https://www.robot-shadow.cn/src/pkg/MatPly_Dart/site/)
19+
20+
## Github地址
21+
> [https://github.com/PythonnotJava/MatPly](https://github.com/PythonnotJava/MatPly)
1622

‎src/pkg/MatPly_Dart/site/API/Dart/constructor/index.html‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,30 @@
738738
</ul>
739739
</nav>
740740

741+
</li>
742+
743+
<li class="md-nav__item">
744+
<a href="#subtruenew-from-v107" class="md-nav__link">
745+
<span class="md-ellipsis">
746+
获取对称对角阵,设置sub为true得到副对角线对称阵[new from V1.0.7]
747+
</span>
748+
</a>
749+
750+
<nav class="md-nav" aria-label="获取对称对角阵,设置sub为true得到副对角线对称阵[new from V1.0.7]">
751+
<ul class="md-nav__list">
752+
753+
<li class="md-nav__item">
754+
<a href="#example_12" class="md-nav__link">
755+
<span class="md-ellipsis">
756+
example
757+
</span>
758+
</a>
759+
760+
</li>
761+
762+
</ul>
763+
</nav>
764+
741765
</li>
742766

743767
</ul>
@@ -1196,6 +1220,30 @@
11961220
</ul>
11971221
</nav>
11981222

1223+
</li>
1224+
1225+
<li class="md-nav__item">
1226+
<a href="#subtruenew-from-v107" class="md-nav__link">
1227+
<span class="md-ellipsis">
1228+
获取对称对角阵,设置sub为true得到副对角线对称阵[new from V1.0.7]
1229+
</span>
1230+
</a>
1231+
1232+
<nav class="md-nav" aria-label="获取对称对角阵,设置sub为true得到副对角线对称阵[new from V1.0.7]">
1233+
<ul class="md-nav__list">
1234+
1235+
<li class="md-nav__item">
1236+
<a href="#example_12" class="md-nav__link">
1237+
<span class="md-ellipsis">
1238+
example
1239+
</span>
1240+
</a>
1241+
1242+
</li>
1243+
1244+
</ul>
1245+
</nav>
1246+
11991247
</li>
12001248

12011249
</ul>
@@ -1688,6 +1736,42 @@ <h3 id="example_11">example</h3>
16881736
]
16891737
* */
16901738
</code></pre>
1739+
<h2 id="subtruenew-from-v107">获取对称对角阵,设置sub为true得到副对角线对称阵[new from V1.0.7]</h2>
1740+
<pre><code class="language-text"> MatrixType.Diag({
1741+
required int n,
1742+
required double start,
1743+
required double end,
1744+
bool sub = false,
1745+
int? seed
1746+
})
1747+
</code></pre>
1748+
<h3 id="example_12">example</h3>
1749+
<pre><code class="language-dart">import 'core.dart';
1750+
1751+
main(){
1752+
MatrixType.Diag(n: 5, start: 1, end: 5, seed: 1)..visible();
1753+
MatrixType.Diag(n: 5, start: 1, end: 5, seed: 2, sub: true)..visible();
1754+
}
1755+
1756+
/*
1757+
output
1758+
[
1759+
[1.00501 3.25434 1.77322 4.23496 3.34004 ]
1760+
[3.25434 2.91949 2.40117 4.58385 4.29136 ]
1761+
[1.77322 2.40117 3.98642 1.69643 4.43577 ]
1762+
[4.23496 4.58385 1.69643 3.84201 3.05414 ]
1763+
[3.34004 4.29136 4.43577 3.05414 2.21598 ]
1764+
]
1765+
[
1766+
[2.81829 4.53539 4.92505 3.23591 4.59923 ]
1767+
[1.87490 1.81277 1.07398 2.30680 3.23591 ]
1768+
[3.30927 4.70702 2.54448 1.07398 4.92505 ]
1769+
[4.67260 4.63939 4.70702 1.81277 4.53539 ]
1770+
[2.34758 4.67260 3.30927 1.87490 2.81829 ]
1771+
]
1772+
1773+
* */
1774+
</code></pre>
16911775

16921776

16931777

0 commit comments

Comments
 (0)