Package csb :: Package statistics :: Module maxent :: Class MaxentModel
[frames] | no frames]

Class MaxentModel

source code

         object --+        
                  |        
pdf.AbstractDensity --+    
                      |    
        pdf.BaseDensity --+
                          |
                         MaxentModel

Fourier expansion of a biangular log-probability density

Nested Classes

Inherited from pdf.AbstractDensity: __metaclass__

Instance Methods
 
__init__(self, n, beta=1.0)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
calculate_statistics(self, data)
Calculate the sufficient statistics for the data.
source code
 
energy(self, x, y=None)
Return the energy at positions (x,y).
source code
 
entropy(self, n=500)
Calculate the entropy of the model.
source code
 
get(self)
Return current expansion coefficients.
source code
 
load(self, aa, f_name)
Load set of expansion coefficients from isd+.
source code
 
load_old(self, aa, f_name)
Load set of expansion coefficients from isd.
source code
array
log_prob(self, x, y)
Return the energy at positions (x,y).
source code
 
log_z(self, n=500, integration='simpson')
Calculate the log partion function.
source code
 
normalize(self, normalize_full=True)
Remove parameter, which do not have any influence on the model and compute the partition function.
source code
 
prob(self, x, y)
Return the probability of the configurations x cross y.
source code
 
sample_weights(self)
Create a random set of expansion coefficients.
source code
 
set(self, coef)
Set the fourier expansion coefficients and calculations the new partation function.
source code
 
z(self)
Calculate the partion function .
source code

Inherited from pdf.AbstractDensity: __call__, __getitem__, __setitem__, __str__, estimate, evaluate, get_params, random, set_params

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables
  __abstractmethods__ = frozenset([])
Properties
float beta
Inverse temperature
int n
Order of the fourier expansion

Inherited from pdf.AbstractDensity: estimator, parameters

Inherited from object: __class__

Method Details

__init__(self, n, beta=1.0)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • n (int) - order of the fourier expansion
  • beta (float) - inverse temperature
Overrides: object.__init__

energy(self, x, y=None)

source code 

Return the energy at positions (x,y).

Parameters:
  • x (array-like) - x-coordinates for evaluation
  • y (array-like) - y-coordinates for evaluation

entropy(self, n=500)

source code 

Calculate the entropy of the model.

Parameters:
  • n (integer) - number of integration points for numerical integration

load(self, aa, f_name)

source code 

Load set of expansion coefficients from isd+.

Parameters:
  • aa - Amino acid type
  • f_name - File containing ramachandran definition

load_old(self, aa, f_name)

source code 

Load set of expansion coefficients from isd.

Parameters:
  • aa - Amino acid type
  • f_name - File containing ramachandran definition

log_prob(self, x, y)

source code 

Return the energy at positions (x,y).

Parameters:
  • x (array-like) - x-coordinates for evaluation
  • y (array-like) - y-coordinates for evaluation
Returns: array
Overrides: pdf.AbstractDensity.log_prob

normalize(self, normalize_full=True)

source code 

Remove parameter, which do not have any influence on the model and compute the partition function.

Parameters:
  • normalize_full (boolean) - compute partition function

set(self, coef)

source code 

Set the fourier expansion coefficients and calculations the new partation function.

Parameters:
  • coef (array like, with shape (4,n,n)) - expansion coefficents

Property Details

beta

Inverse temperature

Get Method:
unreachable.beta(self) - Inverse temperature
Type:
float

n

Order of the fourier expansion

Get Method:
unreachable.n(self) - Order of the fourier expansion
Type:
int