File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change 393
393
Return how much the predicted distribution `ŷ` diverges from the expected Poisson
394
394
distribution `y`; calculated as -
395
395
396
- ` sum(ŷ .- y .* log.(ŷ)) / size(y, 2)`.
396
+ sum(ŷ .- y .* log.(ŷ)) / size(y, 2)
397
397
398
398
[More information.](https://peltarion.com/knowledge-center/documentation/modeling-view/build-an-ai-model/loss-functions/poisson).
399
399
416
416
Return the [hinge_loss](https://en.wikipedia.org/wiki/Hinge_loss) given the
417
417
prediction `ŷ` and true labels `y` (containing 1 or -1); calculated as
418
418
419
- ` sum(max.(0, 1 .- ŷ .* y)) / size(y, 2)`.
419
+ sum(max.(0, 1 .- ŷ .* y)) / size(y, 2)
420
420
421
421
Usually used with classifiers like Support Vector Machines.
422
422
See also: [`squared_hinge_loss`](@ref)
451
451
Return the squared hinge_loss loss given the prediction `ŷ` and true labels `y`
452
452
(containing 1 or -1); calculated as
453
453
454
- ` sum((max.(0, 1 .- ŷ .* y)).^2) / size(y, 2)`.
454
+ sum((max.(0, 1 .- ŷ .* y)).^2) / size(y, 2)
455
455
456
456
Usually used with classifiers like Support Vector Machines.
457
457
See also: [`hinge_loss`](@ref)
Original file line number Diff line number Diff line change @@ -533,9 +533,6 @@ julia> a = Flux.throttle(() -> println("Flux"), 2);
533
533
julia> a()
534
534
Flux
535
535
536
- julia> a()
537
- Flux
538
-
539
536
julia> for i = 1:4 # sleeps for 1 second -> the function can be called in alternate iterations
540
537
a()
541
538
sleep(1)
551
548
Flux
552
549
Flux
553
550
Flux
554
-
555
551
```
556
552
"""
557
553
function throttle (f, timeout; leading= true , trailing= false )
You can’t perform that action at this time.
0 commit comments