Added various docstrings notes to all rust modules

pull/68/head
Meliurwen 2 years ago
parent f7165d0345
commit 08623e28d4
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 2
      reCTBN/src/ctbn.rs
  2. 5
      reCTBN/src/network.rs
  3. 2
      reCTBN/src/parameter_learning.rs
  4. 2
      reCTBN/src/params.rs
  5. 2
      reCTBN/src/sampling.rs
  6. 2
      reCTBN/src/structure_learning.rs
  7. 2
      reCTBN/src/structure_learning/constraint_based_algorithm.rs
  8. 2
      reCTBN/src/structure_learning/hypothesis_test.rs
  9. 2
      reCTBN/src/structure_learning/score_based_algorithm.rs
  10. 2
      reCTBN/src/structure_learning/score_function.rs
  11. 2
      reCTBN/src/tools.rs

@ -1,3 +1,5 @@
//! Continuous Time Bayesian Network
use std::collections::BTreeSet;
use ndarray::prelude::*;

@ -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<usize, NetworkError>;

@ -1,3 +1,5 @@
//! Module containing methods used to learn the parameters.
use std::collections::BTreeSet;
use ndarray::prelude::*;

@ -1,3 +1,5 @@
//! Module containing methods to define different types of nodes.
use std::collections::BTreeSet;
use enum_dispatch::enum_dispatch;

@ -1,3 +1,5 @@
//! Module containing methods for the sampling.
use crate::{
network::Network,
params::{self, ParamsTrait},

@ -1,3 +1,5 @@
//! Learn the structure of the network.
pub mod constraint_based_algorithm;
pub mod hypothesis_test;
pub mod score_based_algorithm;

@ -1,3 +1,5 @@
//! Module containing constraint based algorithms like CTPC and Hiton.
//pub struct CTPC {
//
//}

@ -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};

@ -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;

@ -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::*;

@ -1,3 +1,5 @@
//! Contains commonly used methods used across the crate.
use ndarray::prelude::*;
use crate::sampling::{ForwardSampler, Sampler};

Loading…
Cancel
Save