Skip to content

Commit 71bbe7e

Browse files
transferred some properties between glm models and estimators
1 parent 9fce111 commit 71bbe7e

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

batchglm/models/base/estimator.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ def fisher_inv(self):
6565
def x(self) -> np.ndarray:
6666
return self.input_data.x
6767

68+
@property
69+
def a_var(self):
70+
return self.model.a_var
71+
72+
@property
73+
def b_var(self) -> np.ndarray:
74+
return self.model.b_var
75+
6876
@abc.abstractmethod
6977
def initialize(self, **kwargs):
7078
"""

batchglm/models/base_glm/estimator.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ class _EstimatorGLM(_EstimatorBase, metaclass=abc.ABCMeta):
1717
"""
1818
model: _ModelGLM
1919
input_data: InputDataGLM
20-
_hessian: np.ndarray
21-
_fim: np.ndarray
22-
_a_var: np.ndarray
23-
_b_var: np.ndarray
2420

2521
def __init__(
2622
self,

batchglm/train/tf/base_glm_all/estimator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,11 +338,11 @@ def finalize(self):
338338
self.model = self.get_model_container(self.input_data)
339339
self.model._a_var = a_var
340340
self.model._b_var = b_var
341-
self.model._fisher_inv = fisher_inv
342-
self.model._hessians = hessians
343-
self.model._jacobian = jacobian
344-
self.model._log_likelihood = log_likelihood
345-
self.model._loss = loss
341+
self._fisher_inv = fisher_inv
342+
self._hessians = hessians
343+
self._jacobian = jacobian
344+
self._log_likelihood = log_likelihood
345+
self._loss = loss
346346

347347
@abc.abstractmethod
348348
def get_model_container(

0 commit comments

Comments
 (0)