w-cluster 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsdoc +1 -1
- package/LICENSE +1 -1
- package/README.md +33 -38
- package/dist/w-cluster.umd.js +2 -2
- package/dist/w-cluster.umd.js.map +1 -1
- package/dist/w-cluster.wk.umd.js +1 -1
- package/docs/WCluster.mjs.html +48 -56
- package/docs/examples/ex-PCA.html +1 -1
- package/docs/examples/ex-cluster-k-means.html +1 -1
- package/docs/examples/ex-cluster-k-medoids.html +1 -1
- package/docs/examples/ex-cluster-webworker-k-medoids.html +1 -1
- package/docs/global.html +11 -6
- package/docs/index.html +1 -1
- package/g-cluster-nodeworker.mjs +20 -20
- package/g-cluster.mjs +20 -28
- package/package.json +3 -8
- package/src/WCluster.mjs +47 -55
- package/src/WClusterCore.mjs +14 -9
- package/src/WClusterMat.mjs +4 -3
- package/src/WPCAMat.mjs +7 -5
- package/test/cluster.test.mjs +2 -2
- package/temp-bzmWVlF38ndGv0ip7atIxG1RSDXI39mk-nw.js +0 -1
package/.jsdoc
CHANGED
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -11,6 +11,17 @@ A tool for data PCA(Principle Component Analysis) and cluster(K-Means & K-Medoid
|
|
|
11
11
|
## Documentation
|
|
12
12
|
To view documentation or get support, visit [docs](https://yuda-lyu.github.io/w-cluster/global.html).
|
|
13
13
|
|
|
14
|
+
## Example
|
|
15
|
+
To view some examples for more understanding, visit examples:
|
|
16
|
+
|
|
17
|
+
> **PCA:** [ex-PCA.html](https://yuda-lyu.github.io/w-cluster/examples/ex-PCA.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-PCA.html)]
|
|
18
|
+
|
|
19
|
+
> **cluster for k-means:** [ex-cluster-k-means.html](https://yuda-lyu.github.io/w-cluster/examples/ex-cluster-k-means.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-cluster-k-means.html)]
|
|
20
|
+
|
|
21
|
+
> **cluster for k-medoids:** [ex-cluster-k-medoids.html](https://yuda-lyu.github.io/w-cluster/examples/ex-cluster-k-medoids.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-cluster-k-medoids.html)]
|
|
22
|
+
|
|
23
|
+
> **cluster for k-medoids with web worker:** [ex-cluster-webworker-k-medoids.html](https://yuda-lyu.github.io/w-cluster/examples/ex-cluster-webworker-k-medoids.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-cluster-webworker-k-medoids.html)] * WebWorkers(from blob) does not support IE11.
|
|
24
|
+
|
|
14
25
|
## Installation
|
|
15
26
|
### Using npm(ES6 module):
|
|
16
27
|
> **Note:** w-cluster is mainly dependent on `ml-pca`, `ml-kmeans` and `k-medoids`.
|
|
@@ -74,24 +85,24 @@ async function testCluster() {
|
|
|
74
85
|
// [ 2 ],
|
|
75
86
|
// [ 0, 1, 3 ]
|
|
76
87
|
// ],
|
|
77
|
-
// "
|
|
88
|
+
// "gmat": [
|
|
78
89
|
// [
|
|
79
|
-
// [
|
|
90
|
+
// [ 77.39502404588043, 70.65388036857387 ]
|
|
80
91
|
// ],
|
|
81
92
|
// [
|
|
82
|
-
// [
|
|
83
|
-
// [ 50,
|
|
84
|
-
// [
|
|
93
|
+
// [ 36.76572825085965, 50.81184119955175 ],
|
|
94
|
+
// [ 50.520478881706346, 69.86935352609807 ],
|
|
95
|
+
// [ 55.318768821553576, 58.66492490577632 ]
|
|
85
96
|
// ]
|
|
86
97
|
// ],
|
|
87
|
-
// "
|
|
98
|
+
// "gltdt": [
|
|
88
99
|
// [
|
|
89
|
-
// [
|
|
100
|
+
// [ 80, 70, 90 ]
|
|
90
101
|
// ],
|
|
91
102
|
// [
|
|
92
|
-
// [
|
|
93
|
-
// [ 50
|
|
94
|
-
// [
|
|
103
|
+
// [ 40, 50, 60 ],
|
|
104
|
+
// [ 50, 70, 60 ],
|
|
105
|
+
// [ 50, 60, 80 ]
|
|
95
106
|
// ]
|
|
96
107
|
// ]
|
|
97
108
|
// }
|
|
@@ -118,32 +129,24 @@ async function testCluster() {
|
|
|
118
129
|
// [ 2 ],
|
|
119
130
|
// [ 0, 1, 3 ]
|
|
120
131
|
// ],
|
|
121
|
-
// "
|
|
132
|
+
// "gmat": [
|
|
122
133
|
// [
|
|
123
|
-
//
|
|
124
|
-
// "name": "Paul", "a": 80, "b": 70, "c": 90
|
|
125
|
-
// }
|
|
134
|
+
// [ 77.39502404588043, 70.65388036857387 ]
|
|
126
135
|
// ],
|
|
127
136
|
// [
|
|
128
|
-
//
|
|
129
|
-
//
|
|
130
|
-
//
|
|
131
|
-
// {
|
|
132
|
-
// "name": "Buckley", "a": 50, "b": 70, "c": 60
|
|
133
|
-
// },
|
|
134
|
-
// {
|
|
135
|
-
// "name": "Fawcett", "a": 50, "b": 60, "c": 80
|
|
136
|
-
// }
|
|
137
|
+
// [ 36.76572825085965, 50.81184119955175 ],
|
|
138
|
+
// [ 50.520478881706346, 69.86935352609807 ],
|
|
139
|
+
// [ 55.318768821553576, 58.66492490577632 ]
|
|
137
140
|
// ]
|
|
138
141
|
// ],
|
|
139
|
-
// "
|
|
142
|
+
// "gltdt": [
|
|
140
143
|
// [
|
|
141
|
-
//
|
|
144
|
+
// { "name": "Paul", "a": 80, "b": 70, "c": 90 }
|
|
142
145
|
// ],
|
|
143
146
|
// [
|
|
144
|
-
//
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
+
// { "name": "Cameron", "a": 40, "b": 50, "c": 60 },
|
|
148
|
+
// { "name": "Buckley", "a": 50, "b": 70, "c": 60 },
|
|
149
|
+
// { "name": "Fawcett", "a": 50, "b": 60, "c": 80 }
|
|
147
150
|
// ]
|
|
148
151
|
// ]
|
|
149
152
|
// }
|
|
@@ -163,17 +166,9 @@ testCluster()
|
|
|
163
166
|
```alias
|
|
164
167
|
|
|
165
168
|
<!-- for basic -->
|
|
166
|
-
<script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.
|
|
169
|
+
<script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.10/dist/w-cluster.umd.js"></script>
|
|
167
170
|
|
|
168
171
|
<!-- for web workers -->
|
|
169
|
-
<script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.
|
|
172
|
+
<script src="https://cdn.jsdelivr.net/npm/w-cluster@1.0.10/dist/w-cluster.wk.umd.js"></script>
|
|
170
173
|
|
|
171
174
|
```
|
|
172
|
-
|
|
173
|
-
> **PCA:** [ex-PCA.html](https://yuda-lyu.github.io/w-cluster/examples/ex-PCA.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-PCA.html)]
|
|
174
|
-
|
|
175
|
-
> **cluster for k-means:** [ex-cluster-k-means.html](https://yuda-lyu.github.io/w-cluster/examples/ex-cluster-k-means.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-cluster-k-means.html)]
|
|
176
|
-
|
|
177
|
-
> **cluster for k-medoids:** [ex-cluster-k-medoids.html](https://yuda-lyu.github.io/w-cluster/examples/ex-cluster-k-medoids.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-cluster-k-medoids.html)]
|
|
178
|
-
|
|
179
|
-
> **cluster for k-medoids with web worker:** [ex-cluster-webworker-k-medoids.html](https://yuda-lyu.github.io/w-cluster/examples/ex-cluster-webworker-k-medoids.html) [[source code](https://github.com/yuda-lyu/w-cluster/blob/master/docs/examples/ex-cluster-webworker-k-medoids.html)] * WebWorkers(from blob) does not support IE11.
|