diff --git a/grainlearning/dynamic_systems.py b/grainlearning/dynamic_systems.py index c5ad339..0e9e3e8 100644 --- a/grainlearning/dynamic_systems.py +++ b/grainlearning/dynamic_systems.py @@ -179,7 +179,7 @@ def __init__( #### Uncertainty #### self.sigma_min = 1.0e-6 - + self.sigma_max = sigma_max self.sigma_tol = sigma_tol @@ -383,7 +383,7 @@ class IODynamicSystem(DynamicSystem): :param inv_obs_weight: Inverse of the observation weight, defaults to None, optional :param param_data: Parameter data, defaults to None, optional :param sim_data: Simulation data, defaults to None, optional - :param sim_data_files: List pf simulation data files (num_samples), defaults to None, optional + :param sim_data_files: List of simulation data files (num_samples), defaults to None, optional """ def __init__( @@ -428,7 +428,7 @@ def __init__( param_names ) # TODO: reuse initialization from base class - + ##### Parameters ##### self.num_params = len(param_names) diff --git a/grainlearning/inference.py b/grainlearning/inference.py index 69a0a90..ab2b0c2 100644 --- a/grainlearning/inference.py +++ b/grainlearning/inference.py @@ -66,8 +66,6 @@ def __init__( self.ess = None - - @classmethod def from_dict(cls: Type["SMC"], obj: dict): """Initialize the class using a dictionary style diff --git a/grainlearning/sampling.py b/grainlearning/sampling.py index 09d2d0b..0c05edd 100644 --- a/grainlearning/sampling.py +++ b/grainlearning/sampling.py @@ -91,14 +91,14 @@ class GaussianMixtureModel: def __init__( self, - max_num_components=0, - weight_concentration_prior: float = 0.2, + max_num_components = 0, + weight_concentration_prior: float = 0.0, covariance_type: str = "tied", n_init: int = 1, tol: float = 1.0e-5, max_iter: int = 100, random_state: int = None, - init_params: str = "kmeans", + init_params: str = "k-means++", warm_start: bool = False, expand_factor: int = 10, slice_sampling: bool = False, @@ -106,7 +106,7 @@ def __init__( """ Initialize the Gaussian Mixture Model class""" self.max_num_components = max_num_components - if weight_concentration_prior is None: + if not weight_concentration_prior: self.weight_concentration_prior = 1.0 / max_num_components else: self.weight_concentration_prior = weight_concentration_prior