diff --git a/reCTBN/src/ctbn.rs b/reCTBN/src/ctbn.rs index fae7f4d..2b01d14 100644 --- a/reCTBN/src/ctbn.rs +++ b/reCTBN/src/ctbn.rs @@ -1,3 +1,5 @@ +//! Continuous Time Bayesian Network + use std::collections::BTreeSet; use ndarray::prelude::*; diff --git a/reCTBN/src/network.rs b/reCTBN/src/network.rs index 8fc8271..fbdd2e6 100644 --- a/reCTBN/src/network.rs +++ b/reCTBN/src/network.rs @@ -1,3 +1,5 @@ +//! Defines methods for dealing with Probabilistic Graphical Models like the CTBNs + use std::collections::BTreeSet; use thiserror::Error; @@ -11,7 +13,8 @@ pub enum NetworkError { NodeInsertionError(String), } -/// It defines the required methods for a structure used as a PGM (such as a CTBN). +/// It defines the required methods for a structure used as a Probabilistic Graphical Models (such +/// as a CTBN). pub trait Network { fn initialize_adj_matrix(&mut self); fn add_node(&mut self, n: params::Params) -> Result; diff --git a/reCTBN/src/parameter_learning.rs b/reCTBN/src/parameter_learning.rs index bdb5d4a..61d4dca 100644 --- a/reCTBN/src/parameter_learning.rs +++ b/reCTBN/src/parameter_learning.rs @@ -1,3 +1,5 @@ +//! Module containing methods used to learn the parameters. + use std::collections::BTreeSet; use ndarray::prelude::*; diff --git a/reCTBN/src/params.rs b/reCTBN/src/params.rs index e533f21..070c997 100644 --- a/reCTBN/src/params.rs +++ b/reCTBN/src/params.rs @@ -1,3 +1,5 @@ +//! Module containing methods to define different types of nodes. + use std::collections::BTreeSet; use enum_dispatch::enum_dispatch; diff --git a/reCTBN/src/sampling.rs b/reCTBN/src/sampling.rs index 0660939..d435634 100644 --- a/reCTBN/src/sampling.rs +++ b/reCTBN/src/sampling.rs @@ -1,3 +1,5 @@ +//! Module containing methods for the sampling. + use crate::{ network::Network, params::{self, ParamsTrait}, diff --git a/reCTBN/src/structure_learning.rs b/reCTBN/src/structure_learning.rs index 8b90cdf..57fed1e 100644 --- a/reCTBN/src/structure_learning.rs +++ b/reCTBN/src/structure_learning.rs @@ -1,3 +1,5 @@ +//! Learn the structure of the network. + pub mod constraint_based_algorithm; pub mod hypothesis_test; pub mod score_based_algorithm; diff --git a/reCTBN/src/structure_learning/constraint_based_algorithm.rs b/reCTBN/src/structure_learning/constraint_based_algorithm.rs index b3fc3e1..670c8ed 100644 --- a/reCTBN/src/structure_learning/constraint_based_algorithm.rs +++ b/reCTBN/src/structure_learning/constraint_based_algorithm.rs @@ -1,3 +1,5 @@ +//! Module containing constraint based algorithms like CTPC and Hiton. + //pub struct CTPC { // //} diff --git a/reCTBN/src/structure_learning/hypothesis_test.rs b/reCTBN/src/structure_learning/hypothesis_test.rs index 7083d38..1404b8e 100644 --- a/reCTBN/src/structure_learning/hypothesis_test.rs +++ b/reCTBN/src/structure_learning/hypothesis_test.rs @@ -1,3 +1,5 @@ +//! Module containing an hypothesis test for constraint based algorithms like chi-squared test, F test, etc... + use std::collections::BTreeSet; use ndarray::{Array3, Axis}; diff --git a/reCTBN/src/structure_learning/score_based_algorithm.rs b/reCTBN/src/structure_learning/score_based_algorithm.rs index cc8541a..9e329eb 100644 --- a/reCTBN/src/structure_learning/score_based_algorithm.rs +++ b/reCTBN/src/structure_learning/score_based_algorithm.rs @@ -1,3 +1,5 @@ +//! Module containing score based algorithms like Hill Climbing and Tabu Search. + use std::collections::BTreeSet; use crate::structure_learning::score_function::ScoreFunction; diff --git a/reCTBN/src/structure_learning/score_function.rs b/reCTBN/src/structure_learning/score_function.rs index b3b1597..cb6ad7b 100644 --- a/reCTBN/src/structure_learning/score_function.rs +++ b/reCTBN/src/structure_learning/score_function.rs @@ -1,3 +1,5 @@ +//! Module for score based algorithms containing score functions algorithms like Log Likelihood, BIC, etc... + use std::collections::BTreeSet; use ndarray::prelude::*; diff --git a/reCTBN/src/tools.rs b/reCTBN/src/tools.rs index 70bbf76..aa48883 100644 --- a/reCTBN/src/tools.rs +++ b/reCTBN/src/tools.rs @@ -1,3 +1,5 @@ +//! Contains commonly used methods used across the crate. + use ndarray::prelude::*; use crate::sampling::{ForwardSampler, Sampler};