parent
d6e93b351c
commit
780515707c
@ -1,12 +1,11 @@ |
||||
pub mod score_function; |
||||
pub mod score_based_algorithm; |
||||
pub mod constraint_based_algorithm; |
||||
pub mod hypothesis_test; |
||||
use crate::network; |
||||
use crate::tools; |
||||
pub mod score_based_algorithm; |
||||
pub mod score_function; |
||||
use crate::{network, tools}; |
||||
|
||||
pub trait StructureLearningAlgorithm { |
||||
fn fit_transform<T, >(&self, net: T, dataset: &tools::Dataset) -> T |
||||
fn fit_transform<T>(&self, net: T, dataset: &tools::Dataset) -> T |
||||
where |
||||
T: network::Network; |
||||
} |
||||
|
@ -1,12 +1,19 @@ |
||||
use reCTBN::params; |
||||
use std::collections::BTreeSet; |
||||
|
||||
use reCTBN::params; |
||||
|
||||
#[allow(dead_code)] |
||||
pub fn generate_discrete_time_continous_node(label: String, cardinality: usize) -> params::Params { |
||||
params::Params::DiscreteStatesContinousTime(generate_discrete_time_continous_params(label, cardinality)) |
||||
params::Params::DiscreteStatesContinousTime(generate_discrete_time_continous_params( |
||||
label, |
||||
cardinality, |
||||
)) |
||||
} |
||||
|
||||
pub fn generate_discrete_time_continous_params(label: String, cardinality: usize) -> params::DiscreteStatesContinousTimeParams{ |
||||
pub fn generate_discrete_time_continous_params( |
||||
label: String, |
||||
cardinality: usize, |
||||
) -> params::DiscreteStatesContinousTimeParams { |
||||
let domain: BTreeSet<String> = (0..cardinality).map(|x| x.to_string()).collect(); |
||||
params::DiscreteStatesContinousTimeParams::new(label, domain) |
||||
} |
||||
|
Loading…
Reference in new issue