File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -27,13 +27,13 @@ Wrappers provided in this package extend the functionality of such measures. For
27
27
28
28
``` julia
29
29
using StatisticalMeasuresBase
30
- L1 = multimeasure (supports_missings_measure (l1))
31
- y = [1 , 2 , missing ]
32
- ŷ = [2 , 3 , 4 ]
33
- weights = [8 , 7 , 6 ]
30
+ L1 = multimeasure (supports_missings_measure (l1), mode = Sum () )
31
+ y = [5 , 6 , missing ]
32
+ ŷ = [6 , 8 , 7 ]
33
+ weights = [1 , 3 , 9 ]
34
34
35
- julia> L1 (ŷ, y, weights)
36
- 5.0
35
+ julia> L1 (ŷ, y, weights) ≈ 1 * abs ( 6 - 5 ) + 3 * abs ( 8 - 6 )
36
+ true
37
37
```
38
38
39
39
``` julia
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ A Julia package for building production-ready measures (metrics) for statistics
13
13
Here's an example of a simple statistical measure, applied to a pair of scalars:
14
14
15
15
``` @example 01
16
- l1(ŷ, y) = abs(ŷ - y)
16
+ l1(ŷ, y) = abs(ŷ - y)
17
17
y = 5 # ground truth
18
18
ŷ = 2 # prediction
19
19
l1(ŷ, y)
@@ -23,11 +23,11 @@ Wrappers provided in this package extend the functionality of such measures. For
23
23
24
24
``` @example 01
25
25
using StatisticalMeasuresBase
26
- L1 = multimeasure(supports_missings_measure(l1))
27
- y = [1, 2 , missing]
28
- ŷ = [2, 3, 4 ]
29
- weights = [8, 7, 6 ]
30
- L1(ŷ, y, weights)
26
+ L1 = multimeasure(supports_missings_measure(l1), mode=Sum() )
27
+ y = [5, 6 , missing]
28
+ ŷ = [6, 8, 7 ]
29
+ weights = [1, 3, 9 ]
30
+ L1(ŷ, y, weights) ≈ 1*abs(6 - 5) + 3*abs(8 - 6)
31
31
```
32
32
33
33
``` @example 01
You can’t perform that action at this time.
0 commit comments