Skip to content
Snippets Groups Projects
Commit 83055e81 authored by Pat Alt's avatar Pat Alt
Browse files

more work on mnist

parent 8f5924f7
No related branches found
No related tags found
No related merge requests found
artifacts/results/images/mnist_eccco.png

18.7 KiB | W: | H:

artifacts/results/images/mnist_eccco.png

19 KiB | W: | H:

artifacts/results/images/mnist_eccco.png
artifacts/results/images/mnist_eccco.png
artifacts/results/images/mnist_eccco.png
artifacts/results/images/mnist_eccco.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -320,7 +320,7 @@ model_performance ...@@ -320,7 +320,7 @@ model_performance
```{julia} ```{julia}
# ECCCo: # ECCCo:
λ=[0.5,0.1,0.5] λ=[0.5,0.1,0.5]
temp=0.1 temp=0.5
η=0.01 η=0.01
# Generate counterfactuals using ECCCo generator: # Generate counterfactuals using ECCCo generator:
......
No preview for this file type
...@@ -272,7 +272,7 @@ As noted by \citet{guidotti2022counterfactual}, these distance-based measures ar ...@@ -272,7 +272,7 @@ As noted by \citet{guidotti2022counterfactual}, these distance-based measures ar
\item Coverage and temperature impacts CCE in somewhat unpredictable ways \item Coverage and temperature impacts CCE in somewhat unpredictable ways
\item It seems that models that are not explicitly trained for generative task, still learn it implictly \item It seems that models that are not explicitly trained for generative task, still learn it implictly
\item Batch size seems to impact quality of generated samples (at inference, but not so much during JEM training) \item Batch size seems to impact quality of generated samples (at inference, but not so much during JEM training)
\item ECCCo is sensitive to optimizer (Adam works well), learning rate and distance metric (l1 works well) \item ECCCo is sensitive to optimizer (Adam works well), learning rate and distance metric (l1 currently only one that works)
\item SGLD takes time \item SGLD takes time
\item REVISE has benefit of lower dimensional space \item REVISE has benefit of lower dimensional space
\end{itemize} \end{itemize}
......
...@@ -28,7 +28,7 @@ function ECCCoGenerator(; ...@@ -28,7 +28,7 @@ function ECCCoGenerator(;
function _set_size_penalty(ce::AbstractCounterfactualExplanation) function _set_size_penalty(ce::AbstractCounterfactualExplanation)
return ECCCo.set_size_penalty(ce; κ=κ, temp=temp) return ECCCo.set_size_penalty(ce; κ=κ, temp=temp)
end end
_penalties = [Objectives.distance_l1, _set_size_penalty, ECCCo.distance_from_energy] _penalties = [Objectives.distance_l2, _set_size_penalty, ECCCo.distance_from_energy]
λ = λ isa AbstractFloat ? [0.0, λ, λ] : λ λ = λ isa AbstractFloat ? [0.0, λ, λ] : λ
return Generator(; penalty=_penalties, λ=λ, opt=opt, kwargs...) return Generator(; penalty=_penalties, λ=λ, opt=opt, kwargs...)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment