Skip to content

Commit

Permalink
fixed some issues still have p to change
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijenchawra committed Jun 17, 2021
1 parent 7b3dd06 commit 3021635
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
8 changes: 0 additions & 8 deletions docs/Project.toml

This file was deleted.

3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ makedocs(

deploydocs(
repo = "github.com/sisl/BayesNets.jl.git",
)
)
return true
14 changes: 7 additions & 7 deletions test/test_cpds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ let
@test !parentless(cpd)
@test nparams(cpd) == 6

@test cpd(:a=>1).potential == [0.5,0.5]
@test cpd(:a=>2).potential == [1.0,0.0]
@test cpd(:a=>3).potential == [0.0,1.0]
@test cpd(:a=>1).p == [0.5,0.5]
@test cpd(:a=>2).p == [1.0,0.0]
@test cpd(:a=>3).p == [0.0,1.0]

cpd = fit(DiscreteCPD, df, :b, [:a], parental_ncategories=[3], target_ncategories=5)
@test nparams(cpd) == 15
Expand All @@ -73,10 +73,10 @@ let
@test nparams(cpd) == 4

@test isa(cpd(Assignment(:a=>1, :b=>1)), disttype(cpd))
@test cpd(Assignment(:a=>1, :b=>1)).potential == 1.0
@test cpd(Assignment(:a=>1, :b=>2)).potential == 0.0
@test cpd(Assignment(:a=>2, :b=>1)).potential == 0.5
@test cpd(Assignment(:a=>2, :b=>2)).potential == 0.5
@test cpd(Assignment(:a=>1, :b=>1)).p == 1.0
@test cpd(Assignment(:a=>1, :b=>2)).p == 0.0
@test cpd(Assignment(:a=>2, :b=>1)).p == 0.5
@test cpd(Assignment(:a=>2, :b=>2)).p == 0.5
end
end

Expand Down
4 changes: 1 addition & 3 deletions test/test_docs.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using NBInclude

let
@nbinclude(joinpath(dirname(@__DIR__), "docs", "BayesNets.ipynb"))
@test include("../docs/make.jl")
end

0 comments on commit 3021635

Please sign in to comment.