bayesml package#
Subpackages#
- bayesml.autoregressive package
- bayesml.bernoulli package
- bayesml.categorical package
- bayesml.contexttree package
- bayesml.exponential package
- bayesml.gaussianmixture package
- bayesml.hiddenmarkovnormal package
- bayesml.linearregression package
- bayesml.metatree package
- bayesml.multivariate_normal package
- bayesml.normal package
- bayesml.poisson package
Submodules#
bayesml.base module#
- class bayesml.base.Generative#
Bases:
object
Methods
load_h_params
(filename)Load the hyperparameters to h_params.
load_params
(filename)Load the parameters saved by
save_params
.save_h_params
(filename)Save the hyperparameters using python
pickle
module.save_params
(filename)Save the parameters using python
pickle
module.gen_params
gen_sample
get_h_params
get_params
save_sample
set_h_params
set_params
visualize_model
- abstract set_h_params()#
- abstract get_h_params()#
- save_h_params(filename)#
Save the hyperparameters using python
pickle
module.They are saved as a python dictionary obtained by
GenModel.get_h_params()
.- Parameters:
- filenamestr
The filename (including a extention like .pkl) to which the hyperparameters are saved.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- load_h_params(filename)#
Load the hyperparameters to h_params.
- Parameters:
- filenamestr
The filename (including a extention like .pkl) to be loaded. It must be a pickled python dictionary obtained by
GenModel.save_h_params()
,LearnModel.save_h0_params()
orLearnModel.save_hn_params()
.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- abstract gen_params()#
- abstract set_params()#
- abstract get_params()#
- save_params(filename)#
Save the parameters using python
pickle
module.They are saved as a pickled python dictionary obtained by
GenModel.get_params()
.- Parameters:
- filenamestr
The filename (including a extention like .pkl) to which the parameters are saved.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- load_params(filename)#
Load the parameters saved by
save_params
.- Parameters:
- filenamestr
The filename (including a extention like .pkl) to be loaded. It must be a pickled python dictionary obtained by
GenModel.save_params()
.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- abstract gen_sample()#
- abstract save_sample()#
- abstract visualize_model()#
- class bayesml.base.Posterior#
Bases:
object
Methods
load_h0_params
(filename)Load the hyperparameters to h0_params.
load_hn_params
(filename)Load the hyperparameters to hn_params.
Overwrite the initial values of the hyperparameters of the posterior distribution by the learned values.
Reset the hyperparameters of the posterior distribution to their initial values.
save_h0_params
(filename)Save the hyperparameters using python
pickle
module.save_hn_params
(filename)Save the hyperparameters using python
pickle
module.estimate_params
get_h0_params
get_hn_params
set_h0_params
set_hn_params
update_posterior
visualize_posterior
- abstract set_h0_params()#
- abstract get_h0_params()#
- save_h0_params(filename)#
Save the hyperparameters using python
pickle
module.They are saved as a pickled python dictionary obtained by
LearnModel.get_h0_params()
.- Parameters:
- filenamestr
The filename (including a extention like .pkl) to which the hyperparameters are saved.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- load_h0_params(filename)#
Load the hyperparameters to h0_params.
- Parameters:
- filenamestr
The filename (including a extention like .pkl) to be loaded. It must be a pickled python dictionary obtained by
GenModel.save_h_params()
,LearnModel.save_h0_params()
orLearnModel.save_hn_params()
.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- abstract set_hn_params()#
- abstract get_hn_params()#
- save_hn_params(filename)#
Save the hyperparameters using python
pickle
module.They are saved as a pickled python dictionary obtained by
LearnModel.get_hn_params()
.- Parameters:
- filenamestr
The filename (including a extention like .pkl) to which the hyperparameters are saved.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- load_hn_params(filename)#
Load the hyperparameters to hn_params.
- Parameters:
- filenamestr
The filename (including a extention like .pkl) to be loaded. It must be a pickled python dictionary obtained by
GenModel.save_h_params()
,LearnModel.save_h0_params()
orLearnModel.save_hn_params()
.
Warning
The
pickle
module is not secure. Only unpickle data you trust.See also
- reset_hn_params()#
Reset the hyperparameters of the posterior distribution to their initial values.
They are reset to the output of self.get_h0_params(). Note that the parameters of the predictive distribution are also calculated from them.
- overwrite_h0_params()#
Overwrite the initial values of the hyperparameters of the posterior distribution by the learned values.
They are overwitten by the output of self.get_hn_params(). Note that the parameters of the predictive distribution are also calculated from them.
- abstract update_posterior()#
- abstract estimate_params()#
- abstract visualize_posterior()#