@thi.ng/k-means 2.0.14 → 2.0.19

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.
Files changed (2) hide show
  1. package/package.json +99 -99
  2. package/CHANGELOG.md +0 -76
package/package.json CHANGED
@@ -1,100 +1,100 @@
1
1
  {
2
- "name": "@thi.ng/k-means",
3
- "version": "2.0.14",
4
- "description": "k-means & k-medians with customizable distance functions and centroid initializations for n-D vectors",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://thi.ng/k-means",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- },
23
- {
24
- "type": "liberapay",
25
- "url": "https://liberapay.com/thi.ng"
26
- }
27
- ],
28
- "author": "Karsten Schmidt (https://thi.ng)",
29
- "license": "Apache-2.0",
30
- "scripts": {
31
- "build": "yarn build:esbuild && yarn build:decl",
32
- "build:decl": "tsc --declaration --emitDeclarationOnly",
33
- "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
34
- "clean": "bun ../../tools/src/clean-package.ts",
35
- "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
36
- "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
37
- "pub": "yarn npm publish --access public",
38
- "test": "bun test",
39
- "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
- },
41
- "dependencies": {
42
- "@thi.ng/api": "^8.12.2",
43
- "@thi.ng/distance": "^3.0.16",
44
- "@thi.ng/errors": "^2.5.42",
45
- "@thi.ng/random": "^4.1.27",
46
- "@thi.ng/vectors": "^8.6.6"
47
- },
48
- "devDependencies": {
49
- "esbuild": "^0.25.9",
50
- "typedoc": "^0.28.12",
51
- "typescript": "^5.9.2"
52
- },
53
- "keywords": [
54
- "centroid",
55
- "cluster",
56
- "distance",
57
- "eucledian",
58
- "haversine",
59
- "k-means",
60
- "k-means++",
61
- "k-medians",
62
- "mean",
63
- "median",
64
- "nd",
65
- "partition",
66
- "self-organizing",
67
- "typescript"
68
- ],
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
- "engines": {
73
- "node": ">=18"
74
- },
75
- "files": [
76
- "./*.js",
77
- "./*.d.ts"
78
- ],
79
- "exports": {
80
- ".": {
81
- "default": "./index.js"
82
- },
83
- "./api": {
84
- "default": "./api.js"
85
- },
86
- "./kmeans": {
87
- "default": "./kmeans.js"
88
- },
89
- "./mean-cut": {
90
- "default": "./mean-cut.js"
91
- }
92
- },
93
- "thi.ng": {
94
- "alias": "kmeans",
95
- "status": "beta",
96
- "year": 2021,
97
- "screenshot": "examples/kmeans-viz.jpg"
98
- },
99
- "gitHead": "e215a3e8de3809736ba0042c93bd8703a5a1a337\n"
100
- }
2
+ "name": "@thi.ng/k-means",
3
+ "version": "2.0.19",
4
+ "description": "k-means & k-medians with customizable distance functions and centroid initializations for n-D vectors",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://thi.ng/k-means",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ },
23
+ {
24
+ "type": "liberapay",
25
+ "url": "https://liberapay.com/thi.ng"
26
+ }
27
+ ],
28
+ "author": "Karsten Schmidt (https://thi.ng)",
29
+ "license": "Apache-2.0",
30
+ "scripts": {
31
+ "build": "yarn build:esbuild && yarn build:decl",
32
+ "build:decl": "tsc --declaration --emitDeclarationOnly",
33
+ "build:esbuild": "esbuild --format=esm --platform=neutral --target=es2022 --tsconfig=tsconfig.json --outdir=. src/**/*.ts",
34
+ "clean": "bun ../../tools/src/clean-package.ts",
35
+ "doc": "typedoc --options ../../typedoc.json --out doc src/index.ts",
36
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
37
+ "pub": "npm publish --access public",
38
+ "test": "bun test",
39
+ "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
+ },
41
+ "dependencies": {
42
+ "@thi.ng/api": "^8.12.7",
43
+ "@thi.ng/distance": "^3.0.21",
44
+ "@thi.ng/errors": "^2.5.47",
45
+ "@thi.ng/random": "^4.1.32",
46
+ "@thi.ng/vectors": "^8.6.11"
47
+ },
48
+ "devDependencies": {
49
+ "esbuild": "^0.25.11",
50
+ "typedoc": "^0.28.14",
51
+ "typescript": "^5.9.3"
52
+ },
53
+ "keywords": [
54
+ "centroid",
55
+ "cluster",
56
+ "distance",
57
+ "eucledian",
58
+ "haversine",
59
+ "k-means",
60
+ "k-means++",
61
+ "k-medians",
62
+ "mean",
63
+ "median",
64
+ "nd",
65
+ "partition",
66
+ "self-organizing",
67
+ "typescript"
68
+ ],
69
+ "publishConfig": {
70
+ "access": "public"
71
+ },
72
+ "engines": {
73
+ "node": ">=18"
74
+ },
75
+ "files": [
76
+ "./*.js",
77
+ "./*.d.ts"
78
+ ],
79
+ "exports": {
80
+ ".": {
81
+ "default": "./index.js"
82
+ },
83
+ "./api": {
84
+ "default": "./api.js"
85
+ },
86
+ "./kmeans": {
87
+ "default": "./kmeans.js"
88
+ },
89
+ "./mean-cut": {
90
+ "default": "./mean-cut.js"
91
+ }
92
+ },
93
+ "thi.ng": {
94
+ "alias": "kmeans",
95
+ "status": "beta",
96
+ "year": 2021,
97
+ "screenshot": "examples/kmeans-viz.jpg"
98
+ },
99
+ "gitHead": "d977f819bcafdcb2b24c45f8d01a167fe29fc85a\n"
100
+ }
package/CHANGELOG.md DELETED
@@ -1,76 +0,0 @@
1
- # Change Log
2
-
3
- - **Last updated**: 2025-09-01T16:38:35Z
4
- - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
-
6
- All notable changes to this project will be documented in this file.
7
- Only versions published since **2022-01-01** are listed here.
8
- Please consult the Git history for older version information.
9
- See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
10
-
11
- **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
- and/or version bumps of transitive dependencies.
13
-
14
- # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@2.0.0) (2025-06-24)
15
-
16
- #### 🛑 Breaking changes
17
-
18
- - update KMeansInit & kmeansPlusPlus() ([58d7eb1](https://github.com/thi-ng/umbrella/commit/58d7eb1))
19
- - BREAKING CHANGE: update `KMeansInit` to return vectors not IDs
20
- - update `KMeansInit` return type
21
- - update `KMeansOpts.initial`
22
- - rename `initKmeanspp()` => `kmeansPlusPlus()`
23
-
24
- #### 🚀 Features
25
-
26
- - add meanCut/medianCut() ([867889d](https://github.com/thi-ng/umbrella/commit/867889d))
27
-
28
- ## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@1.1.0) (2025-06-14)
29
-
30
- #### 🚀 Features
31
-
32
- - update initKmeanspp(), add configurable distance exponent ([2aed319](https://github.com/thi-ng/umbrella/commit/2aed319))
33
- - add KMeansOpts.exponent
34
- - update doc strings
35
-
36
- ### [0.7.10](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.7.10) (2024-10-05)
37
-
38
- #### ♻️ Refactoring
39
-
40
- - add explicit type casts (TS5.6.2) ([dcbdd60](https://github.com/thi-ng/umbrella/commit/dcbdd60))
41
-
42
- ## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.7.0) (2024-07-25)
43
-
44
- #### 🚀 Features
45
-
46
- - update `KMeansOpts.initial` ([f70073d](https://github.com/thi-ng/umbrella/commit/f70073d))
47
- - support custom init functions
48
- - add KMeansInit type alias
49
- - update handling in `kmeans()`
50
-
51
- ### [0.6.89](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.6.89) (2024-06-21)
52
-
53
- #### ♻️ Refactoring
54
-
55
- - enforce uniform naming convention of internal functions ([56992b2](https://github.com/thi-ng/umbrella/commit/56992b2))
56
-
57
- ### [0.6.85](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.6.85) (2024-04-20)
58
-
59
- #### ♻️ Refactoring
60
-
61
- - update type usage ([5966258](https://github.com/thi-ng/umbrella/commit/5966258))
62
-
63
- ### [0.6.43](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.6.43) (2023-11-09)
64
-
65
- #### ♻️ Refactoring
66
-
67
- - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
68
-
69
- ## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/k-means@0.6.0) (2023-02-10)
70
-
71
- #### 🚀 Features
72
-
73
- - filter result clusters, minor optimizations ([78169e6](https://github.com/thi-ng/umbrella/commit/78169e6))
74
- - use u32 array for internal cluster assignments
75
- - remove attempt to start new cluster if one became unused
76
- - update buildClusters to filter out empty