Revert "merge devel mrd"

This reverts commit 3f625a9347, reversing
changes made to dc6faeb303.
This commit is contained in:
Max Zwiessele 2013-04-23 14:02:15 +01:00
parent 3f625a9347
commit 0c8b83454f
8 changed files with 61 additions and 202 deletions

View file

@ -13,7 +13,6 @@ import priors
from ..util.linalg import jitchol
from ..inference import optimization
from .. import likelihoods
import re
class model(parameterised):
def __init__(self):
@ -240,7 +239,7 @@ class model(parameterised):
for s in positive_strings:
for i in self.grep_param_names(s):
if not (i in currently_constrained):
to_make_positive.append(re.escape(param_names[i]))
to_make_positive.append(param_names[i])
if warn:
print "Warning! constraining %s postive"%name
if len(to_make_positive):

View file

@ -103,18 +103,10 @@ class parameterised(object):
return expr
def Nparam_transformed(self):
"""
Compute the number of parameters after ties and fixing have been performed
"""
ties = 0
for ti in self.tied_indices:
ties += ti.size - 1
fixes = 0
for fi in self.constrained_fixed_indices:
fixes += len(fi)
return self.Nparam - fixes - ties
ties = 0
for ar in self.tied_indices:
ties += ar.size - 1
return self.Nparam - len(self.constrained_fixed_indices) - ties
def constrain_positive(self, which):
"""