Skip to content

Commit

Permalink
README: Updated robustness example
Browse files Browse the repository at this point in the history
  • Loading branch information
mossr committed Jul 31, 2024
1 parent 1a53117 commit 4a2d4a5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ x = [1, 2, 3, 4, -9, -8]
ϕ = @formula (xₜ -> xₜ > 0.5)

# Robustness
ρ(x, ϕ)
# Outputs: 3.5

# Robustness gradient
∇ρ(x, ϕ)
# Outputs: [0.0 0.0 0.0 1.0 0.0 0.0]

# Smooth approximate robustness
# Smooth robustness gradient
∇ρ̃(x, ϕ)
# Outputs: [-0.0478501 -0.0429261 0.120196 0.970638 -1.67269e-5 -4.15121e-5]
```
Expand Down

0 comments on commit 4a2d4a5

Please sign in to comment.