-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from ilabcode/misc_polish
Misc polish
- Loading branch information
Showing
74 changed files
with
4,140 additions
and
4,490 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
*.jl.*.cov | ||
*.jl.cov | ||
*.jl.mem | ||
/docs/build/ | ||
.DS_Store | ||
.vscode | ||
|
||
testing_script*.jl | ||
settings.json | ||
|
||
Manifest.toml | ||
docs/Manifest.toml | ||
test/Manifest.toml | ||
/docs/src/generated_markdowns/*.md | ||
|
||
/docs/src/generated | ||
/docs/src/index.md | ||
/docs/build/ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,15 +4,15 @@ authors = [ "Peter Thestrup Waade [email protected]", | |
"Anna Hedvig Møller [email protected]", | ||
"Jacopo Comoglio [email protected]", | ||
"Christoph Mathys [email protected]"] | ||
version = "0.3.3" | ||
version = "0.5.0" | ||
|
||
[deps] | ||
ActionModels = "320cf53b-cc3b-4b34-9a10-0ecb113566a3" | ||
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" | ||
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" | ||
|
||
[compat] | ||
ActionModels = "0.4" | ||
ActionModels = "0.5" | ||
Distributions = "0.25" | ||
RecipesBase = "1" | ||
julia = "1.9" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using ActionModels, HierarchicalGaussianFiltering | ||
using CSV, DataFrames | ||
using Plots, StatsPlots | ||
using Distributions | ||
|
||
|
||
# Get the path for the HGF superfolder | ||
hgf_path = dirname(dirname(pathof(HierarchicalGaussianFiltering))) | ||
# Add the path to the data files | ||
data_path = hgf_path * "/docs/src/tutorials/data/" | ||
|
||
#Load data | ||
data = CSV.read(data_path * "classic_cannonball_data.csv", DataFrame) | ||
inputs = data[(data.ID.==20).&(data.session.==1), :].outcome | ||
|
||
#Create HGF | ||
hgf = premade_hgf("JGET", verbose = false) | ||
#Create agent | ||
agent = premade_agent("hgf_gaussian", hgf) | ||
#Set parameters | ||
parameters = Dict( | ||
"action_noise" => 1, | ||
("u", "input_noise") => 0, | ||
("x", "initial_mean") => first(inputs) + 2, | ||
("x", "initial_precision") => 0.001, | ||
("x", "volatility") => -8, | ||
("xvol", "volatility") => -8, | ||
("xnoise", "volatility") => -7, | ||
("xnoise_vol", "volatility") => -2, | ||
("x", "xvol", "coupling_strength") => 1, | ||
("xnoise", "xnoise_vol", "coupling_strength") => 1, | ||
) | ||
set_parameters!(agent, parameters) | ||
reset!(agent) | ||
|
||
#Simulate updates and actions | ||
actions = give_inputs!(agent, inputs); | ||
#Plot belief trajectories | ||
plot_trajectory(agent, "u") | ||
plot_trajectory!(agent, "x") | ||
plot_trajectory(agent, "xvol") | ||
plot_trajectory(agent, "xnoise") | ||
plot_trajectory(agent, "xnoise_vol") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.