oracular 0.16.0 → 0.17.0

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#75](https://github.com/Yuribenjamin/oracular/pull/75) [`bdce2bd`](https://github.com/Yuribenjamin/oracular/commit/bdce2bdcffceab6465b08cf1ae1361ec47b8a1bf) Thanks [@Yuribenjamin](https://github.com/Yuribenjamin)! - **Six lift measures are deprecated.** 0.9 added `learning.lift` with seven association measures. A sweep of all seven on the clickstream case study found none that beats the default, `'normalized-difference'`, on either split, and 1.0 commits every value in the schema for the whole of 1.x. So `'absolute-difference'`, `'relative-lift'`, `'risk-ratio'`, `'log-lift'`, `'odds-ratio'` and `'association-rule'` are marked `@deprecated` in `LiftType`, named in the JSON Schema's description, and removed in 1.0. Nothing changes in this release: every value keeps working exactly as it did, a config that sets one keeps loading, and the type checker shows the mark. `learning.lift` itself stays, accepting the default, so that a measure can come back as a minor when a real integration shows it should.
8
+
3
9
  ## 0.16.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -204,15 +204,13 @@ effective = (k × w₀ + nEff × learned) / (k + nEff) k = priorEpiso
204
204
 
205
205
  `w₀` is your initial weight, `gain` (default 2) caps the learned magnitude at `gain × |w₀|` for every lift option, and `priorEpisodes` (default 10) is how much contrast it takes for the user's own history to count as much as your guess. A signal's strength and your confidence in it are separate knobs. A signal is judged against the sessions in which it did *not* appear, so for an outcome that happens in 3% of sessions, a signal followed by it 30% of the time is strong evidence, not weak. And learning needs contrast: a signal that has never been absent has no counterfactual, so its weight stands until there are sessions without it. Nothing drifts after a single outcome.
206
206
 
207
- The formula above is the default **normalized difference**. `learning.lift` is an optional
208
- setting for advanced users who want to choose the learning scale. Choose another at construction with
209
- `createState({ intents, learning: { lift: 'relative-lift' } })`. Omit `learning.lift` to keep the
210
- current behavior, including when loading older saved states. The available names and formulas
211
- are listed in [Episodes & learning](https://yuribenjamin.github.io/oracular/guide/concepts/episodes-and-learning#choosing-a-lift-formula).
212
- Every choice produces a signed evidence score in [−1, 1], with independence at zero. Ratios use
213
- `(R − 1) / (R + 1)`, relative/log lift use `x / (1 + |x|)`, and absolute/normalized differences
214
- keep their scale. Learning uses `gain × |w₀| × score`; `oracular tune` uses the same score for
215
- weights and intervals and reports raw lift separately when it differs from the score.
207
+ The formula above is the default **normalized difference**. `learning.lift` can name another
208
+ association measure (`'relative-lift'`, `'risk-ratio'`, `'log-lift'`, `'odds-ratio'`,
209
+ `'absolute-difference'`, `'association-rule'`), each converted to a signed evidence score in
210
+ [−1, 1] with independence at zero, as [Episodes & learning](https://yuribenjamin.github.io/oracular/guide/concepts/episodes-and-learning#choosing-a-lift-formula)
211
+ lists. **Those six are deprecated and removed in 1.0:** a sweep of all seven on the clickstream
212
+ case study found none that beats the default on either split. They keep working until then; omit
213
+ `learning.lift`, or set the default, and nothing changes.
216
214
 
217
215
  Learned counts never decay unless you set `learning.halfLife`.
218
216
 
package/dist/index.d.cts CHANGED
@@ -69,8 +69,25 @@ interface RevealOptions {
69
69
  */
70
70
  bound?: 'normal' | 'exact';
71
71
  }
72
- /** The association measure converted to a signed, bounded score when learning signal weights. */
73
- type LiftType = 'absolute-difference' | 'relative-lift' | 'risk-ratio' | 'log-lift' | 'odds-ratio' | 'normalized-difference' | 'association-rule';
72
+ /**
73
+ * The association measure converted to a signed, bounded score when learning signal weights.
74
+ * Every value but the default, `'normalized-difference'`, is deprecated: a sweep of all seven on
75
+ * the clickstream case study found none that beats the default on either split, so the six are
76
+ * removed in 1.0. They keep working, unchanged, until then; `learning.lift` itself stays.
77
+ */
78
+ type LiftType =
79
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
80
+ 'absolute-difference'
81
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
82
+ | 'relative-lift'
83
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
84
+ | 'risk-ratio'
85
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
86
+ | 'log-lift'
87
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
88
+ | 'odds-ratio' | 'normalized-difference'
89
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
90
+ | 'association-rule';
74
91
  /**
75
92
  * How the engine learns from the user's own outcomes.
76
93
  *
@@ -89,6 +106,7 @@ interface LearningConfig {
89
106
  * absolute/normalized differences keep their scale. Omit to preserve the existing normalized
90
107
  * difference exactly. 'association-rule' uses the overall outcome rate as its baseline; the
91
108
  * others use episodes without the signal. Raw ratios are reporting metrics, never weights.
109
+ * Every value but the default is deprecated and removed in 1.0 (see {@link LiftType}).
92
110
  */
93
111
  lift?: LiftType;
94
112
  /** Half-life of learned hit/miss counts, in the same unit as `at`. Omit for no forgetting. */
package/dist/index.d.ts CHANGED
@@ -69,8 +69,25 @@ interface RevealOptions {
69
69
  */
70
70
  bound?: 'normal' | 'exact';
71
71
  }
72
- /** The association measure converted to a signed, bounded score when learning signal weights. */
73
- type LiftType = 'absolute-difference' | 'relative-lift' | 'risk-ratio' | 'log-lift' | 'odds-ratio' | 'normalized-difference' | 'association-rule';
72
+ /**
73
+ * The association measure converted to a signed, bounded score when learning signal weights.
74
+ * Every value but the default, `'normalized-difference'`, is deprecated: a sweep of all seven on
75
+ * the clickstream case study found none that beats the default on either split, so the six are
76
+ * removed in 1.0. They keep working, unchanged, until then; `learning.lift` itself stays.
77
+ */
78
+ type LiftType =
79
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
80
+ 'absolute-difference'
81
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
82
+ | 'relative-lift'
83
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
84
+ | 'risk-ratio'
85
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
86
+ | 'log-lift'
87
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
88
+ | 'odds-ratio' | 'normalized-difference'
89
+ /** @deprecated Removed in 1.0: use the default, `'normalized-difference'`. */
90
+ | 'association-rule';
74
91
  /**
75
92
  * How the engine learns from the user's own outcomes.
76
93
  *
@@ -89,6 +106,7 @@ interface LearningConfig {
89
106
  * absolute/normalized differences keep their scale. Omit to preserve the existing normalized
90
107
  * difference exactly. 'association-rule' uses the overall outcome rate as its baseline; the
91
108
  * others use episodes without the signal. Raw ratios are reporting metrics, never weights.
109
+ * Every value but the default is deprecated and removed in 1.0 (see {@link LiftType}).
92
110
  */
93
111
  lift?: LiftType;
94
112
  /** Half-life of learned hit/miss counts, in the same unit as `at`. Omit for no forgetting. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oracular",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "On-device intent engine. Your app learns when the user is ready. Nothing leaves the device.",
5
5
  "keywords": [
6
6
  "oracular",
@@ -165,7 +165,7 @@
165
165
  "normalized-difference",
166
166
  "association-rule"
167
167
  ],
168
- "description": "Association measure, converted to an evidence score in [-1, 1], neutral at zero. Ratios use (R - 1)/(R + 1), relative/log lift use x/(1 + abs(x)), and absolute/normalized differences keep their scale. Default normalized-difference preserves existing behavior. Association-rule compares with the overall outcome rate."
168
+ "description": "Association measure, converted to an evidence score in [-1, 1], neutral at zero. Ratios use (R - 1)/(R + 1), relative/log lift use x/(1 + abs(x)), and absolute/normalized differences keep their scale. Default normalized-difference preserves existing behavior. Association-rule compares with the overall outcome rate. Every value but normalized-difference is deprecated and removed in 1.0: a sweep of all seven on the clickstream case study found none that beats the default on either split."
169
169
  }
170
170
  }
171
171
  }