-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove input nodes and add volatility couplings
- Loading branch information
1 parent
0fd0346
commit d2e3a55
Showing
7 changed files
with
103 additions
and
75 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,13 +1,13 @@ | ||
[package] | ||
name = "hgf" | ||
name = "rshgf" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
[lib] | ||
name = "hgf" | ||
name = "rshgf" | ||
crate-type = ["cdylib"] | ||
path = "src/lib.rs" # The source file of the target. | ||
|
||
[dependencies] | ||
pyo3 = { version = "0.22.4", features = ["extension-module"] } | ||
pyo3 = { version = "0.22.5", features = ["extension-module"] } |
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 |
---|---|---|
@@ -1,9 +0,0 @@ | ||
use crate::network::ExponentialNode; | ||
use crate::math::sufficient_statistics; | ||
|
||
pub fn posterior_update_exponential(node: &mut ExponentialNode) { | ||
let suf_stats = sufficient_statistics(&node.observation); | ||
for i in 0..suf_stats.len() { | ||
node.xis[i] = node.xis[i] + (1.0 / (1.0 + node.nus)) * (suf_stats[i] - node.xis[i]); | ||
} | ||
} | ||
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,9 @@ | ||
use crate::network::ExponentialFamiliyStateNode; | ||
use crate::math::sufficient_statistics; | ||
|
||
pub fn posterior_update_exponential(node: &mut ExponentialFamiliyStateNode) { | ||
let suf_stats = sufficient_statistics(&node.mean); | ||
for i in 0..suf_stats.len() { | ||
node.xis[i] = node.xis[i] + (1.0 / (1.0 + node.nus)) * (suf_stats[i] - node.xis[i]); | ||
} | ||
} |
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 +1,2 @@ | ||
pub mod continuous; | ||
pub mod continuous; | ||
pub mod exponential; |
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