mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-24 14:15:14 +02:00
Nparam_transformed work better now
Before, counted the number of fixes, which failed when a fix fixed more than one parameter...
This commit is contained in:
parent
698f52e5e3
commit
8bd017466d
1 changed files with 12 additions and 4 deletions
|
|
@ -103,10 +103,18 @@ class parameterised(object):
|
||||||
return expr
|
return expr
|
||||||
|
|
||||||
def Nparam_transformed(self):
|
def Nparam_transformed(self):
|
||||||
ties = 0
|
"""
|
||||||
for ar in self.tied_indices:
|
Compute the number of parameters after ties and fixing have been performed
|
||||||
ties += ar.size - 1
|
"""
|
||||||
return self.Nparam - len(self.constrained_fixed_indices) - ties
|
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
|
||||||
|
|
||||||
def constrain_positive(self, which):
|
def constrain_positive(self, which):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue