@decidables/detectable-elements 0.1.3 → 0.2.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 +22 -0
- package/README.md +128 -5
- package/lib/detectableElements.esm.js +709 -305
- package/lib/detectableElements.esm.js.map +1 -1
- package/lib/detectableElements.esm.min.js +185 -102
- package/lib/detectableElements.esm.min.js.map +1 -1
- package/lib/detectableElements.umd.js +711 -304
- package/lib/detectableElements.umd.js.map +1 -1
- package/lib/detectableElements.umd.min.js +191 -108
- package/lib/detectableElements.umd.min.js.map +1 -1
- package/package.json +3 -3
- package/src/components/detectable-control.js +2 -1
- package/src/components/detectable-response.js +26 -11
- package/src/components/detectable-table.js +28 -11
- package/src/components/rdk-task.js +1 -1
- package/src/components/roc-space.js +1 -1
- package/src/components/sdt-model.js +10 -10
- package/src/equations/hfa2ppv.js +121 -0
- package/src/equations/index.js +2 -0
- package/src/equations/mcr2fomr.js +121 -0
- package/src/equations/sdt-equation.js +9 -0
- package/src/examples/index.js +1 -0
- package/src/examples/multiple.js +76 -0
- package/src/examples/sdt-example.js +1 -1
- package/src/examples/unequal.js +4 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.0](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.1.3...@decidables/detectable-elements@0.2.0) (2022-04-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### ⚠ BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **detectable-elements:** "outcome" option now only colors outcomes, and "all" option colors everything
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **detectable-elements:** add equations for PPV and FOR ([9c7841c](https://github.com/decidables/decidables/commit/9c7841ceede9c553a9bfa0b6cfe685d65b8bdc03))
|
|
16
|
+
* **detectable-elements:** add multiple value example ([407694a](https://github.com/decidables/decidables/commit/407694a884ead989ffeb1b1fd3dfa4436705d653))
|
|
17
|
+
* **detectable-elements:** add new color option for table ([c0ea8ef](https://github.com/decidables/decidables/commit/c0ea8ef619816eb2f5d6ebcc0e64aefa9e871df7))
|
|
18
|
+
* **detectable-elements:** use proper minus signs in labels ([bb4ec8c](https://github.com/decidables/decidables/commit/bb4ec8cf28465fa1ce452e5a77d459a4a04fd976))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **detectable-elements:** fix labelling and appeareance of incentives in detectable-response ([4b0b5a9](https://github.com/decidables/decidables/commit/4b0b5a9fc294672fc0610d5489231dbc6e363850))
|
|
24
|
+
* **detectable-elements:** improve equation layout at small screen size ([e078034](https://github.com/decidables/decidables/commit/e07803402880ece793947d0dd4c87747b6ff7f06))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
### [0.1.3](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.1.2...@decidables/detectable-elements@0.1.3) (2022-03-31)
|
|
7
29
|
|
|
8
30
|
|
package/README.md
CHANGED
|
@@ -268,7 +268,9 @@ block of trials.
|
|
|
268
268
|
- `'response'`
|
|
269
269
|
- Color based on *'signal'* or *'noise'* response
|
|
270
270
|
- `'outcome'`
|
|
271
|
-
- Color based on outcome of hit
|
|
271
|
+
- Color based on outcome of *hit*, *miss*, *false alarm* or *correct rejection*
|
|
272
|
+
- `'all'`
|
|
273
|
+
- Color based on stimulus, response, and outcome
|
|
272
274
|
- `zRoc: boolean = undefined`
|
|
273
275
|
- Show a switch to set whether to use z-transformed ROC coordinates (`true`) or ROC coordinates
|
|
274
276
|
(`false`)
|
|
@@ -592,13 +594,15 @@ overall results are optionally marginalized with accuracy.
|
|
|
592
594
|
- `'none'`
|
|
593
595
|
- No colors
|
|
594
596
|
- `'accuracy'`
|
|
595
|
-
- Color based on accuracy, i.e. correct or error
|
|
597
|
+
- Color based on accuracy, i.e. *correct* or *error*
|
|
596
598
|
- `'stimulus'`
|
|
597
|
-
- Color based on stimulus present or absent
|
|
599
|
+
- Color based on stimulus *present* or *absent*
|
|
598
600
|
- `'response'`
|
|
599
|
-
- Color based on response 'present' or 'absent'
|
|
601
|
+
- Color based on response *'present'* or *'absent'*
|
|
600
602
|
- `'outcome'`
|
|
601
|
-
-
|
|
603
|
+
- Color based on *hits*, *misses*, *false alarms* and *correct rejections*
|
|
604
|
+
- `'all'`
|
|
605
|
+
- Color based on stimulus, response, and outcome
|
|
602
606
|
- `hits: number = 40`
|
|
603
607
|
- Number of hits
|
|
604
608
|
- `misses: number = 60`
|
|
@@ -786,6 +790,44 @@ False alarm rate from false alarms and correct rejections
|
|
|
786
790
|
<sdt-equation-facr2far numeric interactive false-alarms="25" correct-rejections="75"></sdt-equation-facr2far>
|
|
787
791
|
```
|
|
788
792
|
|
|
793
|
+
#### `SDTEquationHFa2Ppv` / `<sdt-equation-hfa2ppv>`
|
|
794
|
+
|
|
795
|
+
Positive predictive value rate from hits and false alarms
|
|
796
|
+
|
|
797
|
+
##### Attributes
|
|
798
|
+
|
|
799
|
+
- `numeric: boolean = false`
|
|
800
|
+
- Show values instead of just the names of variables
|
|
801
|
+
- `interactive: boolean = false`
|
|
802
|
+
- Allow editing of numeric values in the equation
|
|
803
|
+
- `hits: number = 0`
|
|
804
|
+
- Hits
|
|
805
|
+
- `false-alarms: number = 0`
|
|
806
|
+
- False alarms
|
|
807
|
+
|
|
808
|
+
##### Properties
|
|
809
|
+
|
|
810
|
+
- `ppv: number`
|
|
811
|
+
- Positive predictive value
|
|
812
|
+
|
|
813
|
+
##### Custom Events
|
|
814
|
+
|
|
815
|
+
- `sdt-equation-hfa2ppv-change`
|
|
816
|
+
- Indicates that the values in the equation have changed
|
|
817
|
+
- `detail`
|
|
818
|
+
- `h: number`
|
|
819
|
+
- New value of hits
|
|
820
|
+
- `fa: number`
|
|
821
|
+
- New value of false alarms
|
|
822
|
+
- `hr: number`
|
|
823
|
+
- New value of positive predictive value
|
|
824
|
+
|
|
825
|
+
##### Example
|
|
826
|
+
|
|
827
|
+
```html
|
|
828
|
+
<sdt-equation-hfa2ppv numeric interactive hits="75" false-alarms="25"></sdt-equation-hfa2ppv>
|
|
829
|
+
```
|
|
830
|
+
|
|
789
831
|
#### `SDTEquationHM2Hr` / `<sdt-equation-hm2hr>`
|
|
790
832
|
|
|
791
833
|
Hit rate from hits and misses
|
|
@@ -954,6 +996,44 @@ Sensitivity from hit rate and false alarm rate
|
|
|
954
996
|
<sdt-equation-hrfar2d numeric interactive unequal hit-rate="0.75" false-alarm-rate="0.25" s="1.5"></sdt-equation-hrfar2d>
|
|
955
997
|
```
|
|
956
998
|
|
|
999
|
+
#### `SDTEquationMCr2Fomr` / `<sdt-equation-mcr2fomr>`
|
|
1000
|
+
|
|
1001
|
+
Positive predictive value rate from hits and false alarms
|
|
1002
|
+
|
|
1003
|
+
##### Attributes
|
|
1004
|
+
|
|
1005
|
+
- `numeric: boolean = false`
|
|
1006
|
+
- Show values instead of just the names of variables
|
|
1007
|
+
- `interactive: boolean = false`
|
|
1008
|
+
- Allow editing of numeric values in the equation
|
|
1009
|
+
- `misses: number = 0`
|
|
1010
|
+
- Misses
|
|
1011
|
+
- `correct-rejections: number = 0`
|
|
1012
|
+
- Correct rejections
|
|
1013
|
+
|
|
1014
|
+
##### Properties
|
|
1015
|
+
|
|
1016
|
+
- `fomr: number`
|
|
1017
|
+
- False omission rate
|
|
1018
|
+
|
|
1019
|
+
##### Custom Events
|
|
1020
|
+
|
|
1021
|
+
- `sdt-equation-mcr2fomr-change`
|
|
1022
|
+
- Indicates that the values in the equation have changed
|
|
1023
|
+
- `detail`
|
|
1024
|
+
- `m: number`
|
|
1025
|
+
- New value of misses
|
|
1026
|
+
- `cr: number`
|
|
1027
|
+
- New value of correct rejections
|
|
1028
|
+
- `fomr: number`
|
|
1029
|
+
- New value of false omission rate
|
|
1030
|
+
|
|
1031
|
+
##### Example
|
|
1032
|
+
|
|
1033
|
+
```html
|
|
1034
|
+
<sdt-equation-mcr2fomr numeric interactive misses="75" correct-rejections="25"></sdt-equation-mcr2fomr>
|
|
1035
|
+
```
|
|
1036
|
+
|
|
957
1037
|
#### `SDTEquation`
|
|
958
1038
|
|
|
959
1039
|
Base class for all interactive SDT equations
|
|
@@ -1118,6 +1198,49 @@ because their values are received from the model's task performance.
|
|
|
1118
1198
|
</detectable-example-model>
|
|
1119
1199
|
```
|
|
1120
1200
|
|
|
1201
|
+
#### `DetectableExampleMultiple` / `<detectable-example-multiple>`
|
|
1202
|
+
|
|
1203
|
+
Multiple value example
|
|
1204
|
+
|
|
1205
|
+
Used to build specialized examples with multiple values for one variable (sensitivity or bias) and a
|
|
1206
|
+
single value for the other variable. Can include controls, ROC space, and a visual rendering of
|
|
1207
|
+
signal detection theory. The SDT model can be interactive.
|
|
1208
|
+
|
|
1209
|
+
##### Attributes
|
|
1210
|
+
|
|
1211
|
+
- `variable: string = 'd'`
|
|
1212
|
+
- Choose which variable to have multiple values
|
|
1213
|
+
- Options
|
|
1214
|
+
- `'d'`
|
|
1215
|
+
- Sensitivity
|
|
1216
|
+
- `'c'`
|
|
1217
|
+
- Bias
|
|
1218
|
+
- `values: Array = [0, 1]`
|
|
1219
|
+
- Which marginals to display
|
|
1220
|
+
- Expressed in HTML as a space-separated list of numbers
|
|
1221
|
+
|
|
1222
|
+
##### Slots
|
|
1223
|
+
|
|
1224
|
+
- *unnamed*
|
|
1225
|
+
- Place relevant `detectable-elements` components here
|
|
1226
|
+
- Wired elements
|
|
1227
|
+
- `<detectable-control>`
|
|
1228
|
+
- Allows user to adjust parameters
|
|
1229
|
+
- `<sdt-model>`
|
|
1230
|
+
- Display and change a visual rendering of sensitivity and bias
|
|
1231
|
+
- `<roc-space>`
|
|
1232
|
+
- Displays the hit rate and false alarm rate in ROC space
|
|
1233
|
+
|
|
1234
|
+
##### Example
|
|
1235
|
+
|
|
1236
|
+
```html
|
|
1237
|
+
<sdt-example-multiple variable="d" values="0 1 2 3 4">
|
|
1238
|
+
<detectable-control z-roc></detectable-control>
|
|
1239
|
+
<sdt-model interactive threshold bias></sdt-model>
|
|
1240
|
+
<roc-space z-roc point="rest" iso-d="rest" iso-c="first"></roc-space>
|
|
1241
|
+
</sdt-example-multiple>
|
|
1242
|
+
```
|
|
1243
|
+
|
|
1121
1244
|
#### `DetectableExampleUnequal` / `<detectable-example-unequal>`
|
|
1122
1245
|
|
|
1123
1246
|
Unequal variance example
|