Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dagsampler #137

Merged
merged 8 commits into from
Feb 15, 2024
Merged

Add dagsampler #137

merged 8 commits into from
Feb 15, 2024

Conversation

mschauer
Copy link
Owner

@mschauer mschauer commented Feb 6, 2024

Seems to be correct: Finds all Dags and spends 1/25=0.04 time in each.

OrderedCollections.OrderedDict{Vector, Float64} with 25 entries:
  [2=>1, 3=>2]       => 0.041413
  [2=>1, 2=>3]       => 0.0408618
  [3=>1, 3=>2]       => 0.0405056
  [2=>3]             => 0.0404357
  [2=>1]             => 0.0403629
  [1=>3, 2=>3]       => 0.0403192
  [1=>2, 1=>3, 2=>3] => 0.0402318
  [2=>1, 3=>1, 3=>2] => 0.0402213
  [3=>1]             => 0.0401996
  [1=>2, 2=>3]       => 0.0400947
  [1=>2, 3=>1]       => 0.0400215
  [1=>3]             => 0.0400138
  [2=>3, 3=>1]       => 0.0399952
  [1=>3, 2=>1]       => 0.039991
  [1=>2, 3=>1, 3=>2] => 0.039985
  Any[]              => 0.0399456
  [2=>1, 2=>3, 3=>1] => 0.0399186
  [1=>2]             => 0.0396969
  [3=>2]             => 0.0396889
  [1=>3, 2=>1, 2=>3] => 0.039656
  [2=>1, 3=>1]       => 0.0395396
  [1=>2, 3=>2]       => 0.0394285
  [1=>2, 1=>3]       => 0.0393982
  [1=>2, 1=>3, 3=>2] => 0.0392891
  [1=>3, 3=>2]       => 0.0387867

test/dag_sampler.jl Outdated Show resolved Hide resolved
src/sampler.jl Show resolved Hide resolved
@mschauer mschauer changed the title Add dagsampler (WIP, no scores, only uniform) Add dagsampler Feb 10, 2024
@mschauer mschauer closed this Feb 10, 2024
@mschauer mschauer reopened this Feb 10, 2024
src/sampler.jl Outdated Show resolved Hide resolved

Random.seed!(1)

N = 20 # number of data points
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schau mal, hier musste ich N auch niedriger wählen als in

N = 2000 # number of data points

@mschauer mschauer merged commit b48fb66 into master Feb 15, 2024
6 checks passed
@mschauer mschauer deleted the dagsampler branch February 15, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant