Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ECCCo-jl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Altmeyer
ECCCo-jl
Commits
29b03cc1
Commit
29b03cc1
authored
1 year ago
by
Pat Alt
Browse files
Options
Downloads
Patches
Plain Diff
bloody jupyter seriously
parent
83b86a78
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
notebooks/mnist.qmd
+5
-6
5 additions, 6 deletions
notebooks/mnist.qmd
www/cce_mnist.png
+0
-0
0 additions, 0 deletions
www/cce_mnist.png
with
5 additions
and
6 deletions
notebooks/mnist.qmd
+
5
−
6
View file @
29b03cc1
...
...
@@ -21,7 +21,7 @@ clf = NeuralNetworkClassifier(
epochs=epochs,
batch_size=Int(round(n_obs/10))
)
conf_model = conformal_model(clf; method=:
simpl
e_inductive, coverage=.99)
conf_model = conformal_model(clf; method=:
adaptiv
e_inductive, coverage=.99)
mach = machine(conf_model, X, labels)
fit!(mach)
```
...
...
@@ -44,9 +44,9 @@ dt_reduced = counterfactual_data
```{julia}
# Set up search:
factual_label =
9
factual_label =
8
x = reshape(counterfactual_data.X[:,rand(findall(predict_label(M, counterfactual_data).==factual_label))],input_dim,1)
target =
4
target =
3
factual = predict_label(M, counterfactual_data, x)[1]
γ = 0.9
T = 100
...
...
@@ -61,7 +61,7 @@ ce_wachter = generate_counterfactual(
# Generate counterfactual using CCE generator:
generator = CCEGenerator(
λ=[0.0,10.0],
λ=[0.0,10
0
.0],
temp=0.01,
# opt=CounterfactualExplanations.Generators.JSMADescent(η=5.0),
)
...
...
@@ -71,9 +71,8 @@ ce_conformal = generate_counterfactual(
initialization=:identity,
converge_when=:generator_conditions,
)
```
```{julia}
# Plot:
p1 = Plots.plot(
convert2image(MNIST, reshape(x,28,28)),
axis=nothing,
...
...
This diff is collapsed.
Click to expand it.
www/cce_mnist.png
+
0
−
0
View replaced file @
83b86a78
View file @
29b03cc1
14.4 KiB
|
W:
|
H:
14.5 KiB
|
W:
|
H:
2-up
Swipe
Onion skin
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment