@thi.ng/fuzzy 2.0.8 → 2.1.3
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/CHANGELOG.md +117 -72
- package/package.json +100 -95
package/CHANGELOG.md
CHANGED
|
@@ -1,75 +1,120 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## [2.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/fuzzy@2.0.7...@thi.ng/fuzzy@2.0.8) (2021-11-10)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @thi.ng/fuzzy
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/fuzzy@2.0.6...@thi.ng/fuzzy@2.0.7) (2021-11-03)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @thi.ng/fuzzy
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/fuzzy@1.0.4...@thi.ng/fuzzy@2.0.0) (2021-10-12)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Build System
|
|
26
|
-
|
|
27
|
-
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
|
|
3
|
+
- **Last updated**: 2021-12-13T10:26:00Z
|
|
4
|
+
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
28
5
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
-
|
|
6
|
+
All notable changes to this project will be documented in this file.
|
|
7
|
+
See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
|
|
8
|
+
|
|
9
|
+
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
|
+
and/or version bumps of transitive dependencies.
|
|
11
|
+
|
|
12
|
+
## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/fuzzy@2.1.0) (2021-11-17)
|
|
13
|
+
|
|
14
|
+
#### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
|
|
17
|
+
Improving the overall build ergonomics
|
|
18
|
+
- introduced a tools workspaces
|
|
19
|
+
- imported it in all needed packages/examples
|
|
20
|
+
- inclusive project root
|
|
21
|
+
|
|
22
|
+
#### ♻️ Refactoring
|
|
23
|
+
|
|
24
|
+
- testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
|
|
25
|
+
this commit reverts (partly) changes made in:
|
|
26
|
+
ef346d7a8753590dc9094108a3d861a8dbd5dd2c
|
|
27
|
+
overall purpose is better testament ergonomics:
|
|
28
|
+
instead of having to pass NODE_OPTIONS with every invocation
|
|
29
|
+
having a binary to handle this for us.
|
|
30
|
+
|
|
31
|
+
### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/fuzzy@2.0.1) (2021-10-13)
|
|
32
|
+
|
|
33
|
+
#### ♻️ Refactoring
|
|
34
|
+
|
|
35
|
+
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
36
|
+
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
|
|
37
|
+
- add .js suffix for all relative imports
|
|
38
|
+
|
|
39
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/fuzzy@2.0.0) (2021-10-12)
|
|
40
|
+
|
|
41
|
+
#### 🛑 Breaking changes
|
|
42
|
+
|
|
43
|
+
- major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
|
|
44
|
+
- BREAKING CHANGE: discontinue CommonJS & UMD versions
|
|
45
|
+
- only ESM modules will be published from now on
|
|
46
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
47
|
+
- i.e. launch NodeJS via:
|
|
48
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
49
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
50
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
51
|
+
Also:
|
|
52
|
+
- normalize/restructure/reorg all package.json files
|
|
53
|
+
- cleanup all build scripts, remove obsolete
|
|
54
|
+
- switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
|
|
55
|
+
|
|
56
|
+
#### ♻️ Refactoring
|
|
57
|
+
|
|
58
|
+
- update imports ([3d46498](https://github.com/thi-ng/umbrella/commit/3d46498))
|
|
59
|
+
- update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
|
|
60
|
+
- update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
|
|
61
|
+
|
|
62
|
+
### [0.1.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/fuzzy@0.1.3) (2021-02-20)
|
|
63
|
+
|
|
64
|
+
#### ♻️ Refactoring
|
|
65
|
+
|
|
66
|
+
- update to use new Range type ([1cc23c6](https://github.com/thi-ng/umbrella/commit/1cc23c6))
|
|
67
|
+
- use clamp0() ([2825130](https://github.com/thi-ng/umbrella/commit/2825130))
|
|
68
|
+
|
|
69
|
+
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/fuzzy@0.1.0) (2020-12-22)
|
|
70
|
+
|
|
71
|
+
#### 🚀 Features
|
|
72
|
+
|
|
73
|
+
- add/update/migrate defuzz strategies ([c1ee15f](https://github.com/thi-ng/umbrella/commit/c1ee15f))
|
|
74
|
+
- move to /strategies subdir
|
|
75
|
+
- make centroidStrategy() default
|
|
76
|
+
- rename & optimize bisectorStrategy()
|
|
77
|
+
- add docstrings w/ diagrams for all strats
|
|
78
|
+
- update tests
|
|
79
|
+
- update types, update compose ([566469d](https://github.com/thi-ng/umbrella/commit/566469d))
|
|
80
|
+
- add new LVar types
|
|
81
|
+
- remove combineTerms(), merge into compose()
|
|
82
|
+
- remove implication(), merge into compose()
|
|
83
|
+
- update compose() to return optimized fns
|
|
84
|
+
- add intersect()/union() syntax sugar
|
|
85
|
+
- update defuzz()
|
|
86
|
+
- make lvar, rules, defuzz() typesafe ([0b210c3](https://github.com/thi-ng/umbrella/commit/0b210c3))
|
|
87
|
+
- add/update types (Rule, LVar, LVar helpers)
|
|
88
|
+
- update variable() & rule factories (add generics)
|
|
89
|
+
- make defuzz() generic, infer return type
|
|
90
|
+
- update tests
|
|
91
|
+
- update defuzz() & strategies ([cf337f3](https://github.com/thi-ng/umbrella/commit/cf337f3))
|
|
92
|
+
- simplify DefuzzStrategy to take single FuzzyFn
|
|
93
|
+
- add `combine` s-norm arg to defuzz() and compose output sets before
|
|
94
|
+
handing them to the strategy impl
|
|
95
|
+
- split maximaStrategy() into individual fns
|
|
96
|
+
- simplify/rename strategy opts
|
|
97
|
+
- update strategy interval iteration to minimize floating point errors
|
|
98
|
+
- update tests
|
|
99
|
+
- update defuzz() output prep ([81abe8c](https://github.com/thi-ng/umbrella/commit/81abe8c))
|
|
100
|
+
- add support for custom implications of rule outputs
|
|
101
|
+
- update/optimize rule weight handling
|
|
102
|
+
- add alphaCut() & implication() fns ([8ec15fa](https://github.com/thi-ng/umbrella/commit/8ec15fa))
|
|
103
|
+
- add min true threshold for classify() ([6f49a30](https://github.com/thi-ng/umbrella/commit/6f49a30))
|
|
104
|
+
- update docs
|
|
105
|
+
- migrate t-norms from [@thi.ng/math](https://github.com/thi-ng/umbrella/tree/main/packages/math) pkg ([f8993e0](https://github.com/thi-ng/umbrella/commit/f8993e0))
|
|
106
|
+
- add maxima(), compose(), restructure ([f15d8d7](https://github.com/thi-ng/umbrella/commit/f15d8d7))
|
|
107
|
+
- add strict arg for classify(), update docs ([b39248f](https://github.com/thi-ng/umbrella/commit/b39248f))
|
|
108
|
+
- add shapes, strongAnd(), update combineTerms() ([5bf8f0c](https://github.com/thi-ng/umbrella/commit/5bf8f0c))
|
|
109
|
+
- add evaluate() ([0ffc9d0](https://github.com/thi-ng/umbrella/commit/0ffc9d0))
|
|
110
|
+
- import as new pkg, refactor ([a578194](https://github.com/thi-ng/umbrella/commit/a578194))
|
|
111
|
+
- re-use T-norms migrated to [@thi.ng/maths](https://github.com/thi-ng/umbrella/tree/main/packages/maths)
|
|
112
|
+
- add variable() factory
|
|
113
|
+
- add classify()
|
|
114
|
+
- fix off-by-one error in trapezoid()
|
|
115
|
+
- add docstrings
|
|
116
|
+
|
|
117
|
+
#### ⏱ Performance improvements
|
|
118
|
+
|
|
119
|
+
- update defuzz() ([60030dd](https://github.com/thi-ng/umbrella/commit/60030dd))
|
|
120
|
+
- skip preparation of rule outputs which aren't requested
|
package/package.json
CHANGED
|
@@ -1,104 +1,109 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"name": "@thi.ng/fuzzy",
|
|
3
|
+
"version": "2.1.3",
|
|
4
|
+
"description": "Fuzzy logic operators & configurable rule inferencing engine",
|
|
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://github.com/thi-ng/umbrella/tree/master/packages/fuzzy#readme",
|
|
14
|
+
"funding": [
|
|
15
|
+
{
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/sponsors/postspectacular"
|
|
12
18
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
{
|
|
20
|
+
"type": "patreon",
|
|
21
|
+
"url": "https://patreon.com/thing_umbrella"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"author": "Karsten Schmidt <k+npm@thi.ng>",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "yarn clean && tsc --declaration",
|
|
28
|
+
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc strategies",
|
|
29
|
+
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
|
|
30
|
+
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
|
|
31
|
+
"doc:readme": "yarn doc:stats && tools:readme",
|
|
32
|
+
"doc:stats": "tools:module-stats",
|
|
33
|
+
"pub": "yarn npm publish --access public",
|
|
34
|
+
"test": "testament test"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@thi.ng/api": "^8.3.3",
|
|
38
|
+
"@thi.ng/math": "^5.2.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@microsoft/api-extractor": "^7.19.2",
|
|
42
|
+
"@thi.ng/testament": "^0.2.3",
|
|
43
|
+
"rimraf": "^3.0.2",
|
|
44
|
+
"tools": "^0.0.1",
|
|
45
|
+
"typedoc": "^0.22.10",
|
|
46
|
+
"typescript": "^4.5.3"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"agent",
|
|
50
|
+
"functional",
|
|
51
|
+
"math",
|
|
52
|
+
"fuzzy",
|
|
53
|
+
"inference",
|
|
54
|
+
"logic",
|
|
55
|
+
"rule",
|
|
56
|
+
"t-norm",
|
|
57
|
+
"typescript"
|
|
58
|
+
],
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"engines": {
|
|
63
|
+
"node": ">=12.7"
|
|
64
|
+
},
|
|
65
|
+
"files": [
|
|
66
|
+
"*.js",
|
|
67
|
+
"*.d.ts",
|
|
68
|
+
"strategies"
|
|
69
|
+
],
|
|
70
|
+
"exports": {
|
|
71
|
+
".": {
|
|
72
|
+
"import": "./index.js"
|
|
35
73
|
},
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
"@thi.ng/math": "^5.0.8"
|
|
74
|
+
"./api": {
|
|
75
|
+
"import": "./api.js"
|
|
39
76
|
},
|
|
40
|
-
"
|
|
41
|
-
|
|
77
|
+
"./defuzz": {
|
|
78
|
+
"import": "./defuzz.js"
|
|
42
79
|
},
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"functional",
|
|
46
|
-
"math",
|
|
47
|
-
"fuzzy",
|
|
48
|
-
"inference",
|
|
49
|
-
"logic",
|
|
50
|
-
"rule",
|
|
51
|
-
"t-norm",
|
|
52
|
-
"typescript"
|
|
53
|
-
],
|
|
54
|
-
"publishConfig": {
|
|
55
|
-
"access": "public"
|
|
80
|
+
"./rules": {
|
|
81
|
+
"import": "./rules.js"
|
|
56
82
|
},
|
|
57
|
-
"
|
|
58
|
-
|
|
83
|
+
"./shapes": {
|
|
84
|
+
"import": "./shapes.js"
|
|
59
85
|
},
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
"*.d.ts",
|
|
63
|
-
"strategies"
|
|
64
|
-
],
|
|
65
|
-
"exports": {
|
|
66
|
-
".": {
|
|
67
|
-
"import": "./index.js"
|
|
68
|
-
},
|
|
69
|
-
"./api": {
|
|
70
|
-
"import": "./api.js"
|
|
71
|
-
},
|
|
72
|
-
"./defuzz": {
|
|
73
|
-
"import": "./defuzz.js"
|
|
74
|
-
},
|
|
75
|
-
"./rules": {
|
|
76
|
-
"import": "./rules.js"
|
|
77
|
-
},
|
|
78
|
-
"./shapes": {
|
|
79
|
-
"import": "./shapes.js"
|
|
80
|
-
},
|
|
81
|
-
"./strategies/bisector": {
|
|
82
|
-
"import": "./strategies/bisector.js"
|
|
83
|
-
},
|
|
84
|
-
"./strategies/centroid": {
|
|
85
|
-
"import": "./strategies/centroid.js"
|
|
86
|
-
},
|
|
87
|
-
"./strategies/maxima": {
|
|
88
|
-
"import": "./strategies/maxima.js"
|
|
89
|
-
},
|
|
90
|
-
"./strategies/opts": {
|
|
91
|
-
"import": "./strategies/opts.js"
|
|
92
|
-
},
|
|
93
|
-
"./tnorms": {
|
|
94
|
-
"import": "./tnorms.js"
|
|
95
|
-
},
|
|
96
|
-
"./var": {
|
|
97
|
-
"import": "./var.js"
|
|
98
|
-
}
|
|
86
|
+
"./strategies/bisector": {
|
|
87
|
+
"import": "./strategies/bisector.js"
|
|
99
88
|
},
|
|
100
|
-
"
|
|
101
|
-
|
|
89
|
+
"./strategies/centroid": {
|
|
90
|
+
"import": "./strategies/centroid.js"
|
|
102
91
|
},
|
|
103
|
-
"
|
|
104
|
-
|
|
92
|
+
"./strategies/maxima": {
|
|
93
|
+
"import": "./strategies/maxima.js"
|
|
94
|
+
},
|
|
95
|
+
"./strategies/opts": {
|
|
96
|
+
"import": "./strategies/opts.js"
|
|
97
|
+
},
|
|
98
|
+
"./tnorms": {
|
|
99
|
+
"import": "./tnorms.js"
|
|
100
|
+
},
|
|
101
|
+
"./var": {
|
|
102
|
+
"import": "./var.js"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"thi.ng": {
|
|
106
|
+
"year": 2020
|
|
107
|
+
},
|
|
108
|
+
"gitHead": "2db9dd34c0c2c60cbfde3dad0bca352b20292f5c\n"
|
|
109
|
+
}
|