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
a933ba45
Commit
a933ba45
authored
1 year ago
by
pat-alt
Browse files
Options
Downloads
Patches
Plain Diff
improved post-processing funcitons
parent
c3e6ec34
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!76
69 initial run including fmnist lenet and new method
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
experiments/model_tuning.jl
+0
-0
0 additions, 0 deletions
experiments/model_tuning.jl
experiments/post_processing/results.jl
+17
-29
17 additions, 29 deletions
experiments/post_processing/results.jl
experiments/setup_env.jl
+2
-1
2 additions, 1 deletion
experiments/setup_env.jl
with
19 additions
and
30 deletions
experiments/model_tuning.jl
0 → 100644
+
0
−
0
View file @
a933ba45
This diff is collapsed.
Click to expand it.
experiments/post_processing/results.jl
+
17
−
29
View file @
a933ba45
...
...
@@ -3,48 +3,36 @@
Helper function to quickly filter a benchmark table for the distance from targets: the smaller this distance, the higher the plausibility.
"""
function
plausibility
(
outcome
::
ExperimentOutcome
)
function
summarise_outcome
(
outcome
::
ExperimentOutcome
;
measure
=
"distance_from_targets"
,
model
::
Union
{
Nothing
,
String
}
=
nothing
)
bmk
=
outcome
.
bmk
df
=
@chain
bmk
()
begin
@group_by
(
dataname
,
generator
,
model
,
variable
)
@summarize
(
mean
=
mean
(
value
),
sd
=
std
(
value
))
@filter
(
variable
==
"distance_from_targets"
)
@ungroup
@arrange
(
mean
)
df
=
groupby
(
bmk
(),
[
:
dataname
,
:
generator
,
:
model
,
:
variable
])
|>
x
->
combine
(
x
,
:
value
=>
mean
=>
:
mean
,
:
value
=>
std
=>
:
std
)
|>
x
->
subset
(
x
,
:
variable
=>
ByRow
(
x
->
x
==
measure
))
if
!
isnothing
(
model
)
df
=
subset
(
df
,
:
model
=>
ByRow
(
x
->
x
==
model
))
end
sort!
(
df
,
[
:
model
,
:
mean
])
return
df
end
"""
plausibility(outcome::ExperimentOutcome)
Helper function to quickly filter a benchmark table for the distance from targets: the smaller this distance, the higher the plausibility.
"""
plausibility
(
outcome
::
ExperimentOutcome
;
kwrgs
...
)
=
summarise_outcome
(
outcome
,
measure
=
"distance_from_targets"
,
kwrgs
...
)
"""
faithfulness(outcome::ExperimentOutcome)
Helper function to quickly filter a benchmark table for the distance from energy: the smaller this distance, the higher the faithfulness.
"""
function
faithfulness
(
outcome
::
ExperimentOutcome
)
bmk
=
outcome
.
bmk
df
=
@chain
bmk
()
begin
@group_by
(
dataname
,
generator
,
model
,
variable
)
@summarize
(
mean
=
mean
(
value
),
sd
=
std
(
value
))
@filter
(
variable
==
"distance_from_energy"
)
@ungroup
@arrange
(
mean
)
end
return
df
end
faithfulness
(
outcome
::
ExperimentOutcome
;
kwrgs
...
)
=
summarise_outcome
(
outcome
,
measure
=
"distance_from_energy"
,
kwrgs
...
)
"""
closeness(outcome::ExperimentOutcome)
Helper function to quickly filter a benchmark table for the distance from the factual: the smaller this distance, the higher the closeness desideratum.
"""
function
closeness
(
outcome
::
ExperimentOutcome
)
bmk
=
outcome
.
bmk
df
=
@chain
bmk
()
begin
@group_by
(
dataname
,
generator
,
model
,
variable
)
@summarize
(
mean
=
mean
(
value
),
sd
=
std
(
value
))
@filter
(
variable
==
"distance"
)
@ungroup
@arrange
(
mean
)
end
return
df
end
\ No newline at end of file
closeness
(
outcome
::
ExperimentOutcome
;
kwrgs
...
)
=
summarise_outcome
(
outcome
,
measure
=
"distance"
,
kwrgs
...
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
experiments/setup_env.jl
+
2
−
1
View file @
a933ba45
...
...
@@ -19,7 +19,7 @@ using JointEnergyModels
using
LazyArtifacts
using
Logging
using
Metalhead
using
MLJBase
:
multiclass_f1score
,
accuracy
,
multiclass_precision
,
table
,
machine
,
fit!
using
MLJBase
:
multiclass_f1score
,
accuracy
,
multiclass_precision
,
table
,
machine
,
fit!
,
Supervised
using
MLJEnsembles
using
MLJFlux
using
Random
...
...
@@ -37,6 +37,7 @@ include("experiment.jl")
include
(
"grid_search.jl"
)
include
(
"data/data.jl"
)
include
(
"models/models.jl"
)
include
(
"model_tuning.jl"
)
include
(
"benchmarking/benchmarking.jl"
)
include
(
"post_processing/post_processing.jl"
)
include
(
"utils.jl"
)
...
...
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