Ejemplo n.º 1
0
    def __init__(self, name, a, d, mu_r, mu_v, delta_r, delta_v):
        self.name = name
        self.a = a
        self.d = d

        self.mu_r = mu_r
        self.mu_v = mu_v

        self.delta_r = delta_r
        self.delta_v = delta_v

        self.log_pi_r = self._get_log_mix_wts(delta_r)
        self.log_pi_v = self._get_log_mix_wts(delta_v)

        self._log_bin_norm_const = [u.log_bin_coeff(self.d[tp], self.a[tp]) for tp in arange(len(self.a))]
Ejemplo n.º 2
0
	def __init__(self, name, id, a, d, mu_r=0, mu_v=0):
		self.name = name # SSM name, blank for CNV
		self.id = id
		self.a = a
		self.d = d
		self.mu_r = mu_r # 1-p_error
		self.mu_v = mu_v
		self._log_bin_norm_const = [u.log_bin_coeff(self.d[tp], self.a[tp]) for tp in arange(len(self.a))]

		## all variables below are used by cnv related computations
		self.nr = 0
		self.nv = 0
		self.node = None # this is the node where the datum resides
		self.cnv = [] # for SSM, this is [(cnv,cp,cm)]
		
		self.tssb = None # this is just a pointer to tssb (tree object), gets initialized in evolve.py
Ejemplo n.º 3
0
	def __init__(self, name, id, a, d, mu_r=0, mu_v=0):
		self.name = name # SSM name, blank for CNV
		self.id = id
		self.a = a
		self.d = d
		self.mu_r = mu_r # 1-p_error
		self.mu_v = mu_v
		self._log_bin_norm_const = [u.log_bin_coeff(self.d[tp], self.a[tp]) for tp in arange(len(self.a))]

		## all variables below are used by cnv related computations
		self.nr = 0
		self.nv = 0
		self.node = None # this is the node where the datum resides
		self.cnv = [] # for SSM, this is [(cnv,cp,cm)]
		
		self.tssb = None # this is just a pointer to tssb (tree object), gets initialized in evolve.py
Ejemplo n.º 4
0
	def __init__(self, name,id,a, d, mu_r, mu_v, delta_r, delta_v):
		self.name = name; self.id=id;
		self.a=a
		self.d=d
			
		self.mu_r=mu_r
		self.mu_v=mu_v
		
		self.delta_r = delta_r
		self.delta_v = delta_v
		
		self.log_pi_r = self._get_log_mix_wts(delta_r)
		self.log_pi_v = self._get_log_mix_wts(delta_v)
		
		self._log_bin_norm_const = [u.log_bin_coeff(self.d[tp], self.a[tp]) for tp in arange(len(self.a))]		
		
		self.pairs = [(mu_r,mu_v,log_pi_r+log_pi_v) for mu_r, log_pi_r in zip(self.mu_r, self.log_pi_r) for mu_v, log_pi_v in zip(self.mu_v, self.log_pi_v)]
Ejemplo n.º 5
0
    def __init__(self, name, a, d, mu_r, mu_v, delta_r, delta_v):
        self.name = name
        self.a = a
        self.d = d

        self.mu_r = mu_r
        self.mu_v = mu_v

        self.delta_r = delta_r
        self.delta_v = delta_v

        self.log_pi_r = self._get_log_mix_wts(delta_r)
        self.log_pi_v = self._get_log_mix_wts(delta_v)

        self._log_bin_norm_const = [
            u.log_bin_coeff(self.d[tp], self.a[tp])
            for tp in arange(len(self.a))
        ]
Ejemplo n.º 6
0
    def __init__(self, name, id, a, d, mu_r, mu_v, delta_r, delta_v):
        self.name = name
        self.id = id
        self.a = a
        self.d = d

        self.mu_r = mu_r
        self.mu_v = mu_v

        self.delta_r = delta_r
        self.delta_v = delta_v

        self.log_pi_r = self._get_log_mix_wts(delta_r)
        self.log_pi_v = self._get_log_mix_wts(delta_v)

        self._log_bin_norm_const = [
            u.log_bin_coeff(self.d[tp], self.a[tp])
            for tp in arange(len(self.a))
        ]

        self.pairs = [(mu_r, mu_v, log_pi_r + log_pi_v)
                      for mu_r, log_pi_r in zip(self.mu_r, self.log_pi_r)
                      for mu_v, log_pi_v in zip(self.mu_v, self.log_pi_v)]