summaryrefslogtreecommitdiffstats
path: root/experiments
diff options
context:
space:
mode:
Diffstat (limited to 'experiments')
-rw-r--r--experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.obin288600 -> 256828 bytes
-rw-r--r--experiments/ml.pyx3
-rw-r--r--experiments/ml2.pyx24
-rw-r--r--experiments/ml3.c1306
-rw-r--r--experiments/ml3.pyx22
-rwxr-xr-xexperiments/ml3.sobin110580 -> 97868 bytes
-rw-r--r--experiments/out.log1200
-rw-r--r--experiments/process.py8
8 files changed, 1534 insertions, 1029 deletions
diff --git a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o b/experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o
index 805ea03..445b01b 100644
--- a/experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o
+++ b/experiments/build/temp.macosx-10.6-x86_64-2.7/ml3.o
Binary files differ
diff --git a/experiments/ml.pyx b/experiments/ml.pyx
index 5016347..785986c 100644
--- a/experiments/ml.pyx
+++ b/experiments/ml.pyx
@@ -6,9 +6,6 @@ from libc.math cimport log, exp
DTYPE = np.float64
ctypedef np.float_t DTYPE_t
-cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta):
- return 1./(1. + exp(-weight/delta))
-
cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta,
DTYPE_t w1, DTYPE_t w2, DTYPE_t w3):
"""weight for successful infection, exponential time model"""
diff --git a/experiments/ml2.pyx b/experiments/ml2.pyx
index 95f6f34..fb2ec0d 100644
--- a/experiments/ml2.pyx
+++ b/experiments/ml2.pyx
@@ -6,20 +6,17 @@ from libc.math cimport log, exp
DTYPE = np.float64
ctypedef np.float_t DTYPE_t
-cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta):
- return 1./(1. + exp(-weight/delta))
-
cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta,
DTYPE_t w1, DTYPE_t w2, DTYPE_t w3):
"""weight for successful infection, exponential time model"""
cdef DTYPE_t structural, temporal, result
- structural = dist * log(delta)
- # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta)
+ # structural = delta ** dist
+ structural = delta/(1. + exp(-w1*lmbda) + exp(-w2*lmbda) + exp(-w3*lmbda))
temporal = log(exp(alpha)-1.) - alpha*dt
# temporal = 1 - exp(-alpha*dt)
# if exp(-alpha*dt)==0.: print 'UNDERFLOW ERROR'
# temporal = 1. / (1. + (dt - 1.)/alpha)**0.01 - 1. / (1. + dt/alpha)**0.01
- result = structural + temporal
+ result = log(structural) + temporal
# print 'st', structural, temporal
return result
@@ -27,8 +24,8 @@ cdef DTYPE_t weight_failure(int dist, int dt, DTYPE_t alpha, DTYPE_t delta,
DTYPE_t w1, DTYPE_t w2, DTYPE_t w3):
"""weight for failed infection, exponential time model"""
cdef DTYPE_t structural, temporal, result
- structural = delta ** dist
- # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta)
+ # structural = delta ** dist
+ structural = delta/(1. + exp(-w1/lmbda) + exp(-w2/lmbda) + exp(-w3/lmbda))
temporal = exp(-alpha * dt)
# temporal = 1. - 1. / (1. + dt/alpha)**0.01
result = log(1. - structural + structural * temporal)
@@ -40,7 +37,7 @@ def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age,
print 'ML2'
cdef:
int n_roots, n_victims, roots, i, dist, dt, t, l
- DTYPE_t beta, ll
+ DTYPE_t ll
list parents, failures, successes
n_roots, n_victims = len(root_victims), len(victims)
cdef:
@@ -80,20 +77,13 @@ def ml2(dict root_victims, dict victims, dict non_victims, DTYPE_t age,
for (dist, dt, w1, w2, w3) in parents]
probs_nv[i] = sum(failures)
- # print successes
- # print failures
- # print probs
-
# calculate log likelihood
- # probs.sort(); probs = probs[::-1] # sort probs in descending order
- # cdef:
- # np.ndarray[DTYPE_t] cums = probs.cumsum()
ll = probs_fail.sum() # add probability that all edges to victims fail
ll += probs_nv.sum() # add probability that all edges to non_victims fail
ll += probs.sum() # add probability for realized edges and subtract probability these edges fail
roots = n_roots
- beta = 0
+ beta = float('nan')
# print n_nodes, n_roots, n_victims, max_i, roots
print parent_dists[1:100]
print parent_dts[1:100]
diff --git a/experiments/ml3.c b/experiments/ml3.c
index 64796d7..90842d8 100644
--- a/experiments/ml3.c
+++ b/experiments/ml3.c
@@ -1177,11 +1177,10 @@ int __pyx_module_is_main_ml3 = 0;
/* Implementation of 'ml3' */
static PyObject *__pyx_builtin_enumerate;
-static PyObject *__pyx_builtin_sum;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_RuntimeError;
-static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_root_victims, PyObject *__pyx_v_victims, PyObject *__pyx_v_non_victims, CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_age, __pyx_t_3ml3_DTYPE_t __pyx_v_alpha, __pyx_t_3ml3_DTYPE_t __pyx_v_delta); /* proto */
+static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_root_victims, PyObject *__pyx_v_victims, CYTHON_UNUSED PyObject *__pyx_v_non_victims, CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_age, __pyx_t_3ml3_DTYPE_t __pyx_v_alpha, __pyx_t_3ml3_DTYPE_t __pyx_v_delta); /* proto */
static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
static char __pyx_k_B[] = "B";
@@ -1233,14 +1232,12 @@ static char __pyx_k_arange[] = "arange";
static char __pyx_k_import[] = "__import__";
static char __pyx_k_thresh[] = "thresh";
static char __pyx_k_float64[] = "float64";
-static char __pyx_k_n_nodes[] = "n_nodes";
static char __pyx_k_n_roots[] = "n_roots";
static char __pyx_k_parents[] = "parents";
static char __pyx_k_victims[] = "victims";
static char __pyx_k_beta_add[] = "beta_add";
static char __pyx_k_failures[] = "failures";
static char __pyx_k_max_beta[] = "max_beta";
-static char __pyx_k_probs_nv[] = "probs_nv";
static char __pyx_k_enumerate[] = "enumerate";
static char __pyx_k_max_roots[] = "max_roots";
static char __pyx_k_n_victims[] = "n_victims";
@@ -1293,7 +1290,6 @@ static PyObject *__pyx_n_s_max_beta;
static PyObject *__pyx_n_s_max_beta_add;
static PyObject *__pyx_n_s_max_roots;
static PyObject *__pyx_n_s_ml3;
-static PyObject *__pyx_n_s_n_nodes;
static PyObject *__pyx_n_s_n_roots;
static PyObject *__pyx_n_s_n_victims;
static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
@@ -1307,7 +1303,6 @@ static PyObject *__pyx_n_s_parents;
static PyObject *__pyx_n_s_prob;
static PyObject *__pyx_n_s_probs;
static PyObject *__pyx_n_s_probs_fail;
-static PyObject *__pyx_n_s_probs_nv;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_root_victims;
static PyObject *__pyx_n_s_roots;
@@ -1323,9 +1318,9 @@ static PyObject *__pyx_n_s_w1;
static PyObject *__pyx_n_s_w2;
static PyObject *__pyx_n_s_w3;
static PyObject *__pyx_n_s_zeros;
+static PyObject *__pyx_float__1;
static PyObject *__pyx_float_1_;
-static PyObject *__pyx_float__05;
-static PyObject *__pyx_float_0_09;
+static PyObject *__pyx_float_0_1;
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
@@ -1450,7 +1445,7 @@ static __pyx_t_3ml3_DTYPE_t __pyx_f_3ml3_weight_success(int __pyx_v_dist, int __
static __pyx_t_3ml3_DTYPE_t __pyx_f_3ml3_weight_failure(int __pyx_v_dist, int __pyx_v_dt, __pyx_t_3ml3_DTYPE_t __pyx_v_alpha, __pyx_t_3ml3_DTYPE_t __pyx_v_delta, CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_w1, CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_w2, CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_w3) {
__pyx_t_3ml3_DTYPE_t __pyx_v_structural;
- __pyx_t_3ml3_DTYPE_t __pyx_v_temporal;
+ CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_temporal;
__pyx_t_3ml3_DTYPE_t __pyx_v_result;
__pyx_t_3ml3_DTYPE_t __pyx_r;
__Pyx_RefNannyDeclarations
@@ -1470,21 +1465,21 @@ static __pyx_t_3ml3_DTYPE_t __pyx_f_3ml3_weight_failure(int __pyx_v_dist, int __
* # structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta)
* temporal = exp(-alpha * dt) # <<<<<<<<<<<<<<
* # temporal = 1. - 1. / (1. + dt/alpha)**0.01
- * result = log(1. - structural + structural * temporal)
+ * result = log(1. - structural)
*/
__pyx_v_temporal = exp(((-__pyx_v_alpha) * __pyx_v_dt));
/* "ml3.pyx":35
* temporal = exp(-alpha * dt)
* # temporal = 1. - 1. / (1. + dt/alpha)**0.01
- * result = log(1. - structural + structural * temporal) # <<<<<<<<<<<<<<
+ * result = log(1. - structural) # <<<<<<<<<<<<<<
* # print 'stnv', structural, temporal
* return result
*/
- __pyx_v_result = log(((1. - __pyx_v_structural) + (__pyx_v_structural * __pyx_v_temporal)));
+ __pyx_v_result = log((1. - __pyx_v_structural));
/* "ml3.pyx":37
- * result = log(1. - structural + structural * temporal)
+ * result = log(1. - structural)
* # print 'stnv', structural, temporal
* return result # <<<<<<<<<<<<<<
*
@@ -1521,7 +1516,7 @@ static PyMethodDef __pyx_mdef_3ml3_1ml3 = {"ml3", (PyCFunction)__pyx_pw_3ml3_1ml
static PyObject *__pyx_pw_3ml3_1ml3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
PyObject *__pyx_v_root_victims = 0;
PyObject *__pyx_v_victims = 0;
- PyObject *__pyx_v_non_victims = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_non_victims = 0;
CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_age;
__pyx_t_3ml3_DTYPE_t __pyx_v_alpha;
__pyx_t_3ml3_DTYPE_t __pyx_v_delta;
@@ -1620,10 +1615,9 @@ static PyObject *__pyx_pw_3ml3_1ml3(PyObject *__pyx_self, PyObject *__pyx_args,
return __pyx_r;
}
-static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_root_victims, PyObject *__pyx_v_victims, PyObject *__pyx_v_non_victims, CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_age, __pyx_t_3ml3_DTYPE_t __pyx_v_alpha, __pyx_t_3ml3_DTYPE_t __pyx_v_delta) {
+static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_root_victims, PyObject *__pyx_v_victims, CYTHON_UNUSED PyObject *__pyx_v_non_victims, CYTHON_UNUSED __pyx_t_3ml3_DTYPE_t __pyx_v_age, __pyx_t_3ml3_DTYPE_t __pyx_v_alpha, __pyx_t_3ml3_DTYPE_t __pyx_v_delta) {
int __pyx_v_n_roots;
int __pyx_v_n_victims;
- CYTHON_UNUSED int __pyx_v_n_nodes;
int __pyx_v_roots;
int __pyx_v_i;
int __pyx_v_dist;
@@ -1639,7 +1633,6 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
PyObject *__pyx_v_successes = 0;
PyArrayObject *__pyx_v_probs = 0;
PyArrayObject *__pyx_v_probs_fail = 0;
- PyArrayObject *__pyx_v_probs_nv = 0;
PyArrayObject *__pyx_v_parent_dists = 0;
PyArrayObject *__pyx_v_parent_dts = 0;
PyObject *__pyx_v_dists = NULL;
@@ -1659,8 +1652,6 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
__Pyx_Buffer __pyx_pybuffer_probs;
__Pyx_LocalBuf_ND __pyx_pybuffernd_probs_fail;
__Pyx_Buffer __pyx_pybuffer_probs_fail;
- __Pyx_LocalBuf_ND __pyx_pybuffernd_probs_nv;
- __Pyx_Buffer __pyx_pybuffer_probs_nv;
PyObject *__pyx_r = NULL;
__Pyx_RefNannyDeclarations
Py_ssize_t __pyx_t_1;
@@ -1673,31 +1664,29 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
PyArrayObject *__pyx_t_8 = NULL;
PyArrayObject *__pyx_t_9 = NULL;
PyArrayObject *__pyx_t_10 = NULL;
- PyArrayObject *__pyx_t_11 = NULL;
+ int __pyx_t_11;
int __pyx_t_12;
int __pyx_t_13;
- int __pyx_t_14;
- Py_ssize_t __pyx_t_15;
+ Py_ssize_t __pyx_t_14;
+ PyObject *__pyx_t_15 = NULL;
PyObject *__pyx_t_16 = NULL;
PyObject *__pyx_t_17 = NULL;
PyObject *__pyx_t_18 = NULL;
PyObject *__pyx_t_19 = NULL;
PyObject *__pyx_t_20 = NULL;
- PyObject *__pyx_t_21 = NULL;
- PyObject *(*__pyx_t_22)(PyObject *);
- int __pyx_t_23;
+ PyObject *(*__pyx_t_21)(PyObject *);
+ int __pyx_t_22;
+ __pyx_t_3ml3_DTYPE_t __pyx_t_23;
__pyx_t_3ml3_DTYPE_t __pyx_t_24;
__pyx_t_3ml3_DTYPE_t __pyx_t_25;
- __pyx_t_3ml3_DTYPE_t __pyx_t_26;
- double __pyx_t_27;
+ double __pyx_t_26;
+ int __pyx_t_27;
int __pyx_t_28;
int __pyx_t_29;
int __pyx_t_30;
int __pyx_t_31;
int __pyx_t_32;
- int __pyx_t_33;
- int __pyx_t_34;
- PyObject *(*__pyx_t_35)(PyObject *);
+ PyObject *(*__pyx_t_33)(PyObject *);
int __pyx_lineno = 0;
const char *__pyx_filename = NULL;
int __pyx_clineno = 0;
@@ -1710,10 +1699,6 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
__pyx_pybuffer_probs_fail.refcount = 0;
__pyx_pybuffernd_probs_fail.data = NULL;
__pyx_pybuffernd_probs_fail.rcbuffer = &__pyx_pybuffer_probs_fail;
- __pyx_pybuffer_probs_nv.pybuffer.buf = NULL;
- __pyx_pybuffer_probs_nv.refcount = 0;
- __pyx_pybuffernd_probs_nv.data = NULL;
- __pyx_pybuffernd_probs_nv.rcbuffer = &__pyx_pybuffer_probs_nv;
__pyx_pybuffer_parent_dists.pybuffer.buf = NULL;
__pyx_pybuffer_parent_dists.refcount = 0;
__pyx_pybuffernd_parent_dists.data = NULL;
@@ -1727,8 +1712,8 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
* DTYPE_t beta, ll, beta_add, max_beta, max_beta_add
* list parents, failures, successes
* n_roots, n_victims = len(root_victims), len(victims) # <<<<<<<<<<<<<<
- * n_nodes = 148152
* cdef:
+ * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE)
*/
if (unlikely(__pyx_v_root_victims == Py_None)) {
PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
@@ -1743,52 +1728,43 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
__pyx_v_n_roots = __pyx_t_1;
__pyx_v_n_victims = __pyx_t_2;
- /* "ml3.pyx":46
- * list parents, failures, successes
+ /* "ml3.pyx":47
* n_roots, n_victims = len(root_victims), len(victims)
- * n_nodes = 148152 # <<<<<<<<<<<<<<
- * cdef:
- * np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE)
- */
- __pyx_v_n_nodes = 148152;
-
- /* "ml3.pyx":48
- * n_nodes = 148152
* cdef:
* np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<<
* np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE)
- * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE)
+ * np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE)
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_7 = ((PyArrayObject *)__pyx_t_6);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_probs.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_nn___pyx_t_3ml3_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
__pyx_v_probs = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf = NULL;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
} else {__pyx_pybuffernd_probs.diminfo[0].strides = __pyx_pybuffernd_probs.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_probs.diminfo[0].shape = __pyx_pybuffernd_probs.rcbuffer->pybuffer.shape[0];
}
}
@@ -1796,43 +1772,43 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
__pyx_v_probs = ((PyArrayObject *)__pyx_t_6);
__pyx_t_6 = 0;
- /* "ml3.pyx":49
+ /* "ml3.pyx":48
* cdef:
* np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE)
* np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<<
- * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE)
* np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE)
+ * np.ndarray[DTYPE_t] parent_dts = np.zeros(n_victims, dtype=DTYPE)
*/
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
__Pyx_GIVEREF(__pyx_t_6);
__pyx_t_6 = 0;
- __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_8 = ((PyArrayObject *)__pyx_t_4);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_probs_fail.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_nn___pyx_t_3ml3_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
__pyx_v_probs_fail = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.buf = NULL;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
} else {__pyx_pybuffernd_probs_fail.diminfo[0].strides = __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_probs_fail.diminfo[0].shape = __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.shape[0];
}
}
@@ -1840,183 +1816,134 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
__pyx_v_probs_fail = ((PyArrayObject *)__pyx_t_4);
__pyx_t_4 = 0;
- /* "ml3.pyx":50
+ /* "ml3.pyx":49
* np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE)
* np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE)
- * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE) # <<<<<<<<<<<<<<
- * np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE)
+ * np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<<
* np.ndarray[DTYPE_t] parent_dts = np.zeros(n_victims, dtype=DTYPE)
+ *
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (unlikely(__pyx_v_non_victims == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __pyx_t_2 = PyDict_Size(__pyx_v_non_victims); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
__Pyx_GIVEREF(__pyx_t_4);
__pyx_t_4 = 0;
- __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_9 = ((PyArrayObject *)__pyx_t_3);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_probs_nv.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_3ml3_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
- __pyx_v_probs_nv = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.buf = NULL;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- } else {__pyx_pybuffernd_probs_nv.diminfo[0].strides = __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_probs_nv.diminfo[0].shape = __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.shape[0];
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_parent_dists.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_nn___pyx_t_3ml3_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
+ __pyx_v_parent_dists = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.buf = NULL;
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ } else {__pyx_pybuffernd_parent_dists.diminfo[0].strides = __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_parent_dists.diminfo[0].shape = __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.shape[0];
}
}
__pyx_t_9 = 0;
- __pyx_v_probs_nv = ((PyArrayObject *)__pyx_t_3);
+ __pyx_v_parent_dists = ((PyArrayObject *)__pyx_t_3);
__pyx_t_3 = 0;
- /* "ml3.pyx":51
+ /* "ml3.pyx":50
* np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE)
- * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE)
- * np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<<
- * np.ndarray[DTYPE_t] parent_dts = np.zeros(n_victims, dtype=DTYPE)
+ * np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE)
+ * np.ndarray[DTYPE_t] parent_dts = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<<
*
+ * # loop through victims
*/
- __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
__Pyx_GIVEREF(__pyx_t_3);
__pyx_t_3 = 0;
- __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_3);
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
__Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_10 = ((PyArrayObject *)__pyx_t_6);
{
__Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_parent_dists.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_3ml3_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
- __pyx_v_parent_dists = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.buf = NULL;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- } else {__pyx_pybuffernd_parent_dists.diminfo[0].strides = __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_parent_dists.diminfo[0].shape = __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.shape[0];
- }
- }
- __pyx_t_10 = 0;
- __pyx_v_parent_dists = ((PyArrayObject *)__pyx_t_6);
- __pyx_t_6 = 0;
-
- /* "ml3.pyx":52
- * np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE)
- * np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE)
- * np.ndarray[DTYPE_t] parent_dts = np.zeros(n_victims, dtype=DTYPE) # <<<<<<<<<<<<<<
- *
- * # loop through victims
- */
- __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_n_victims); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_6);
- __pyx_t_6 = 0;
- __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_DTYPE); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_11 = ((PyArrayObject *)__pyx_t_4);
- {
- __Pyx_BufFmt_StackElem __pyx_stack[1];
- if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_parent_dts.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_3ml3_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
+ if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_parent_dts.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_nn___pyx_t_3ml3_DTYPE_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) {
__pyx_v_parent_dts = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_parent_dts.rcbuffer->pybuffer.buf = NULL;
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
} else {__pyx_pybuffernd_parent_dts.diminfo[0].strides = __pyx_pybuffernd_parent_dts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_parent_dts.diminfo[0].shape = __pyx_pybuffernd_parent_dts.rcbuffer->pybuffer.shape[0];
}
}
- __pyx_t_11 = 0;
- __pyx_v_parent_dts = ((PyArrayObject *)__pyx_t_4);
- __pyx_t_4 = 0;
+ __pyx_t_10 = 0;
+ __pyx_v_parent_dts = ((PyArrayObject *)__pyx_t_6);
+ __pyx_t_6 = 0;
- /* "ml3.pyx":55
+ /* "ml3.pyx":53
*
* # loop through victims
* for i, parents in enumerate(victims.itervalues()): # <<<<<<<<<<<<<<
* # for each victim node i, compute the probability that all its parents
* # fail to infect it, also computes the probability that its most
*/
- __pyx_t_12 = 0;
+ __pyx_t_11 = 0;
__pyx_t_2 = 0;
if (unlikely(__pyx_v_victims == Py_None)) {
PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "itervalues");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_victims, 1, __pyx_n_s_itervalues, (&__pyx_t_1), (&__pyx_t_13)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_4);
- __pyx_t_4 = __pyx_t_6;
- __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_victims, 1, __pyx_n_s_itervalues, (&__pyx_t_1), (&__pyx_t_12)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __pyx_t_6 = __pyx_t_3;
+ __pyx_t_3 = 0;
while (1) {
- __pyx_t_14 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_1, &__pyx_t_2, NULL, &__pyx_t_6, NULL, __pyx_t_13);
- if (unlikely(__pyx_t_14 == 0)) break;
- if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_XDECREF_SET(__pyx_v_parents, ((PyObject*)__pyx_t_6));
- __pyx_t_6 = 0;
- __pyx_v_i = __pyx_t_12;
- __pyx_t_12 = (__pyx_t_12 + 1);
+ __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_1, &__pyx_t_2, NULL, &__pyx_t_3, NULL, __pyx_t_12);
+ if (unlikely(__pyx_t_13 == 0)) break;
+ if (unlikely(__pyx_t_13 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_XDECREF_SET(__pyx_v_parents, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
+ __pyx_v_i = __pyx_t_11;
+ __pyx_t_11 = (__pyx_t_11 + 1);
- /* "ml3.pyx":59
+ /* "ml3.pyx":57
* # fail to infect it, also computes the probability that its most
* # likely parent infects it
* failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<<
* for (dist, dt, w1, w2, w3) in parents]
* # probs_fail[i] = sum(failures)
*/
- __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
- /* "ml3.pyx":60
+ /* "ml3.pyx":58
* # likely parent infects it
* failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3)
* for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
@@ -2025,18 +1952,18 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
if (unlikely(__pyx_v_parents == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0;
+ __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
for (;;) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
- PyObject* sequence = __pyx_t_3;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
@@ -2045,91 +1972,91 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
if (unlikely(size != 5)) {
if (size > 5) __Pyx_RaiseTooManyValuesError(5);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_16 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2);
- __pyx_t_19 = PyTuple_GET_ITEM(sequence, 3);
- __pyx_t_20 = PyTuple_GET_ITEM(sequence, 4);
+ __pyx_t_15 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_16 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_18 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_19 = PyTuple_GET_ITEM(sequence, 4);
} else {
- __pyx_t_16 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_17 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 2);
- __pyx_t_19 = PyList_GET_ITEM(sequence, 3);
- __pyx_t_20 = PyList_GET_ITEM(sequence, 4);
+ __pyx_t_15 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_16 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_18 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_19 = PyList_GET_ITEM(sequence, 4);
}
+ __Pyx_INCREF(__pyx_t_15);
__Pyx_INCREF(__pyx_t_16);
__Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(__pyx_t_19);
- __Pyx_INCREF(__pyx_t_20);
#else
{
Py_ssize_t i;
- PyObject** temps[5] = {&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
+ PyObject** temps[5] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19};
for (i=0; i < 5; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
}
#endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
- PyObject** temps[5] = {&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
- __pyx_t_21 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_21);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_22 = Py_TYPE(__pyx_t_21)->tp_iternext;
+ PyObject** temps[5] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19};
+ __pyx_t_20 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_20);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_21 = Py_TYPE(__pyx_t_20)->tp_iternext;
for (index=0; index < 5; index++) {
- PyObject* item = __pyx_t_22(__pyx_t_21); if (unlikely(!item)) goto __pyx_L7_unpacking_failed;
+ PyObject* item = __pyx_t_21(__pyx_t_20); if (unlikely(!item)) goto __pyx_L7_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_21), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_22 = NULL;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_20), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
goto __pyx_L8_unpacking_done;
__pyx_L7_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- __pyx_t_22 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_t_21 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L8_unpacking_done:;
}
- __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __pyx_v_dist = __pyx_t_14;
- __pyx_v_dt = __pyx_t_23;
- __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_18);
+ __pyx_v_dist = __pyx_t_13;
+ __pyx_v_dt = __pyx_t_22;
+ __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_17);
+ __pyx_t_17 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_18);
__pyx_t_18 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_19);
+ __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_19);
__pyx_t_19 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_20);
- __pyx_t_20 = 0;
- /* "ml3.pyx":59
+ /* "ml3.pyx":57
* # fail to infect it, also computes the probability that its most
* # likely parent infects it
* failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<<
* for (dist, dt, w1, w2, w3) in parents]
* # probs_fail[i] = sum(failures)
*/
- __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_25 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_26 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyFloat_FromDouble(__pyx_f_3ml3_weight_failure(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_24, __pyx_t_25, __pyx_t_26)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_25 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyFloat_FromDouble(__pyx_f_3ml3_weight_failure(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_23, __pyx_t_24, __pyx_t_25)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "ml3.pyx":60
+ /* "ml3.pyx":58
* # likely parent infects it
* failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3)
* for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
@@ -2138,20 +2065,20 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_failures, ((PyObject*)__pyx_t_6));
- __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_failures, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
- /* "ml3.pyx":62
+ /* "ml3.pyx":60
* for (dist, dt, w1, w2, w3) in parents]
* # probs_fail[i] = sum(failures)
* successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<<
* for (dist, dt, w1, w2, w3) in parents]
* dists = [dist for (dist, dt, w1, w2, w3) in parents]
*/
- __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
- /* "ml3.pyx":63
+ /* "ml3.pyx":61
* # probs_fail[i] = sum(failures)
* successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3)
* for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
@@ -2160,18 +2087,18 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
if (unlikely(__pyx_v_parents == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0;
+ __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
for (;;) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
- PyObject* sequence = __pyx_t_3;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
@@ -2180,91 +2107,91 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
if (unlikely(size != 5)) {
if (size > 5) __Pyx_RaiseTooManyValuesError(5);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_20 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_19 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2);
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 3);
- __pyx_t_16 = PyTuple_GET_ITEM(sequence, 4);
+ __pyx_t_19 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_16 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_15 = PyTuple_GET_ITEM(sequence, 4);
} else {
- __pyx_t_20 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_19 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 2);
- __pyx_t_17 = PyList_GET_ITEM(sequence, 3);
- __pyx_t_16 = PyList_GET_ITEM(sequence, 4);
+ __pyx_t_19 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_16 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_15 = PyList_GET_ITEM(sequence, 4);
}
- __Pyx_INCREF(__pyx_t_20);
__Pyx_INCREF(__pyx_t_19);
__Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(__pyx_t_16);
+ __Pyx_INCREF(__pyx_t_15);
#else
{
Py_ssize_t i;
- PyObject** temps[5] = {&__pyx_t_20,&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16};
+ PyObject** temps[5] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16,&__pyx_t_15};
for (i=0; i < 5; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
}
#endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
- PyObject** temps[5] = {&__pyx_t_20,&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16};
- __pyx_t_21 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_21);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_22 = Py_TYPE(__pyx_t_21)->tp_iternext;
+ PyObject** temps[5] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16,&__pyx_t_15};
+ __pyx_t_20 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_20);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_21 = Py_TYPE(__pyx_t_20)->tp_iternext;
for (index=0; index < 5; index++) {
- PyObject* item = __pyx_t_22(__pyx_t_21); if (unlikely(!item)) goto __pyx_L11_unpacking_failed;
+ PyObject* item = __pyx_t_21(__pyx_t_20); if (unlikely(!item)) goto __pyx_L11_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_21), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_22 = NULL;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_20), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
goto __pyx_L12_unpacking_done;
__pyx_L11_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- __pyx_t_22 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_t_21 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L12_unpacking_done:;
}
- __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_20); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_19); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_t_19); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- __pyx_v_dist = __pyx_t_23;
- __pyx_v_dt = __pyx_t_14;
- __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_18);
- __pyx_t_18 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_17);
+ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_v_dist = __pyx_t_22;
+ __pyx_v_dt = __pyx_t_13;
+ __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_17);
__pyx_t_17 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_16);
+ __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_16);
__pyx_t_16 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_15);
+ __pyx_t_15 = 0;
- /* "ml3.pyx":62
+ /* "ml3.pyx":60
* for (dist, dt, w1, w2, w3) in parents]
* # probs_fail[i] = sum(failures)
* successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<<
* for (dist, dt, w1, w2, w3) in parents]
* dists = [dist for (dist, dt, w1, w2, w3) in parents]
*/
- __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_26 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_25 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyFloat_FromDouble(__pyx_f_3ml3_weight_success(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_26, __pyx_t_25, __pyx_t_24)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_25 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyFloat_FromDouble(__pyx_f_3ml3_weight_success(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_25, __pyx_t_24, __pyx_t_23)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- /* "ml3.pyx":63
+ /* "ml3.pyx":61
* # probs_fail[i] = sum(failures)
* successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3)
* for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
@@ -2273,32 +2200,32 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_successes, ((PyObject*)__pyx_t_6));
- __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_successes, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
- /* "ml3.pyx":64
+ /* "ml3.pyx":62
* successes = [weight_success(dist, dt, alpha, delta, w1, w2, w3)
* for (dist, dt, w1, w2, w3) in parents]
* dists = [dist for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
* dts = [dt for (dist, dt, w1, w2, w3) in parents]
* # find parent that maximizes log(p) - log(\tilde{p})
*/
- __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
if (unlikely(__pyx_v_parents == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0;
+ __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
for (;;) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
- PyObject* sequence = __pyx_t_3;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
@@ -2307,106 +2234,106 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
if (unlikely(size != 5)) {
if (size > 5) __Pyx_RaiseTooManyValuesError(5);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_16 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2);
- __pyx_t_19 = PyTuple_GET_ITEM(sequence, 3);
- __pyx_t_20 = PyTuple_GET_ITEM(sequence, 4);
+ __pyx_t_15 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_16 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_18 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_19 = PyTuple_GET_ITEM(sequence, 4);
} else {
- __pyx_t_16 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_17 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 2);
- __pyx_t_19 = PyList_GET_ITEM(sequence, 3);
- __pyx_t_20 = PyList_GET_ITEM(sequence, 4);
+ __pyx_t_15 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_16 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_18 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_19 = PyList_GET_ITEM(sequence, 4);
}
+ __Pyx_INCREF(__pyx_t_15);
__Pyx_INCREF(__pyx_t_16);
__Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(__pyx_t_19);
- __Pyx_INCREF(__pyx_t_20);
#else
{
Py_ssize_t i;
- PyObject** temps[5] = {&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
+ PyObject** temps[5] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19};
for (i=0; i < 5; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
}
#endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
- PyObject** temps[5] = {&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
- __pyx_t_21 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_21);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_22 = Py_TYPE(__pyx_t_21)->tp_iternext;
+ PyObject** temps[5] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19};
+ __pyx_t_20 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_20);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_21 = Py_TYPE(__pyx_t_20)->tp_iternext;
for (index=0; index < 5; index++) {
- PyObject* item = __pyx_t_22(__pyx_t_21); if (unlikely(!item)) goto __pyx_L15_unpacking_failed;
+ PyObject* item = __pyx_t_21(__pyx_t_20); if (unlikely(!item)) goto __pyx_L15_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_21), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_22 = NULL;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_20), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
goto __pyx_L16_unpacking_done;
__pyx_L15_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- __pyx_t_22 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_t_21 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L16_unpacking_done:;
}
- __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_15); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __pyx_v_dist = __pyx_t_14;
- __pyx_v_dt = __pyx_t_23;
- __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_18);
+ __pyx_v_dist = __pyx_t_13;
+ __pyx_v_dt = __pyx_t_22;
+ __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_17);
+ __pyx_t_17 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_18);
__pyx_t_18 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_19);
+ __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_19);
__pyx_t_19 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_20);
- __pyx_t_20 = 0;
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dist); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_dist); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dists, ((PyObject*)__pyx_t_6));
- __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dists, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
- /* "ml3.pyx":65
+ /* "ml3.pyx":63
* for (dist, dt, w1, w2, w3) in parents]
* dists = [dist for (dist, dt, w1, w2, w3) in parents]
* dts = [dt for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
* # find parent that maximizes log(p) - log(\tilde{p})
* # probs[i] = max(s - failures[l] for l, s in enumerate(successes))
*/
- __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
if (unlikely(__pyx_v_parents == Py_None)) {
PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0;
+ __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_14 = 0;
for (;;) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_5)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_14); __Pyx_INCREF(__pyx_t_4); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
- if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
- PyObject* sequence = __pyx_t_3;
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
#if CYTHON_COMPILING_IN_CPYTHON
Py_ssize_t size = Py_SIZE(sequence);
#else
@@ -2415,209 +2342,209 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
if (unlikely(size != 5)) {
if (size > 5) __Pyx_RaiseTooManyValuesError(5);
else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
#if CYTHON_COMPILING_IN_CPYTHON
if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_20 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_19 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2);
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 3);
- __pyx_t_16 = PyTuple_GET_ITEM(sequence, 4);
+ __pyx_t_19 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_16 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_15 = PyTuple_GET_ITEM(sequence, 4);
} else {
- __pyx_t_20 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_19 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 2);
- __pyx_t_17 = PyList_GET_ITEM(sequence, 3);
- __pyx_t_16 = PyList_GET_ITEM(sequence, 4);
+ __pyx_t_19 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_18 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_17 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_16 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_15 = PyList_GET_ITEM(sequence, 4);
}
- __Pyx_INCREF(__pyx_t_20);
__Pyx_INCREF(__pyx_t_19);
__Pyx_INCREF(__pyx_t_18);
__Pyx_INCREF(__pyx_t_17);
__Pyx_INCREF(__pyx_t_16);
+ __Pyx_INCREF(__pyx_t_15);
#else
{
Py_ssize_t i;
- PyObject** temps[5] = {&__pyx_t_20,&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16};
+ PyObject** temps[5] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16,&__pyx_t_15};
for (i=0; i < 5; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(item);
*(temps[i]) = item;
}
}
#endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
Py_ssize_t index = -1;
- PyObject** temps[5] = {&__pyx_t_20,&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16};
- __pyx_t_21 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_21);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_22 = Py_TYPE(__pyx_t_21)->tp_iternext;
+ PyObject** temps[5] = {&__pyx_t_19,&__pyx_t_18,&__pyx_t_17,&__pyx_t_16,&__pyx_t_15};
+ __pyx_t_20 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_20);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_21 = Py_TYPE(__pyx_t_20)->tp_iternext;
for (index=0; index < 5; index++) {
- PyObject* item = __pyx_t_22(__pyx_t_21); if (unlikely(!item)) goto __pyx_L19_unpacking_failed;
+ PyObject* item = __pyx_t_21(__pyx_t_20); if (unlikely(!item)) goto __pyx_L19_unpacking_failed;
__Pyx_GOTREF(item);
*(temps[index]) = item;
}
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_21), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_22 = NULL;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_21(__pyx_t_20), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_21 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
goto __pyx_L20_unpacking_done;
__pyx_L19_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- __pyx_t_22 = NULL;
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_t_21 = NULL;
if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_L20_unpacking_done:;
}
- __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_20); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_t_19); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_22 = __Pyx_PyInt_As_int(__pyx_t_19); if (unlikely((__pyx_t_22 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
- __pyx_v_dist = __pyx_t_23;
- __pyx_v_dt = __pyx_t_14;
- __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_18);
- __pyx_t_18 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_17);
+ __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_18); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_v_dist = __pyx_t_22;
+ __pyx_v_dt = __pyx_t_13;
+ __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_17);
__pyx_t_17 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_16);
+ __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_16);
__pyx_t_16 = 0;
- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dt); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_dt); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_dts, ((PyObject*)__pyx_t_6));
- __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_dts, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
- /* "ml3.pyx":68
+ /* "ml3.pyx":66
* # find parent that maximizes log(p) - log(\tilde{p})
* # probs[i] = max(s - failures[l] for l, s in enumerate(successes))
* probs[i] = float("-inf") # <<<<<<<<<<<<<<
* for l, s in enumerate(successes):
* prob = s - failures[l]
*/
- __pyx_t_27 = __Pyx_PyObject_AsDouble(__pyx_kp_s_inf); if (unlikely(__pyx_t_27 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_14 = __pyx_v_i;
- if (__pyx_t_14 < 0) __pyx_t_14 += __pyx_pybuffernd_probs.diminfo[0].shape;
- *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_probs.diminfo[0].strides) = __pyx_t_27;
+ __pyx_t_26 = __Pyx_PyObject_AsDouble(__pyx_kp_s_inf); if (unlikely(__pyx_t_26 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_13 = __pyx_v_i;
+ if (__pyx_t_13 < 0) __pyx_t_13 += __pyx_pybuffernd_probs.diminfo[0].shape;
+ *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_probs.diminfo[0].strides) = __pyx_t_26;
- /* "ml3.pyx":69
+ /* "ml3.pyx":67
* # probs[i] = max(s - failures[l] for l, s in enumerate(successes))
* probs[i] = float("-inf")
* for l, s in enumerate(successes): # <<<<<<<<<<<<<<
* prob = s - failures[l]
* if prob > probs[i]:
*/
- __pyx_t_23 = 0;
- __pyx_t_6 = __pyx_v_successes; __Pyx_INCREF(__pyx_t_6); __pyx_t_15 = 0;
+ __pyx_t_22 = 0;
+ __pyx_t_3 = __pyx_v_successes; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0;
for (;;) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_15); __Pyx_INCREF(__pyx_t_5); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_5); __pyx_t_14++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
__Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_5);
__pyx_t_5 = 0;
- __pyx_v_l = __pyx_t_23;
- __pyx_t_23 = (__pyx_t_23 + 1);
+ __pyx_v_l = __pyx_t_22;
+ __pyx_t_22 = (__pyx_t_22 + 1);
- /* "ml3.pyx":70
+ /* "ml3.pyx":68
* probs[i] = float("-inf")
* for l, s in enumerate(successes):
* prob = s - failures[l] # <<<<<<<<<<<<<<
* if prob > probs[i]:
* probs[i] = prob
*/
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_failures, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_failures, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_3 = PyNumber_Subtract(__pyx_v_s, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyNumber_Subtract(__pyx_v_s, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_prob, __pyx_t_3);
- __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_prob, __pyx_t_4);
+ __pyx_t_4 = 0;
- /* "ml3.pyx":71
+ /* "ml3.pyx":69
* for l, s in enumerate(successes):
* prob = s - failures[l]
* if prob > probs[i]: # <<<<<<<<<<<<<<
* probs[i] = prob
* parent_dists[i] = dists[l]
*/
- __pyx_t_28 = __pyx_v_i;
- if (__pyx_t_28 < 0) __pyx_t_28 += __pyx_pybuffernd_probs.diminfo[0].shape;
- __pyx_t_3 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf, __pyx_t_28, __pyx_pybuffernd_probs.diminfo[0].strides))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_5 = PyObject_RichCompare(__pyx_v_prob, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_29 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_29 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_27 = __pyx_v_i;
+ if (__pyx_t_27 < 0) __pyx_t_27 += __pyx_pybuffernd_probs.diminfo[0].shape;
+ __pyx_t_4 = PyFloat_FromDouble((*__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_probs.diminfo[0].strides))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_prob, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_28 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_28 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (__pyx_t_29) {
+ if (__pyx_t_28) {
- /* "ml3.pyx":72
+ /* "ml3.pyx":70
* prob = s - failures[l]
* if prob > probs[i]:
* probs[i] = prob # <<<<<<<<<<<<<<
* parent_dists[i] = dists[l]
* parent_dts[i] = dts[l]
*/
- __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_prob); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_30 = __pyx_v_i;
- if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_pybuffernd_probs.diminfo[0].shape;
- *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_probs.diminfo[0].strides) = __pyx_t_24;
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_v_prob); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_29 = __pyx_v_i;
+ if (__pyx_t_29 < 0) __pyx_t_29 += __pyx_pybuffernd_probs.diminfo[0].shape;
+ *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs.rcbuffer->pybuffer.buf, __pyx_t_29, __pyx_pybuffernd_probs.diminfo[0].strides) = __pyx_t_23;
- /* "ml3.pyx":73
+ /* "ml3.pyx":71
* if prob > probs[i]:
* probs[i] = prob
* parent_dists[i] = dists[l] # <<<<<<<<<<<<<<
* parent_dts[i] = dts[l]
* probs_fail[i] = failures[l]
*/
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dists, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dists, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_31 = __pyx_v_i;
- if (__pyx_t_31 < 0) __pyx_t_31 += __pyx_pybuffernd_parent_dists.diminfo[0].shape;
- *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_parent_dists.diminfo[0].strides) = __pyx_t_24;
+ __pyx_t_30 = __pyx_v_i;
+ if (__pyx_t_30 < 0) __pyx_t_30 += __pyx_pybuffernd_parent_dists.diminfo[0].shape;
+ *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_parent_dists.rcbuffer->pybuffer.buf, __pyx_t_30, __pyx_pybuffernd_parent_dists.diminfo[0].strides) = __pyx_t_23;
- /* "ml3.pyx":74
+ /* "ml3.pyx":72
* probs[i] = prob
* parent_dists[i] = dists[l]
* parent_dts[i] = dts[l] # <<<<<<<<<<<<<<
* probs_fail[i] = failures[l]
*
*/
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dts, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_dts, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 74; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_32 = __pyx_v_i;
- if (__pyx_t_32 < 0) __pyx_t_32 += __pyx_pybuffernd_parent_dts.diminfo[0].shape;
- *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_parent_dts.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_parent_dts.diminfo[0].strides) = __pyx_t_24;
+ __pyx_t_31 = __pyx_v_i;
+ if (__pyx_t_31 < 0) __pyx_t_31 += __pyx_pybuffernd_parent_dts.diminfo[0].shape;
+ *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_parent_dts.rcbuffer->pybuffer.buf, __pyx_t_31, __pyx_pybuffernd_parent_dts.diminfo[0].strides) = __pyx_t_23;
- /* "ml3.pyx":75
+ /* "ml3.pyx":73
* parent_dists[i] = dists[l]
* parent_dts[i] = dts[l]
* probs_fail[i] = failures[l] # <<<<<<<<<<<<<<
*
- * # loop through non-victims
+ * # print successes
*/
- __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_failures, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_failures, __pyx_v_l, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 73; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_33 = __pyx_v_i;
- if (__pyx_t_33 < 0) __pyx_t_33 += __pyx_pybuffernd_probs_fail.diminfo[0].shape;
- *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.buf, __pyx_t_33, __pyx_pybuffernd_probs_fail.diminfo[0].strides) = __pyx_t_24;
+ __pyx_t_32 = __pyx_v_i;
+ if (__pyx_t_32 < 0) __pyx_t_32 += __pyx_pybuffernd_probs_fail.diminfo[0].shape;
+ *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs_fail.rcbuffer->pybuffer.buf, __pyx_t_32, __pyx_pybuffernd_probs_fail.diminfo[0].strides) = __pyx_t_23;
goto __pyx_L23;
}
__pyx_L23:;
- /* "ml3.pyx":69
+ /* "ml3.pyx":67
* # probs[i] = max(s - failures[l] for l, s in enumerate(successes))
* probs[i] = float("-inf")
* for l, s in enumerate(successes): # <<<<<<<<<<<<<<
@@ -2625,323 +2552,136 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
* if prob > probs[i]:
*/
}
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "ml3.pyx":78
- *
- * # loop through non-victims
- * for i, parents in enumerate(non_victims.itervalues()): # <<<<<<<<<<<<<<
- * # for each non victim node, compute the probability that all its
- * # parents fail to infect it
- */
- __pyx_t_12 = 0;
- __pyx_t_1 = 0;
- if (unlikely(__pyx_v_non_victims == Py_None)) {
- PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "itervalues");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
}
- __pyx_t_6 = __Pyx_dict_iterator(__pyx_v_non_victims, 1, __pyx_n_s_itervalues, (&__pyx_t_2), (&__pyx_t_13)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_XDECREF(__pyx_t_4);
- __pyx_t_4 = __pyx_t_6;
- __pyx_t_6 = 0;
- while (1) {
- __pyx_t_23 = __Pyx_dict_iter_next(__pyx_t_4, __pyx_t_2, &__pyx_t_1, NULL, &__pyx_t_6, NULL, __pyx_t_13);
- if (unlikely(__pyx_t_23 == 0)) break;
- if (unlikely(__pyx_t_23 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_XDECREF_SET(__pyx_v_parents, ((PyObject*)__pyx_t_6));
- __pyx_t_6 = 0;
- __pyx_v_i = __pyx_t_12;
- __pyx_t_12 = (__pyx_t_12 + 1);
-
- /* "ml3.pyx":81
- * # for each non victim node, compute the probability that all its
- * # parents fail to infect it
- * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<<
- * for (dist, dt, w1, w2, w3) in parents]
- * probs_nv[i] = sum(failures)
- */
- __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
-
- /* "ml3.pyx":82
- * # parents fail to infect it
- * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3)
- * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
- * probs_nv[i] = sum(failures)
- *
- */
- if (unlikely(__pyx_v_parents == Py_None)) {
- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- __pyx_t_5 = __pyx_v_parents; __Pyx_INCREF(__pyx_t_5); __pyx_t_15 = 0;
- for (;;) {
- if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_5)) break;
- #if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #else
- __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- #endif
- if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
- PyObject* sequence = __pyx_t_3;
- #if CYTHON_COMPILING_IN_CPYTHON
- Py_ssize_t size = Py_SIZE(sequence);
- #else
- Py_ssize_t size = PySequence_Size(sequence);
- #endif
- if (unlikely(size != 5)) {
- if (size > 5) __Pyx_RaiseTooManyValuesError(5);
- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- }
- #if CYTHON_COMPILING_IN_CPYTHON
- if (likely(PyTuple_CheckExact(sequence))) {
- __pyx_t_16 = PyTuple_GET_ITEM(sequence, 0);
- __pyx_t_17 = PyTuple_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyTuple_GET_ITEM(sequence, 2);
- __pyx_t_19 = PyTuple_GET_ITEM(sequence, 3);
- __pyx_t_20 = PyTuple_GET_ITEM(sequence, 4);
- } else {
- __pyx_t_16 = PyList_GET_ITEM(sequence, 0);
- __pyx_t_17 = PyList_GET_ITEM(sequence, 1);
- __pyx_t_18 = PyList_GET_ITEM(sequence, 2);
- __pyx_t_19 = PyList_GET_ITEM(sequence, 3);
- __pyx_t_20 = PyList_GET_ITEM(sequence, 4);
- }
- __Pyx_INCREF(__pyx_t_16);
- __Pyx_INCREF(__pyx_t_17);
- __Pyx_INCREF(__pyx_t_18);
- __Pyx_INCREF(__pyx_t_19);
- __Pyx_INCREF(__pyx_t_20);
- #else
- {
- Py_ssize_t i;
- PyObject** temps[5] = {&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
- for (i=0; i < 5; i++) {
- PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(item);
- *(temps[i]) = item;
- }
- }
- #endif
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- } else {
- Py_ssize_t index = -1;
- PyObject** temps[5] = {&__pyx_t_16,&__pyx_t_17,&__pyx_t_18,&__pyx_t_19,&__pyx_t_20};
- __pyx_t_21 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_21);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_22 = Py_TYPE(__pyx_t_21)->tp_iternext;
- for (index=0; index < 5; index++) {
- PyObject* item = __pyx_t_22(__pyx_t_21); if (unlikely(!item)) goto __pyx_L28_unpacking_failed;
- __Pyx_GOTREF(item);
- *(temps[index]) = item;
- }
- if (__Pyx_IternextUnpackEndCheck(__pyx_t_22(__pyx_t_21), 5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_22 = NULL;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- goto __pyx_L29_unpacking_done;
- __pyx_L28_unpacking_failed:;
- __Pyx_DECREF(__pyx_t_21); __pyx_t_21 = 0;
- __pyx_t_22 = NULL;
- if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
- {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_L29_unpacking_done:;
- }
- __pyx_t_23 = __Pyx_PyInt_As_int(__pyx_t_16); if (unlikely((__pyx_t_23 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
- __pyx_t_34 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_34 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
- __pyx_v_dist = __pyx_t_23;
- __pyx_v_dt = __pyx_t_34;
- __Pyx_XDECREF_SET(__pyx_v_w1, __pyx_t_18);
- __pyx_t_18 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w2, __pyx_t_19);
- __pyx_t_19 = 0;
- __Pyx_XDECREF_SET(__pyx_v_w3, __pyx_t_20);
- __pyx_t_20 = 0;
-
- /* "ml3.pyx":81
- * # for each non victim node, compute the probability that all its
- * # parents fail to infect it
- * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3) # <<<<<<<<<<<<<<
- * for (dist, dt, w1, w2, w3) in parents]
- * probs_nv[i] = sum(failures)
- */
- __pyx_t_24 = __pyx_PyFloat_AsDouble(__pyx_v_w1); if (unlikely((__pyx_t_24 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_25 = __pyx_PyFloat_AsDouble(__pyx_v_w2); if (unlikely((__pyx_t_25 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_v_w3); if (unlikely((__pyx_t_26 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_3 = PyFloat_FromDouble(__pyx_f_3ml3_weight_failure(__pyx_v_dist, __pyx_v_dt, __pyx_v_alpha, __pyx_v_delta, __pyx_t_24, __pyx_t_25, __pyx_t_26)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 81; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
-
- /* "ml3.pyx":82
- * # parents fail to infect it
- * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3)
- * for (dist, dt, w1, w2, w3) in parents] # <<<<<<<<<<<<<<
- * probs_nv[i] = sum(failures)
- *
- */
- }
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __Pyx_XDECREF_SET(__pyx_v_failures, ((PyObject*)__pyx_t_6));
- __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- /* "ml3.pyx":83
- * failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3)
- * for (dist, dt, w1, w2, w3) in parents]
- * probs_nv[i] = sum(failures) # <<<<<<<<<<<<<<
+ /* "ml3.pyx":80
*
- * # print successes
- */
- __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_INCREF(__pyx_v_failures);
- PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_failures);
- __Pyx_GIVEREF(__pyx_v_failures);
- __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_26 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_34 = __pyx_v_i;
- if (__pyx_t_34 < 0) __pyx_t_34 += __pyx_pybuffernd_probs_nv.diminfo[0].shape;
- *__Pyx_BufPtrStrided1d(__pyx_t_3ml3_DTYPE_t *, __pyx_pybuffernd_probs_nv.rcbuffer->pybuffer.buf, __pyx_t_34, __pyx_pybuffernd_probs_nv.diminfo[0].strides) = __pyx_t_26;
- }
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
-
- /* "ml3.pyx":93
- * # cdef:
- * # np.ndarray[DTYPE_t] cums = probs.cumsum()
+ * # calculate log likelihood
* ll = probs_fail.sum() # add probability that all edges to victims fail # <<<<<<<<<<<<<<
* # ll += probs_nv.sum() # add probability that all edges to non_victims fail
*
*/
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_probs_fail), __pyx_n_s_sum); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_6 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
- __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
- if (likely(__pyx_t_6)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
- __Pyx_INCREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_probs_fail), __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_5, function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
}
}
- if (__pyx_t_6) {
- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_5) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
} else {
- __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_26 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_ll = __pyx_t_26;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_ll = __pyx_t_23;
- /* "ml3.pyx":97
+ /* "ml3.pyx":84
*
* # print 'probs', probs
* max_beta_add = float('-inf') # <<<<<<<<<<<<<<
* # iterate over all victim nodes to find the optimal threshold
- * for beta in np.arange(0.09, 1., .05):
+ * for beta in np.arange(0.1, 1., .1):
*/
- __pyx_t_27 = __Pyx_PyObject_AsDouble(__pyx_kp_s_inf); if (unlikely(__pyx_t_27 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_v_max_beta_add = __pyx_t_27;
+ __pyx_t_26 = __Pyx_PyObject_AsDouble(__pyx_kp_s_inf); if (unlikely(__pyx_t_26 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_v_max_beta_add = __pyx_t_26;
- /* "ml3.pyx":99
+ /* "ml3.pyx":86
* max_beta_add = float('-inf')
* # iterate over all victim nodes to find the optimal threshold
- * for beta in np.arange(0.09, 1., .05): # <<<<<<<<<<<<<<
+ * for beta in np.arange(0.1, 1., .1): # <<<<<<<<<<<<<<
* thresh = log(beta/(3012.*(1.-beta)))
* # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh])
*/
- __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_arange); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
- if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
- __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_2 = 0;
- __pyx_t_35 = NULL;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_np); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_arange); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+ __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
+ __pyx_t_33 = NULL;
} else {
- __pyx_t_2 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_5);
- __pyx_t_35 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_33 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
for (;;) {
- if (likely(!__pyx_t_35)) {
- if (likely(PyList_CheckExact(__pyx_t_5))) {
- if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ if (likely(!__pyx_t_33)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
} else {
- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
#if CYTHON_COMPILING_IN_CPYTHON
- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_6); __pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#else
- __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
#endif
}
} else {
- __pyx_t_4 = __pyx_t_35(__pyx_t_5);
- if (unlikely(!__pyx_t_4)) {
+ __pyx_t_6 = __pyx_t_33(__pyx_t_3);
+ if (unlikely(!__pyx_t_6)) {
PyObject* exc_type = PyErr_Occurred();
if (exc_type) {
if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
- else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
break;
}
- __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_6);
}
- __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_26 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_beta = __pyx_t_26;
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_6); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_beta = __pyx_t_23;
- /* "ml3.pyx":100
+ /* "ml3.pyx":87
* # iterate over all victim nodes to find the optimal threshold
- * for beta in np.arange(0.09, 1., .05):
+ * for beta in np.arange(0.1, 1., .1):
* thresh = log(beta/(3012.*(1.-beta))) # <<<<<<<<<<<<<<
* # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh])
* roots = n_roots + len(probs[probs<thresh])
*/
__pyx_v_thresh = log((__pyx_v_beta / (3012. * (1. - __pyx_v_beta))));
- /* "ml3.pyx":102
+ /* "ml3.pyx":89
* thresh = log(beta/(3012.*(1.-beta)))
* # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh])
* roots = n_roots + len(probs[probs<thresh]) # <<<<<<<<<<<<<<
*
* beta_add = 0.
*/
- __pyx_t_4 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_6); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_6, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_1 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
- __pyx_v_roots = (__pyx_v_n_roots + __pyx_t_1);
+ __pyx_t_6 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_5); if (unlikely(__pyx_t_6 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_2 = PyObject_Length(__pyx_t_6); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_roots = (__pyx_v_n_roots + __pyx_t_2);
- /* "ml3.pyx":104
+ /* "ml3.pyx":91
* roots = n_roots + len(probs[probs<thresh])
*
* beta_add = 0. # <<<<<<<<<<<<<<
@@ -2950,80 +2690,80 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
__pyx_v_beta_add = 0.;
- /* "ml3.pyx":106
+ /* "ml3.pyx":93
* beta_add = 0.
* # add probability for realized edges and subtract probability these edges fail
* beta_add += (probs[probs>=thresh]).sum() # <<<<<<<<<<<<<<
* # add probability for the seeds and non-seeds
* beta_add += roots * log(beta) + len(probs[probs>=thresh]) * log(1. - beta)
*/
- __pyx_t_4 = PyFloat_FromDouble(__pyx_v_beta_add); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyFloat_FromDouble(__pyx_v_beta_add); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_4);
- __pyx_t_3 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_3);
- __pyx_t_20 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_20); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_20); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __Pyx_GOTREF(__pyx_t_3);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sum); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- __pyx_t_3 = NULL;
- if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_20))) {
- __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_20);
- if (likely(__pyx_t_3)) {
- PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_20);
- __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_15 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_15); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_15); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sum); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_4);
__Pyx_INCREF(function);
- __Pyx_DECREF_SET(__pyx_t_20, function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
}
}
- if (__pyx_t_3) {
- __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_20, __pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
} else {
- __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_20); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
}
- __Pyx_GOTREF(__pyx_t_6);
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- __pyx_t_20 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
__Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_26 = __pyx_PyFloat_AsDouble(__pyx_t_20); if (unlikely((__pyx_t_26 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- __pyx_v_beta_add = __pyx_t_26;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_23 = __pyx_PyFloat_AsDouble(__pyx_t_15); if (unlikely((__pyx_t_23 == (npy_double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_v_beta_add = __pyx_t_23;
- /* "ml3.pyx":108
+ /* "ml3.pyx":95
* beta_add += (probs[probs>=thresh]).sum()
* # add probability for the seeds and non-seeds
* beta_add += roots * log(beta) + len(probs[probs>=thresh]) * log(1. - beta) # <<<<<<<<<<<<<<
*
* if beta_add > max_beta_add:
*/
- __pyx_t_20 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_20);
- __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_20, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- __pyx_t_20 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_6); if (unlikely(__pyx_t_20 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
- __Pyx_GOTREF(__pyx_t_20);
- __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
- __pyx_t_1 = PyObject_Length(__pyx_t_20); if (unlikely(__pyx_t_1 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
- __pyx_v_beta_add = (__pyx_v_beta_add + ((__pyx_v_roots * log(__pyx_v_beta)) + (__pyx_t_1 * log((1. - __pyx_v_beta)))));
+ __pyx_t_15 = PyFloat_FromDouble(__pyx_v_thresh); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_probs), __pyx_t_15, Py_GE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyObject_GetItem(((PyObject *)__pyx_v_probs), __pyx_t_5); if (unlikely(__pyx_t_15 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_2 = PyObject_Length(__pyx_t_15); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 95; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_v_beta_add = (__pyx_v_beta_add + ((__pyx_v_roots * log(__pyx_v_beta)) + (__pyx_t_2 * log((1. - __pyx_v_beta)))));
- /* "ml3.pyx":110
+ /* "ml3.pyx":97
* beta_add += roots * log(beta) + len(probs[probs>=thresh]) * log(1. - beta)
*
* if beta_add > max_beta_add: # <<<<<<<<<<<<<<
* max_beta = beta
* max_roots = roots
*/
- __pyx_t_29 = ((__pyx_v_beta_add > __pyx_v_max_beta_add) != 0);
- if (__pyx_t_29) {
+ __pyx_t_28 = ((__pyx_v_beta_add > __pyx_v_max_beta_add) != 0);
+ if (__pyx_t_28) {
- /* "ml3.pyx":111
+ /* "ml3.pyx":98
*
* if beta_add > max_beta_add:
* max_beta = beta # <<<<<<<<<<<<<<
@@ -3032,7 +2772,7 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
__pyx_v_max_beta = __pyx_v_beta;
- /* "ml3.pyx":112
+ /* "ml3.pyx":99
* if beta_add > max_beta_add:
* max_beta = beta
* max_roots = roots # <<<<<<<<<<<<<<
@@ -3041,7 +2781,7 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
__pyx_v_max_roots = __pyx_v_roots;
- /* "ml3.pyx":113
+ /* "ml3.pyx":100
* max_beta = beta
* max_roots = roots
* max_beta_add = beta_add # <<<<<<<<<<<<<<
@@ -3049,21 +2789,21 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*
*/
__pyx_v_max_beta_add = __pyx_v_beta_add;
- goto __pyx_L32;
+ goto __pyx_L26;
}
- __pyx_L32:;
+ __pyx_L26:;
- /* "ml3.pyx":99
+ /* "ml3.pyx":86
* max_beta_add = float('-inf')
* # iterate over all victim nodes to find the optimal threshold
- * for beta in np.arange(0.09, 1., .05): # <<<<<<<<<<<<<<
+ * for beta in np.arange(0.1, 1., .1): # <<<<<<<<<<<<<<
* thresh = log(beta/(3012.*(1.-beta)))
* # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh])
*/
}
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
- /* "ml3.pyx":116
+ /* "ml3.pyx":103
* # print 'beta:', max_beta, 'add:', max_beta_add, 'roots:', max_roots
*
* ll += max_beta_add # <<<<<<<<<<<<<<
@@ -3072,7 +2812,7 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
__pyx_v_ll = (__pyx_v_ll + __pyx_v_max_beta_add);
- /* "ml3.pyx":117
+ /* "ml3.pyx":104
*
* ll += max_beta_add
* roots = max_roots # <<<<<<<<<<<<<<
@@ -3081,7 +2821,7 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
__pyx_v_roots = __pyx_v_max_roots;
- /* "ml3.pyx":118
+ /* "ml3.pyx":105
* ll += max_beta_add
* roots = max_roots
* beta = max_beta # <<<<<<<<<<<<<<
@@ -3090,31 +2830,31 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
*/
__pyx_v_beta = __pyx_v_max_beta;
- /* "ml3.pyx":120
+ /* "ml3.pyx":107
* beta = max_beta
* # print n_nodes, n_roots, n_victims, max_i, roots
* return (beta, roots, ll) # <<<<<<<<<<<<<<
*/
__Pyx_XDECREF(__pyx_r);
- __pyx_t_5 = PyFloat_FromDouble(__pyx_v_beta); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_3 = PyFloat_FromDouble(__pyx_v_beta); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_roots); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_5 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_5);
- __pyx_t_20 = __Pyx_PyInt_From_int(__pyx_v_roots); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_20);
- __pyx_t_6 = PyFloat_FromDouble(__pyx_v_ll); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_6);
- __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __Pyx_GOTREF(__pyx_t_4);
- PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
__Pyx_GIVEREF(__pyx_t_5);
- PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_20);
- __Pyx_GIVEREF(__pyx_t_20);
- PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_6);
- __Pyx_GIVEREF(__pyx_t_6);
+ __pyx_t_3 = 0;
+ __pyx_t_15 = 0;
__pyx_t_5 = 0;
- __pyx_t_20 = 0;
+ __pyx_r = __pyx_t_6;
__pyx_t_6 = 0;
- __pyx_r = __pyx_t_4;
- __pyx_t_4 = 0;
goto __pyx_L0;
/* "ml3.pyx":39
@@ -3131,19 +2871,18 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
__Pyx_XDECREF(__pyx_t_4);
__Pyx_XDECREF(__pyx_t_5);
__Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_15);
__Pyx_XDECREF(__pyx_t_16);
__Pyx_XDECREF(__pyx_t_17);
__Pyx_XDECREF(__pyx_t_18);
__Pyx_XDECREF(__pyx_t_19);
__Pyx_XDECREF(__pyx_t_20);
- __Pyx_XDECREF(__pyx_t_21);
{ PyObject *__pyx_type, *__pyx_value, *__pyx_tb;
__Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_parent_dists.rcbuffer->pybuffer);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_parent_dts.rcbuffer->pybuffer);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs.rcbuffer->pybuffer);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_fail.rcbuffer->pybuffer);
- __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_nv.rcbuffer->pybuffer);
__Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);}
__Pyx_AddTraceback("ml3.ml3", __pyx_clineno, __pyx_lineno, __pyx_filename);
__pyx_r = NULL;
@@ -3153,14 +2892,12 @@ static PyObject *__pyx_pf_3ml3_ml3(CYTHON_UNUSED PyObject *__pyx_self, PyObject
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_parent_dts.rcbuffer->pybuffer);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs.rcbuffer->pybuffer);
__Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_fail.rcbuffer->pybuffer);
- __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_probs_nv.rcbuffer->pybuffer);
__pyx_L2:;
__Pyx_XDECREF(__pyx_v_parents);
__Pyx_XDECREF(__pyx_v_failures);
__Pyx_XDECREF(__pyx_v_successes);
__Pyx_XDECREF((PyObject *)__pyx_v_probs);
__Pyx_XDECREF((PyObject *)__pyx_v_probs_fail);
- __Pyx_XDECREF((PyObject *)__pyx_v_probs_nv);
__Pyx_XDECREF((PyObject *)__pyx_v_parent_dists);
__Pyx_XDECREF((PyObject *)__pyx_v_parent_dts);
__Pyx_XDECREF(__pyx_v_dists);
@@ -5232,7 +4969,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_max_beta_add, __pyx_k_max_beta_add, sizeof(__pyx_k_max_beta_add), 0, 0, 1, 1},
{&__pyx_n_s_max_roots, __pyx_k_max_roots, sizeof(__pyx_k_max_roots), 0, 0, 1, 1},
{&__pyx_n_s_ml3, __pyx_k_ml3, sizeof(__pyx_k_ml3), 0, 0, 1, 1},
- {&__pyx_n_s_n_nodes, __pyx_k_n_nodes, sizeof(__pyx_k_n_nodes), 0, 0, 1, 1},
{&__pyx_n_s_n_roots, __pyx_k_n_roots, sizeof(__pyx_k_n_roots), 0, 0, 1, 1},
{&__pyx_n_s_n_victims, __pyx_k_n_victims, sizeof(__pyx_k_n_victims), 0, 0, 1, 1},
{&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
@@ -5246,7 +4982,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{&__pyx_n_s_prob, __pyx_k_prob, sizeof(__pyx_k_prob), 0, 0, 1, 1},
{&__pyx_n_s_probs, __pyx_k_probs, sizeof(__pyx_k_probs), 0, 0, 1, 1},
{&__pyx_n_s_probs_fail, __pyx_k_probs_fail, sizeof(__pyx_k_probs_fail), 0, 0, 1, 1},
- {&__pyx_n_s_probs_nv, __pyx_k_probs_nv, sizeof(__pyx_k_probs_nv), 0, 0, 1, 1},
{&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
{&__pyx_n_s_root_victims, __pyx_k_root_victims, sizeof(__pyx_k_root_victims), 0, 0, 1, 1},
{&__pyx_n_s_roots, __pyx_k_roots, sizeof(__pyx_k_roots), 0, 0, 1, 1},
@@ -5265,8 +5000,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
{0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
- __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 53; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -5279,14 +5013,14 @@ static int __Pyx_InitCachedConstants(void) {
__Pyx_RefNannyDeclarations
__Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
- /* "ml3.pyx":99
+ /* "ml3.pyx":86
* max_beta_add = float('-inf')
* # iterate over all victim nodes to find the optimal threshold
- * for beta in np.arange(0.09, 1., .05): # <<<<<<<<<<<<<<
+ * for beta in np.arange(0.1, 1., .1): # <<<<<<<<<<<<<<
* thresh = log(beta/(3012.*(1.-beta)))
* # print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh])
*/
- __pyx_tuple_ = PyTuple_Pack(3, __pyx_float_0_09, __pyx_float_1_, __pyx_float__05); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple_ = PyTuple_Pack(3, __pyx_float_0_1, __pyx_float_1_, __pyx_float__1); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 86; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple_);
__Pyx_GIVEREF(__pyx_tuple_);
@@ -5363,10 +5097,10 @@ static int __Pyx_InitCachedConstants(void) {
* DTYPE_t alpha, DTYPE_t delta):
* cdef:
*/
- __pyx_tuple__8 = PyTuple_Pack(37, __pyx_n_s_root_victims, __pyx_n_s_victims, __pyx_n_s_non_victims, __pyx_n_s_age, __pyx_n_s_alpha, __pyx_n_s_delta, __pyx_n_s_n_roots, __pyx_n_s_n_victims, __pyx_n_s_n_nodes, __pyx_n_s_roots, __pyx_n_s_i, __pyx_n_s_dist, __pyx_n_s_dt, __pyx_n_s_t, __pyx_n_s_l, __pyx_n_s_beta, __pyx_n_s_ll, __pyx_n_s_beta_add, __pyx_n_s_max_beta, __pyx_n_s_max_beta_add, __pyx_n_s_parents, __pyx_n_s_failures, __pyx_n_s_successes, __pyx_n_s_probs, __pyx_n_s_probs_fail, __pyx_n_s_probs_nv, __pyx_n_s_parent_dists, __pyx_n_s_parent_dts, __pyx_n_s_dists, __pyx_n_s_dts, __pyx_n_s_s, __pyx_n_s_prob, __pyx_n_s_thresh, __pyx_n_s_max_roots, __pyx_n_s_w1, __pyx_n_s_w2, __pyx_n_s_w3); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_tuple__8 = PyTuple_Pack(35, __pyx_n_s_root_victims, __pyx_n_s_victims, __pyx_n_s_non_victims, __pyx_n_s_age, __pyx_n_s_alpha, __pyx_n_s_delta, __pyx_n_s_n_roots, __pyx_n_s_n_victims, __pyx_n_s_roots, __pyx_n_s_i, __pyx_n_s_dist, __pyx_n_s_dt, __pyx_n_s_t, __pyx_n_s_l, __pyx_n_s_beta, __pyx_n_s_ll, __pyx_n_s_beta_add, __pyx_n_s_max_beta, __pyx_n_s_max_beta_add, __pyx_n_s_parents, __pyx_n_s_failures, __pyx_n_s_successes, __pyx_n_s_probs, __pyx_n_s_probs_fail, __pyx_n_s_parent_dists, __pyx_n_s_parent_dts, __pyx_n_s_dists, __pyx_n_s_dts, __pyx_n_s_s, __pyx_n_s_prob, __pyx_n_s_thresh, __pyx_n_s_max_roots, __pyx_n_s_w1, __pyx_n_s_w2, __pyx_n_s_w3); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_tuple__8);
__Pyx_GIVEREF(__pyx_tuple__8);
- __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(6, 0, 37, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ben_Documents_Cascade_Pro, __pyx_n_s_ml3, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(6, 0, 35, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_Users_ben_Documents_Cascade_Pro, __pyx_n_s_ml3, 39, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_RefNannyFinishContext();
return 0;
__pyx_L1_error:;
@@ -5376,9 +5110,9 @@ static int __Pyx_InitCachedConstants(void) {
static int __Pyx_InitGlobals(void) {
if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
+ __pyx_float__1 = PyFloat_FromDouble(.1); if (unlikely(!__pyx_float__1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_float_1_ = PyFloat_FromDouble(1.); if (unlikely(!__pyx_float_1_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_float__05 = PyFloat_FromDouble(.05); if (unlikely(!__pyx_float__05)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_float_0_09 = PyFloat_FromDouble(0.09); if (unlikely(!__pyx_float_0_09)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_float_0_1 = PyFloat_FromDouble(0.1); if (unlikely(!__pyx_float_0_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
return 0;
__pyx_L1_error:;
return -1;
diff --git a/experiments/ml3.pyx b/experiments/ml3.pyx
index d7f7ff1..1f46ef5 100644
--- a/experiments/ml3.pyx
+++ b/experiments/ml3.pyx
@@ -6,9 +6,6 @@ from libc.math cimport log, exp
DTYPE = np.float64
ctypedef np.float_t DTYPE_t
-cdef DTYPE_t plogis(DTYPE_t weight, DTYPE_t delta):
- return 1./(1. + exp(-weight/delta))
-
cdef DTYPE_t weight_success(int dist, int dt, DTYPE_t alpha, DTYPE_t delta,
DTYPE_t w1, DTYPE_t w2, DTYPE_t w3):
"""weight for successful infection, exponential time model"""
@@ -32,22 +29,20 @@ cdef DTYPE_t weight_failure(int dist, int dt, DTYPE_t alpha, DTYPE_t delta,
# structural = plogis(w1,delta) * plogis(w2,delta) * plogis(w3,delta)
temporal = exp(-alpha * dt)
# temporal = 1. - 1. / (1. + dt/alpha)**0.01
- result = log(1. - structural + structural * temporal)
+ result = log(1. - structural)
# print 'stnv', structural, temporal
return result
def ml3(dict root_victims, dict victims, dict non_victims, DTYPE_t age,
DTYPE_t alpha, DTYPE_t delta):
cdef:
- int n_roots, n_victims, n_nodes, roots, i, dist, dt, t, l
+ int n_roots, n_victims, roots, i, dist, dt, t, l
DTYPE_t beta, ll, beta_add, max_beta, max_beta_add
list parents, failures, successes
n_roots, n_victims = len(root_victims), len(victims)
- n_nodes = 148152
cdef:
np.ndarray[DTYPE_t] probs = np.zeros(n_victims, dtype=DTYPE)
np.ndarray[DTYPE_t] probs_fail = np.zeros(n_victims, dtype=DTYPE)
- np.ndarray[DTYPE_t] probs_nv = np.zeros(len(non_victims), dtype=DTYPE)
np.ndarray[DTYPE_t] parent_dists = np.zeros(n_victims, dtype=DTYPE)
np.ndarray[DTYPE_t] parent_dts = np.zeros(n_victims, dtype=DTYPE)
@@ -74,29 +69,18 @@ def ml3(dict root_victims, dict victims, dict non_victims, DTYPE_t age,
parent_dts[i] = dts[l]
probs_fail[i] = failures[l]
- # loop through non-victims
- # for i, parents in enumerate(non_victims.itervalues()):
- # # for each non victim node, compute the probability that all its
- # # parents fail to infect it
- # failures = [weight_failure(dist, dt, alpha, delta, w1, w2, w3)
- # for (dist, dt, w1, w2, w3) in parents]
- # probs_nv[i] = sum(failures)
-
# print successes
# print failures
# print probs
# calculate log likelihood
- # probs.sort(); probs = probs[::-1] # sort probs in descending order
- # cdef:
- # np.ndarray[DTYPE_t] cums = probs.cumsum()
ll = probs_fail.sum() # add probability that all edges to victims fail
# ll += probs_nv.sum() # add probability that all edges to non_victims fail
# print 'probs', probs
max_beta_add = float('-inf')
# iterate over all victim nodes to find the optimal threshold
- for beta in np.arange(0.09, 1., .05):
+ for beta in np.arange(0.1, 1., .1):
thresh = log(beta/(3012.*(1.-beta)))
# print 'beta:', beta, 'thresh:', thresh, 'infected:', len(probs[probs>=thresh])
roots = n_roots + len(probs[probs<thresh])
diff --git a/experiments/ml3.so b/experiments/ml3.so
index 853ea01..3f515d5 100755
--- a/experiments/ml3.so
+++ b/experiments/ml3.so
Binary files differ
diff --git a/experiments/out.log b/experiments/out.log
index b155f87..77e6ca1 100644
--- a/experiments/out.log
+++ b/experiments/out.log
@@ -1,200 +1,1000 @@
-0.0001 0.0001 0.99 11270 -113.288560238
-0.0001 0.000215443469003 0.99 11270 -113.313124077
-0.0001 0.000464158883361 0.99 11270 -113.366056353
-0.0001 0.001 0.99 11270 -113.480146977
-0.0001 0.00215443469003 0.99 11270 -113.726186922
-0.0001 0.00464158883361 0.99 11270 -114.25737537
-0.0001 0.01 0.99 11270 -115.406959476
-0.0001 0.0215443469003 0.99 11270 -117.907819624
-0.0001 0.0464158883361 0.99 11270 -123.409330201
-0.0001 0.1 0.99 11270 -135.803753759
-0.000206913808111 0.0001 0.99 11270 -113.309203373
-0.000206913808111 0.000215443469003 0.99 11270 -113.357601782
-0.000206913808111 0.000464158883361 0.99 11270 -113.461896537
-0.000206913808111 0.001 0.99 11270 -113.686702086
-0.000206913808111 0.00215443469003 0.99 11270 -114.171538637
-0.000206913808111 0.00464158883361 0.99 11270 -115.218446765
-0.000206913808111 0.01 0.99 11270 -117.484923715
-0.000206913808111 0.0215443469003 0.99 11270 -122.419176416
-0.000206913808111 0.0464158883361 0.99 11270 -133.290766257
-0.000206913808111 0.1 0.99 11270 -157.863065856
-0.000428133239872 0.0001 0.99 11270 -113.346177154
-0.000428133239872 0.000215443469003 0.99 11270 -113.437266512
-0.000428133239872 0.000464158883361 0.99 11270 -113.633562114
-0.000428133239872 0.001 0.99 11270 -114.056698124
-0.000428133239872 0.00215443469003 0.99 11270 -114.969385034
-0.000428133239872 0.00464158883361 0.99 11270 -116.940673237
-0.000428133239872 0.01 0.99 11270 -121.210791204
-0.000428133239872 0.0215443469003 0.99 11270 -130.518397062
-0.000428133239872 0.0464158883361 0.99 11270 -151.078692676
-0.000428133239872 0.1 0.99 11270 -197.800950323
-0.00088586679041 0.0001 0.99 11270 -113.404665316
-0.00088586679041 0.000215443469003 0.99 11270 -113.563288941
-0.00088586679041 0.000464158883361 0.99 11270 -113.90513189
-0.00088586679041 0.001 0.99 11270 -114.642068505
-0.00088586679041 0.00215443469003 0.99 11270 -116.231879053
-0.00088586679041 0.00464158883361 0.99 11270 -119.666917365
-0.00088586679041 0.01 0.99 11270 -127.113559721
-0.00088586679041 0.0215443469003 0.99 11270 -143.3722167
-0.00088586679041 0.0464158883361 0.99 11270 -179.415209638
-0.00088586679041 0.1 0.99 11270 -261.937771145
-0.00183298071083 0.0001 0.99 11270 -113.481389753
-0.00183298071083 0.000215443469003 0.99 11270 -113.728607743
-0.00183298071083 0.000464158883361 0.99 11270 -114.261398006
-0.00183298071083 0.001 0.99 11270 -115.410073559
-0.00183298071083 0.00215443469003 0.99 11270 -117.888599935
-0.00183298071083 0.00464158883361 0.99 11270 -123.245997339
-0.00183298071083 0.01 0.99 11270 -134.820194214
-0.00183298071083 0.0215443469003 0.99 11270 -159.779221418
-0.00183298071083 0.0464158883361 0.99 11270 -213.234753667
-0.00183298071083 0.1 0.99 11270 -326.631513637
-0.00379269019073 0.0001 0.99 11270 -113.561241236
-0.00379269019073 0.000215443469003 0.99 11270 -113.898944536
-0.00379269019073 0.000464158883361 0.99 11270 -114.621996425
-0.00379269019073 0.001 0.99 11270 -116.164502588
-0.00379269019073 0.00215443469003 0.99 11270 -119.410893336
-0.00379269019073 0.00464158883361 0.99 11270 -126.272245168
-0.00379269019073 0.01 0.99 11270 -140.509684147
-0.00379269019073 0.0215443469003 0.99 11270 -169.426499584
-0.00379269019073 0.0464158883361 0.99 11270 -228.170751503
-0.00379269019073 0.1 0.99 11270 -348.983663221
-0.00784759970351 0.0001 0.99 11270 -113.602128512
-0.00784759970351 0.000215443469003 0.99 11270 -113.971974143
-0.00784759970351 0.000464158883361 0.99 11270 -114.747867132
-0.00784759970351 0.001 0.99 11270 -116.37310315
-0.00784759970351 0.00215443469003 0.99 11270 -119.717823063
-0.00784759970351 0.00464158883361 0.99 11270 -126.593169684
-0.00784759970351 0.01 0.99 11270 -140.48404267
-0.00784759970351 0.0215443469003 0.99 11270 -168.861887496
-0.00784759970351 0.0464158883361 0.99 11270 -224.196524324
-0.00784759970351 0.1 0.99 11270 -332.737201415
-0.0162377673919 0.0001 0.99 11270 -113.581147638
-0.0162377673919 0.000215443469003 0.99 11270 -113.925060097
-0.0162377673919 0.000464158883361 0.99 11270 -114.630141214
-0.0162377673919 0.001 0.99 11270 -116.074691673
-0.0162377673919 0.00215443469003 0.99 11270 -119.034904159
-0.0162377673919 0.00464158883361 0.99 11270 -124.893569002
-0.0162377673919 0.01 0.99 11270 -136.286493223
-0.0162377673919 0.0215443469003 0.99 11270 -158.533635058
-0.0162377673919 0.0464158883361 0.99 11270 -202.541681951
-0.0162377673919 0.1 0.99 11270 -291.543903416
-0.0335981828628 0.0001 0.99 11270 -113.519423586
-0.0335981828628 0.000215443469003 0.99 11270 -113.784324343
-0.0335981828628 0.000464158883361 0.99 11270 -114.329713664
-0.0335981828628 0.001 0.99 11270 -115.412402823
-0.0335981828628 0.00215443469003 0.99 11270 -117.614120903
-0.0335981828628 0.00464158883361 0.99 11270 -121.992562658
-0.0335981828628 0.01 0.99 11270 -130.723456965
-0.0335981828628 0.0215443469003 0.99 11270 -147.93426569
-0.0335981828628 0.0464158883361 0.99 11270 -182.630431579
-0.0335981828628 0.1 0.99 11270 -257.905569917
-0.0695192796178 0.0001 0.99 11270 -113.453213913
-0.0695192796178 0.000215443469003 0.99 11270 -113.648780753
-0.0695192796178 0.000464158883361 0.99 11270 -114.04925259
-0.0695192796178 0.001 0.99 11270 -114.855978994
-0.0695192796178 0.00215443469003 0.99 11270 -116.47483822
-0.0695192796178 0.00464158883361 0.99 11270 -119.710942078
-0.0695192796178 0.01 0.99 11270 -126.113084928
-0.0695192796178 0.0215443469003 0.99 11270 -139.250102805
-0.0695192796178 0.0464158883361 0.99 11270 -165.858275582
-0.0695192796178 0.1 0.99 11270 -226.501634061
-0.143844988829 0.0001 0.99 11270 -113.399709658
-0.143844988829 0.000215443469003 0.99 11270 -113.541035828
-0.143844988829 0.000464158883361 0.99 11270 -113.831917242
-0.143844988829 0.001 0.99 11270 -114.408450224
-0.143844988829 0.00215443469003 0.99 11270 -115.543748769
-0.143844988829 0.00464158883361 0.99 11270 -117.848030859
-0.143844988829 0.01 0.99 11270 -122.626199497
-0.143844988829 0.0215443469003 0.99 11270 -131.861581945
-0.143844988829 0.0464158883361 0.99 11270 -152.728231122
-0.143844988829 0.1 0.99 11270 -204.433543982
-0.297635144163 0.0001 0.99 11270 -113.359509941
-0.297635144163 0.000215443469003 0.99 11270 -113.456354318
-0.297635144163 0.000464158883361 0.99 11270 -113.659154559
-0.297635144163 0.001 0.99 11270 -114.071980684
-0.297635144163 0.00215443469003 0.99 11270 -114.919089511
-0.297635144163 0.00464158883361 0.99 11270 -116.63699744
-0.297635144163 0.01 0.99 11270 -120.088372236
-0.297635144163 0.0215443469003 0.99 11270 -127.352055192
-0.297635144163 0.0464158883361 0.99 11270 -144.637544688
-0.297635144163 0.1 0.99 11270 -190.973992598
-0.615848211066 0.0001 0.99 11270 -113.334200353
-0.615848211066 0.000215443469003 0.99 11270 -113.405909471
-0.615848211066 0.000464158883361 0.99 11270 -113.556471226
-0.615848211066 0.001 0.99 11270 -113.868572033
-0.615848211066 0.00215443469003 0.99 11270 -114.497121035
-0.615848211066 0.00464158883361 0.99 11270 -115.835675977
-0.615848211066 0.01 0.99 11270 -118.688871339
-0.615848211066 0.0215443469003 0.99 11270 -125.191738088
-0.615848211066 0.0464158883361 0.99 11270 -140.750585151
-0.615848211066 0.1 0.99 11252 -322.0013633
-1.2742749857 0.0001 0.99 11270 -113.320552935
-1.2742749857 0.000215443469003 0.99 11270 -113.380807358
-1.2742749857 0.000464158883361 0.99 11270 -113.507933884
-1.2742749857 0.001 0.99 11270 -113.765844014
-1.2742749857 0.00215443469003 0.99 11270 -114.311961274
-1.2742749857 0.00464158883361 0.99 11270 -115.491000807
-1.2742749857 0.01 0.99 11270 -118.048550887
-1.2742749857 0.0215443469003 0.99 11270 -123.79836407
-1.2742749857 0.0464158883361 0.99 11252 -280.79855453
-1.2742749857 0.1 0.99 11252 -308.352622093
-2.63665089873 0.0001 0.99 11270 -113.312069367
-2.63665089873 0.000215443469003 0.99 11270 -113.363819983
-2.63665089873 0.000464158883361 0.99 11270 -113.468056936
-2.63665089873 0.001 0.99 11270 -113.700887552
-2.63665089873 0.00215443469003 0.99 11270 -114.184805752
-2.63665089873 0.00464158883361 0.99 11270 -115.267144506
-2.63665089873 0.01 0.99 11270 -117.489420257
-2.63665089873 0.0215443469003 0.99 11270 -122.61150377
-2.63665089873 0.0464158883361 0.99 11252 -274.722967048
-2.63665089873 0.1 0.99 11252 -300.950299288
-5.45559478117 0.0001 0.99 11270 -113.30769619
-5.45559478117 0.000215443469003 0.99 11270 -113.354395077
-5.45559478117 0.000464158883361 0.99 11270 -113.449140403
-5.45559478117 0.001 0.99 11270 -113.660092244
-5.45559478117 0.00215443469003 0.99 11270 -114.118293223
-5.45559478117 0.00464158883361 0.99 11270 -115.05657009
-5.45559478117 0.01 0.99 11270 -117.225546598
-5.45559478117 0.0215443469003 0.99 11270 -122.309983166
-5.45559478117 0.0464158883361 0.99 11252 -272.691305493
-5.45559478117 0.1 0.99 11252 -298.748786751
-11.2883789168 0.0001 0.99 11270 -113.30500313
-11.2883789168 0.000215443469003 0.99 11270 -113.348591188
-11.2883789168 0.000464158883361 0.99 11270 -113.442663109
-11.2883789168 0.001 0.99 11270 -113.646100664
-11.2883789168 0.00215443469003 0.99 11270 -114.087979353
-11.2883789168 0.00464158883361 0.99 11270 -115.010413933
-11.2883789168 0.01 0.99 11270 -117.125869036
-11.2883789168 0.0215443469003 0.99 11270 -122.09416956
-11.2883789168 0.0464158883361 0.99 11252 -272.14118842
-11.2883789168 0.1 0.99 11252 -298.67760181
-23.3572146909 0.0001 0.99 11270 -113.304003102
-23.3572146909 0.000215443469003 0.99 11270 -113.34643657
-23.3572146909 0.000464158883361 0.99 11270 -113.438020549
-23.3572146909 0.001 0.99 11270 -113.636095897
-23.3572146909 0.00215443469003 0.99 11270 -114.066412357
-23.3572146909 0.00464158883361 0.99 11270 -115.010415008
-23.3572146909 0.01 0.99 11270 -117.125871427
-23.3572146909 0.0215443469003 0.99 11270 -122.094175082
-23.3572146909 0.0464158883361 0.99 11252 -272.140966005
-23.3572146909 0.1 0.99 11252 -298.677392995
-48.3293023857 0.0001 0.99 11270 -113.304003102
-48.3293023857 0.000215443469003 0.99 11270 -113.34643657
-48.3293023857 0.000464158883361 0.99 11270 -113.438020549
-48.3293023857 0.001 0.99 11270 -113.636095897
-48.3293023857 0.00215443469003 0.99 11270 -114.066412357
-48.3293023857 0.00464158883361 0.99 11270 -115.010415008
-48.3293023857 0.01 0.99 11270 -117.125871427
-48.3293023857 0.0215443469003 0.99 11270 -122.094175082
-48.3293023857 0.0464158883361 0.99 11252 -272.140966004
-48.3293023857 0.1 0.99 11252 -298.677392994
-100.0 0.0001 0.99 11270 -113.304003102
-100.0 0.000215443469003 0.99 11270 -113.34643657
-100.0 0.000464158883361 0.99 11270 -113.438020549
-100.0 0.001 0.99 11270 -113.636095897
-100.0 0.00215443469003 0.99 11270 -114.066412357
-100.0 0.00464158883361 0.99 11270 -115.010415008
-100.0 0.01 0.99 11270 -117.125871427
-100.0 0.0215443469003 0.99 11270 -122.094175082
-100.0 0.0464158883361 0.99 11252 -272.140966004
-100.0 0.1 0.99 11252 -298.677392994
+0.001 0.01 0.9 11270 -1235.94455231
+0.001 0.06 0.9 11270 -1497.58353681
+0.001 0.11 0.9 11270 -1791.82756689
+0.001 0.16 0.9 11270 -2120.83864424
+0.001 0.21 0.9 11270 -2485.61829759
+0.001 0.26 0.9 11270 -2890.65007222
+0.001 0.31 0.9 11270 -3342.59356741
+0.001 0.36 0.9 11270 -3846.3226393
+0.001 0.41 0.9 11270 -4411.51697815
+0.001 0.46 0.9 11270 -5048.71533087
+0.001 0.51 0.9 11270 -5769.52501233
+0.001 0.56 0.9 11270 -6601.87542914
+0.001 0.61 0.9 11270 -7558.59151185
+0.001 0.66 0.9 11270 -8689.79286764
+0.001 0.71 0.9 11270 -10048.0400246
+0.001 0.76 0.9 10537 -17550.1894952
+0.001 0.81 0.9 8598 -34652.0699709
+0.001 0.86 0.9 7519 -44944.8645975
+0.001 0.91 0.1 1079 -78063.7266163
+0.001 0.96 0.1 1079 -77015.3927468
+0.011 0.01 0.9 11270 -1222.69818944
+0.011 0.06 0.9 11270 -1377.53201093
+0.011 0.11 0.9 11270 -1537.36386532
+0.011 0.16 0.9 11270 -1717.51950089
+0.011 0.21 0.9 11270 -1922.00088344
+0.011 0.26 0.9 10959 -4610.80058204
+0.011 0.31 0.9 10672 -7077.87090102
+0.011 0.36 0.9 10456 -8974.70255044
+0.011 0.41 0.9 10266 -10697.5964147
+0.011 0.46 0.9 10086 -12368.9655014
+0.011 0.51 0.9 8856 -22355.8974642
+0.011 0.56 0.9 8010 -29117.6282718
+0.011 0.61 0.9 6530 -40856.8115169
+0.011 0.66 0.9 4532 -56209.8799844
+0.011 0.71 0.9 3586 -62872.1359186
+0.011 0.76 0.3 1617 -62132.6169567
+0.011 0.81 0.3 1565 -61121.3902101
+0.011 0.86 0.2 1438 -60088.3528662
+0.011 0.91 0.2 1399 -59128.0775445
+0.011 0.96 0.2 1341 -58470.0225832
+0.021 0.01 0.9 11270 -1214.04551326
+0.021 0.06 0.9 11270 -1330.73246387
+0.021 0.11 0.9 11270 -1456.62381271
+0.021 0.16 0.9 11059 -3260.64871842
+0.021 0.21 0.9 10874 -4812.46263657
+0.021 0.26 0.9 10710 -6197.35392799
+0.021 0.31 0.9 10575 -7365.17181064
+0.021 0.36 0.9 10325 -9490.36468366
+0.021 0.41 0.9 9398 -16912.0611965
+0.021 0.46 0.9 8833 -21327.6179421
+0.021 0.51 0.9 7773 -29648.2097288
+0.021 0.56 0.9 5863 -44306.6372331
+0.021 0.61 0.9 4885 -51227.45571
+0.021 0.66 0.9 4227 -55485.9848343
+0.021 0.71 0.4 2271 -57280.1653111
+0.021 0.76 0.3 2103 -56414.4452354
+0.021 0.81 0.3 2019 -55749.3593972
+0.021 0.86 0.3 1936 -55195.1963149
+0.021 0.91 0.3 1845 -54855.19333
+0.021 0.96 0.2 1666 -54903.007711
+0.031 0.01 0.9 11270 -1209.52222373
+0.031 0.06 0.9 11270 -1307.50927167
+0.031 0.11 0.9 11153 -2336.72706182
+0.031 0.16 0.9 10966 -3865.22673884
+0.031 0.21 0.9 10836 -4939.33395311
+0.031 0.26 0.9 10721 -5912.08228219
+0.031 0.31 0.9 10404 -8518.91407353
+0.031 0.36 0.9 9703 -14065.140392
+0.031 0.41 0.9 9209 -17871.7429315
+0.031 0.46 0.9 7985 -27464.5220653
+0.031 0.51 0.9 6438 -39183.0588169
+0.031 0.56 0.9 5511 -45688.507994
+0.031 0.61 0.9 4913 -49477.7341042
+0.031 0.66 0.9 4470 -52029.5508204
+0.031 0.71 0.4 2632 -53866.8499645
+0.031 0.76 0.5 2664 -53291.479403
+0.031 0.81 0.4 2464 -52676.3252165
+0.031 0.86 0.3 2284 -52352.5289811
+0.031 0.91 0.3 2186 -52235.9092324
+0.031 0.96 0.3 2057 -52762.2254618
+0.041 0.01 0.9 11270 -1206.83236855
+0.041 0.06 0.9 11270 -1292.87581441
+0.041 0.11 0.9 11080 -2859.98631432
+0.041 0.16 0.9 10959 -3831.19706702
+0.041 0.21 0.9 10852 -4703.15006764
+0.041 0.26 0.9 10769 -5416.11250917
+0.041 0.31 0.9 10104 -10709.0420585
+0.041 0.36 0.9 9606 -14543.8742925
+0.041 0.41 0.9 9238 -17309.2540265
+0.041 0.46 0.9 7257 -32645.0231435
+0.041 0.51 0.9 6314 -39343.5688361
+0.041 0.56 0.9 5598 -44110.1120483
+0.041 0.61 0.9 5076 -47302.4209498
+0.041 0.66 0.9 4690 -49433.8427089
+0.041 0.71 0.9 4373 -51075.8879464
+0.041 0.76 0.5 2957 -50964.7570249
+0.041 0.81 0.4 2730 -50761.1300027
+0.041 0.86 0.4 2643 -50489.009108
+0.041 0.91 0.3 2461 -50608.0199443
+0.041 0.96 0.3 2315 -51476.0365659
+0.051 0.01 0.9 11270 -1204.83977874
+0.051 0.06 0.9 11240 -1522.34781142
+0.051 0.11 0.9 11035 -3170.36960086
+0.051 0.16 0.9 10959 -3767.28563206
+0.051 0.21 0.9 10874 -4464.68694637
+0.051 0.26 0.9 10528 -7251.1373603
+0.051 0.31 0.9 9964 -11648.4527756
+0.051 0.36 0.9 9631 -14137.3604665
+0.051 0.41 0.9 8220 -25136.8681988
+0.051 0.46 0.9 7119 -33227.1439366
+0.051 0.51 0.9 6303 -38855.8738361
+0.051 0.56 0.9 5735 -42439.6118286
+0.051 0.61 0.9 5257 -45305.9489123
+0.051 0.66 0.9 4915 -47126.1078472
+0.051 0.71 0.9 4638 -48510.2311457
+0.051 0.76 0.6 3354 -49206.1506578
+0.051 0.81 0.5 3106 -49019.738588
+0.051 0.86 0.5 2986 -49164.7329335
+0.051 0.91 0.3 2687 -49543.5796345
+0.051 0.96 0.3 2528 -50739.599255
+0.061 0.01 0.9 11270 -1203.34886368
+0.061 0.06 0.9 11203 -1802.55505297
+0.061 0.11 0.9 11035 -3131.53991721
+0.061 0.16 0.9 10966 -3670.29202883
+0.061 0.21 0.9 10900 -4211.60327342
+0.061 0.26 0.9 10427 -7960.0353384
+0.061 0.31 0.9 9953 -11606.3988067
+0.061 0.36 0.9 9673 -13668.2020128
+0.061 0.41 0.9 7978 -26748.8356819
+0.061 0.46 0.9 7068 -33231.2691289
+0.061 0.51 0.9 6368 -37923.1519265
+0.061 0.56 0.9 5870 -40962.3589617
+0.061 0.61 0.9 5482 -43141.3592512
+0.061 0.66 0.9 5113 -45231.8888558
+0.061 0.71 0.9 4857 -46502.0077178
+0.061 0.76 0.6 3594 -47579.0288296
+0.061 0.81 0.5 3329 -47691.6073876
+0.061 0.86 0.4 3114 -47905.571367
+0.061 0.91 0.4 2991 -48414.4479698
+0.061 0.96 0.3 2720 -50214.659259
+0.071 0.01 0.9 11270 -1202.10111278
+0.071 0.06 0.9 11180 -1969.44349536
+0.071 0.11 0.9 11035 -3104.17908186
+0.071 0.16 0.9 10980 -3526.39812295
+0.071 0.21 0.9 10837 -4684.8791109
+0.071 0.26 0.9 10322 -8719.48761504
+0.071 0.31 0.9 9986 -11240.4784303
+0.071 0.36 0.9 9156 -17668.0167737
+0.071 0.41 0.9 7899 -27108.4290407
+0.071 0.46 0.9 7127 -32447.197607
+0.071 0.51 0.9 6532 -36293.5346609
+0.071 0.56 0.9 6021 -39470.8780771
+0.071 0.61 0.9 5671 -41388.284524
+0.071 0.66 0.9 5322 -43375.5353223
+0.071 0.71 0.9 5080 -44581.7834224
+0.071 0.76 0.6 3859 -45797.0565566
+0.071 0.81 0.7 3881 -46407.9276684
+0.071 0.86 0.5 3426 -46769.4352774
+0.071 0.91 0.4 3186 -47632.0006616
+0.071 0.96 0.4 2997 -49509.0795382
+0.081 0.01 0.9 11270 -1201.25266217
+0.081 0.06 0.9 11169 -2043.26762391
+0.081 0.11 0.9 11035 -3081.48288928
+0.081 0.16 0.9 10990 -3424.31158739
+0.081 0.21 0.9 10714 -5631.20940178
+0.081 0.26 0.9 10341 -8495.90965272
+0.081 0.31 0.9 10011 -10966.3988847
+0.081 0.36 0.9 8985 -18877.2294037
+0.081 0.41 0.9 7792 -27726.3152879
+0.081 0.46 0.9 7160 -31936.0103692
+0.081 0.51 0.9 6584 -35646.7857019
+0.081 0.56 0.9 6160 -38158.9798255
+0.081 0.61 0.9 5816 -40071.5662599
+0.081 0.66 0.9 5481 -41991.9429525
+0.081 0.71 0.9 5220 -43400.1502178
+0.081 0.76 0.7 4265 -44330.1619379
+0.081 0.81 0.6 3913 -45021.7066353
+0.081 0.86 0.5 3611 -45908.3603509
+0.081 0.91 0.4 3367 -46974.0200481
+0.081 0.96 0.4 3180 -48989.2334862
+0.091 0.01 0.9 11270 -1200.54836745
+0.091 0.06 0.9 11169 -2030.88545415
+0.091 0.11 0.9 11035 -3066.51561307
+0.091 0.16 0.9 10997 -3353.8205368
+0.091 0.21 0.9 10666 -5975.23072717
+0.091 0.26 0.9 10297 -8792.09994332
+0.091 0.31 0.9 10024 -10801.1574237
+0.091 0.36 0.9 8772 -20425.1478076
+0.091 0.41 0.9 7833 -27205.6288113
+0.091 0.46 0.9 7219 -31268.8057899
+0.091 0.51 0.9 6708 -34480.4184519
+0.091 0.56 0.9 6295 -36929.4133741
+0.091 0.61 0.9 5979 -38657.3479431
+0.091 0.66 0.9 5663 -40469.73473
+0.091 0.71 0.9 5424 -41749.7357852
+0.091 0.76 0.8 4698 -43274.8358113
+0.091 0.81 0.7 4282 -43910.092196
+0.091 0.86 0.6 3949 -44772.6201162
+0.091 0.91 0.5 3636 -46214.4498464
+0.091 0.96 0.4 3331 -48709.0544781
+0.101 0.01 0.9 11270 -1199.81808293
+0.101 0.06 0.9 11153 -2147.28233492
+0.101 0.11 0.9 11059 -2861.05004543
+0.101 0.16 0.9 11007 -3260.3327484
+0.101 0.21 0.9 10672 -5893.56123241
+0.101 0.26 0.9 10308 -8656.03282783
+0.101 0.31 0.9 10045 -10586.8230567
+0.101 0.36 0.9 8621 -21498.1214915
+0.101 0.41 0.9 7871 -26734.1841894
+0.101 0.46 0.9 7254 -30835.9190577
+0.101 0.51 0.9 6826 -33393.8392132
+0.101 0.56 0.9 6414 -35866.6155382
+0.101 0.61 0.9 6115 -37493.5694559
+0.101 0.66 0.9 5854 -38911.5557931
+0.101 0.71 0.9 5600 -40359.8293324
+0.101 0.76 0.8 4922 -41682.7647705
+0.101 0.81 0.7 4470 -42788.5697932
+0.101 0.86 0.6 4135 -43804.1159551
+0.101 0.91 0.5 3809 -45526.8822086
+0.101 0.96 0.5 3568 -48359.5850194
+0.111 0.01 0.9 11270 -1199.07725405
+0.111 0.06 0.9 11153 -2138.27358348
+0.111 0.11 0.9 11059 -2851.14422668
+0.111 0.16 0.9 11007 -3253.04930941
+0.111 0.21 0.9 10611 -6349.06168715
+0.111 0.26 0.9 10331 -8431.095932
+0.111 0.31 0.9 9777 -12677.0398621
+0.111 0.36 0.9 8670 -20980.0592515
+0.111 0.41 0.9 7913 -26267.9882357
+0.111 0.46 0.9 7293 -30393.2985807
+0.111 0.51 0.9 6881 -32847.876728
+0.111 0.56 0.9 6538 -34797.8016272
+0.111 0.61 0.9 6233 -36522.9590164
+0.111 0.66 0.9 6029 -37508.3089527
+0.111 0.71 0.9 5759 -39144.5028098
+0.111 0.76 0.9 5540 -40508.1646818
+0.111 0.81 0.8 4876 -41898.2671505
+0.111 0.86 0.6 4290 -43082.1918108
+0.111 0.91 0.6 4102 -44732.5684745
+0.111 0.96 0.5 3727 -47892.8151093
+0.121 0.01 0.9 11270 -1198.62943998
+0.121 0.06 0.9 11153 -2130.1652116
+0.121 0.11 0.9 11080 -2675.48127934
+0.121 0.16 0.9 10931 -3855.64420047
+0.121 0.21 0.9 10621 -6238.63916742
+0.121 0.26 0.9 10335 -8370.30066936
+0.121 0.31 0.9 9512 -14735.2128364
+0.121 0.36 0.9 8488 -22330.1858115
+0.121 0.41 0.9 7941 -25922.3418589
+0.121 0.46 0.9 7461 -28938.2535381
+0.121 0.51 0.9 7018 -31667.6125506
+0.121 0.56 0.9 6681 -33605.4034311
+0.121 0.61 0.9 6442 -34822.8847373
+0.121 0.66 0.9 6156 -36513.5640506
+0.121 0.71 0.9 5882 -38215.4906343
+0.121 0.76 0.9 5636 -39837.8901864
+0.121 0.81 0.8 5026 -40978.5055862
+0.121 0.86 0.7 4628 -42114.6851831
+0.121 0.91 0.5 4143 -44157.2418313
+0.121 0.96 0.6 4000 -47409.2196946
+0.131 0.01 0.9 11270 -1198.19157625
+0.131 0.06 0.9 11153 -2123.16539876
+0.131 0.11 0.9 11080 -2668.94388764
+0.131 0.16 0.9 10944 -3741.16417244
+0.131 0.21 0.9 10628 -6159.78480642
+0.131 0.26 0.9 10348 -8239.68316231
+0.131 0.31 0.9 9525 -14568.1084239
+0.131 0.36 0.9 8530 -21891.6453284
+0.131 0.41 0.9 7947 -25772.9445912
+0.131 0.46 0.9 7481 -28690.8895588
+0.131 0.51 0.9 7045 -31397.8478977
+0.131 0.56 0.9 6802 -32598.6346733
+0.131 0.61 0.9 6463 -34659.107881
+0.131 0.66 0.9 6260 -35706.4897595
+0.131 0.71 0.9 6054 -36913.4661714
+0.131 0.76 0.9 5798 -38660.627405
+0.131 0.81 0.7 4942 -40072.5136157
+0.131 0.86 0.7 4783 -41269.245399
+0.131 0.91 0.6 4412 -43382.90288
+0.131 0.96 0.5 4043 -46895.6874409
+0.141 0.01 0.9 11270 -1197.8225728
+0.141 0.06 0.9 11153 -2117.30838557
+0.141 0.11 0.9 11080 -2663.69690283
+0.141 0.16 0.9 10861 -4395.98913246
+0.141 0.21 0.9 10567 -6627.42594103
+0.141 0.26 0.9 10358 -8140.96493321
+0.141 0.31 0.9 9305 -16268.9889165
+0.141 0.36 0.9 8541 -21715.5780427
+0.141 0.41 0.9 7975 -25469.3192696
+0.141 0.46 0.9 7518 -28332.1433079
+0.141 0.51 0.9 7188 -30202.7459126
+0.141 0.56 0.9 6923 -31613.8218769
+0.141 0.61 0.9 6593 -33619.8802451
+0.141 0.66 0.9 6367 -34902.0786501
+0.141 0.71 0.9 6179 -35994.9501591
+0.141 0.76 0.9 5905 -37910.6146525
+0.141 0.81 0.9 5717 -39361.0502839
+0.141 0.86 0.7 4894 -40777.3087442
+0.141 0.91 0.6 4544 -42859.6542296
+0.141 0.96 0.5 4171 -46595.9656263
+0.151 0.01 0.9 11270 -1197.4154511
+0.151 0.06 0.9 11153 -2111.90902351
+0.151 0.11 0.9 11091 -2570.10740248
+0.151 0.16 0.9 10869 -4320.52230135
+0.151 0.21 0.9 10574 -6553.838621
+0.151 0.26 0.9 10365 -8067.74460437
+0.151 0.31 0.9 9315 -16124.8919445
+0.151 0.36 0.9 8573 -21388.1363242
+0.151 0.41 0.9 8003 -25174.8431895
+0.151 0.46 0.9 7666 -27096.4108426
+0.151 0.51 0.9 7204 -30047.2884085
+0.151 0.56 0.9 6944 -31439.5557342
+0.151 0.61 0.9 6723 -32603.4307864
+0.151 0.66 0.9 6495 -33929.9092008
+0.151 0.71 0.9 6284 -35224.9189589
+0.151 0.76 0.9 6076 -36671.7052414
+0.151 0.81 0.9 5819 -38710.4729462
+0.151 0.86 0.7 5003 -40298.743542
+0.151 0.91 0.7 4838 -42161.1786375
+0.151 0.96 0.6 4421 -46008.7728378
+0.161 0.01 0.9 11270 -1197.0287251
+0.161 0.06 0.9 11153 -2107.47491
+0.161 0.11 0.9 11091 -2566.74532688
+0.161 0.16 0.9 10893 -4117.88502477
+0.161 0.21 0.9 10574 -6537.9619625
+0.161 0.26 0.9 10437 -7477.05552796
+0.161 0.31 0.9 9321 -16021.1356358
+0.161 0.36 0.9 8581 -21259.157907
+0.161 0.41 0.9 8012 -25049.4687481
+0.161 0.46 0.9 7667 -27039.1948957
+0.161 0.51 0.9 7377 -28639.1550313
+0.161 0.56 0.9 7078 -30365.2733974
+0.161 0.61 0.9 6832 -31757.1456424
+0.161 0.66 0.9 6622 -32967.5653699
+0.161 0.71 0.9 6388 -34486.7771046
+0.161 0.76 0.9 6187 -35904.9751449
+0.161 0.81 0.9 5926 -38022.5811257
+0.161 0.86 0.8 5359 -39576.3632061
+0.161 0.91 0.7 4953 -41666.62476
+0.161 0.96 0.5 4422 -45911.376638
+0.171 0.01 0.9 11270 -1196.73076003
+0.171 0.06 0.9 11153 -2103.48189573
+0.171 0.11 0.9 11107 -2435.16925788
+0.171 0.16 0.9 10893 -4108.47769328
+0.171 0.21 0.9 10586 -6429.06677304
+0.171 0.26 0.9 10437 -7467.04559628
+0.171 0.31 0.9 9326 -15936.8534882
+0.171 0.36 0.9 8586 -21164.0088886
+0.171 0.41 0.9 8204 -23462.7367275
+0.171 0.46 0.9 7700 -26747.7471921
+0.171 0.51 0.9 7378 -28617.1318567
+0.171 0.56 0.9 7092 -30263.767454
+0.171 0.61 0.9 6853 -31622.636955
+0.171 0.66 0.9 6747 -32019.9528376
+0.171 0.71 0.9 6496 -33709.9384912
+0.171 0.76 0.9 6294 -35174.3832828
+0.171 0.81 0.9 6100 -36794.7745841
+0.171 0.86 0.6 5104 -39259.5798338
+0.171 0.91 0.7 5050 -41304.9882533
+0.171 0.96 0.7 4797 -45341.1564105
+0.181 0.01 0.9 11270 -1196.56591145
+0.181 0.06 0.9 11169 -1972.04238893
+0.181 0.11 0.9 11107 -2433.53221554
+0.181 0.16 0.9 10827 -4630.02349191
+0.181 0.21 0.9 10592 -6368.8051284
+0.181 0.26 0.9 10444 -7401.31137997
+0.181 0.31 0.9 9388 -15393.8041076
+0.181 0.36 0.9 8617 -20868.675239
+0.181 0.41 0.9 8210 -23372.22662
+0.181 0.46 0.9 7865 -25401.3311905
+0.181 0.51 0.9 7552 -27214.6801079
+0.181 0.56 0.9 7234 -29141.7733784
+0.181 0.61 0.9 6977 -30660.2027093
+0.181 0.66 0.9 6767 -31918.0613079
+0.181 0.71 0.9 6624 -32780.2261813
+0.181 0.76 0.9 6411 -34362.430381
+0.181 0.81 0.9 6208 -36078.5410196
+0.181 0.86 0.8 5576 -38417.1219896
+0.181 0.91 0.7 5168 -40777.9103515
+0.181 0.96 0.7 4899 -45031.9310655
+0.191 0.01 0.9 11270 -1196.37210292
+0.191 0.06 0.9 11169 -1968.29124926
+0.191 0.11 0.9 11107 -2431.02192776
+0.191 0.16 0.9 10847 -4459.76152596
+0.191 0.21 0.9 10592 -6360.02626558
+0.191 0.26 0.9 10091 -10210.9208216
+0.191 0.31 0.9 9121 -17494.704258
+0.191 0.36 0.9 8621 -20788.2784266
+0.191 0.41 0.9 8246 -23049.086972
+0.191 0.46 0.9 7869 -25341.2516291
+0.191 0.51 0.9 7575 -27032.2658396
+0.191 0.56 0.9 7241 -29103.832798
+0.191 0.61 0.9 7093 -29772.3696035
+0.191 0.66 0.9 6882 -31063.31669
+0.191 0.71 0.9 6650 -32662.6718897
+0.191 0.76 0.9 6519 -33610.7241693
+0.191 0.81 0.9 6306 -35440.7437302
+0.191 0.86 0.8 5677 -37898.2095937
+0.191 0.91 0.6 5122 -40593.5645864
+0.191 0.96 0.6 4852 -44819.8983879
+0.201 0.01 0.9 11270 -1196.11582027
+0.201 0.06 0.9 11169 -1965.23605766
+0.201 0.11 0.9 11107 -2429.9714509
+0.201 0.16 0.9 10847 -4450.14374948
+0.201 0.21 0.9 10615 -6167.13300528
+0.201 0.26 0.9 10091 -10187.6514905
+0.201 0.31 0.9 9128 -17400.4503785
+0.201 0.36 0.9 8661 -20434.1260413
+0.201 0.41 0.9 8250 -22986.9213603
+0.201 0.46 0.9 7900 -25082.8155077
+0.201 0.51 0.9 7579 -27003.9264339
+0.201 0.56 0.9 7410 -27770.3856411
+0.201 0.61 0.9 7126 -29555.3923523
+0.201 0.66 0.9 6978 -30363.9488652
+0.201 0.71 0.9 6769 -31790.6160582
+0.201 0.76 0.9 6522 -33697.8827815
+0.201 0.81 0.9 6330 -35405.8385753
+0.201 0.86 0.7 5576 -37464.2949332
+0.201 0.91 0.7 5380 -39856.7427073
+0.201 0.96 0.6 4962 -44456.6211665
+0.211 0.01 0.9 11270 -1195.91344748
+0.211 0.06 0.9 11169 -1962.12668514
+0.211 0.11 0.9 11114 -2373.16770777
+0.211 0.16 0.9 10858 -4353.40728329
+0.211 0.21 0.9 10615 -6161.70760772
+0.211 0.26 0.9 10097 -10123.7735703
+0.211 0.31 0.9 9138 -17280.3962659
+0.211 0.36 0.9 8667 -20352.1976795
+0.211 0.41 0.9 8255 -22922.6930157
+0.211 0.46 0.9 7904 -25041.9118107
+0.211 0.51 0.9 7735 -25756.7373154
+0.211 0.56 0.9 7435 -27597.5622137
+0.211 0.61 0.9 7242 -28676.5701224
+0.211 0.66 0.9 6997 -30284.2291628
+0.211 0.71 0.9 6883 -30973.9416751
+0.211 0.76 0.9 6650 -32788.75803
+0.211 0.81 0.9 6436 -34704.8353937
+0.211 0.86 0.9 6225 -36941.9317179
+0.211 0.91 0.8 5680 -39409.063966
+0.211 0.96 0.6 5061 -44163.5126243
+0.221 0.01 0.9 11270 -1195.77018265
+0.221 0.06 0.9 11169 -1959.91569033
+0.221 0.11 0.9 11114 -2372.91452154
+0.221 0.16 0.9 10858 -4345.85246221
+0.221 0.21 0.9 10634 -6006.0231078
+0.221 0.26 0.9 10097 -10108.2930726
+0.221 0.31 0.9 9183 -16888.7089089
+0.221 0.36 0.9 8667 -20327.353713
+0.221 0.41 0.9 8282 -22691.373689
+0.221 0.46 0.9 8055 -23832.1140979
+0.221 0.51 0.9 7735 -25760.5921585
+0.221 0.56 0.9 7579 -26479.338211
+0.221 0.61 0.9 7264 -28552.7998189
+0.221 0.66 0.9 7127 -29306.7738041
+0.221 0.71 0.9 6883 -31051.4473237
+0.221 0.76 0.9 6769 -31955.926566
+0.221 0.81 0.9 6545 -33969.6791884
+0.221 0.86 0.9 6330 -36286.4484532
+0.221 0.91 0.8 5763 -39053.5107766
+0.221 0.96 0.6 5123 -44123.5975965
+0.231 0.01 0.9 11270 -1195.53548375
+0.231 0.06 0.9 11169 -1958.32363203
+0.231 0.11 0.9 11114 -2371.60957663
+0.231 0.16 0.9 10858 -4339.81963039
+0.231 0.21 0.9 10634 -5998.91441164
+0.231 0.26 0.9 10173 -9483.6447953
+0.231 0.31 0.9 9189 -16809.3194061
+0.231 0.36 0.9 8674 -20241.3748271
+0.231 0.41 0.9 8288 -22628.440921
+0.231 0.46 0.9 8091 -23527.6773008
+0.231 0.51 0.9 7765 -25538.2036676
+0.231 0.56 0.9 7608 -26274.568355
+0.231 0.61 0.9 7268 -28579.7623211
+0.231 0.66 0.9 7127 -29364.7962888
+0.231 0.71 0.9 6997 -30232.8277997
+0.231 0.76 0.9 6796 -31855.1999595
+0.231 0.81 0.9 6652 -33259.6929855
+0.231 0.86 0.9 6436 -35618.2275886
+0.231 0.91 0.8 5846 -38662.5863494
+0.231 0.96 0.7 5381 -43426.7072863
+0.241 0.01 0.9 11270 -1195.47518773
+0.241 0.06 0.9 11169 -1956.26756146
+0.241 0.11 0.9 11114 -2371.31830695
+0.241 0.16 0.9 10874 -4205.44697568
+0.241 0.21 0.9 10706 -5418.13322558
+0.241 0.26 0.9 9863 -11947.245265
+0.241 0.31 0.9 9189 -16784.1995151
+0.241 0.36 0.9 8719 -19861.8039047
+0.241 0.41 0.9 8446 -21354.5538951
+0.241 0.46 0.9 8091 -23530.3841275
+0.241 0.51 0.9 7909 -24402.3914832
+0.241 0.56 0.9 7612 -26277.2917071
+0.241 0.61 0.9 7440 -27231.0666435
+0.241 0.66 0.9 7268 -28311.9277146
+0.241 0.71 0.9 7021 -30134.5550579
+0.241 0.76 0.9 6890 -31205.5388018
+0.241 0.81 0.9 6666 -33288.3231929
+0.241 0.86 0.8 6126 -35579.8373845
+0.241 0.91 0.8 5951 -38099.0994561
+0.241 0.96 0.7 5448 -43299.7992235
+0.251 0.01 0.9 11270 -1195.29103252
+0.251 0.06 0.9 11169 -1954.72902695
+0.251 0.11 0.9 11134 -2211.27903959
+0.251 0.16 0.9 10874 -4200.93925923
+0.251 0.21 0.9 10717 -5327.3344992
+0.251 0.26 0.9 9879 -11795.7744839
+0.251 0.31 0.9 9203 -16643.8199584
+0.251 0.36 0.9 8725 -19793.5221863
+0.251 0.41 0.9 8483 -21043.1629648
+0.251 0.46 0.9 8123 -23280.9916824
+0.251 0.51 0.9 7940 -24172.9869217
+0.251 0.56 0.9 7612 -26317.9829041
+0.251 0.61 0.9 7444 -27250.0959016
+0.251 0.66 0.9 7271 -28359.2154696
+0.251 0.71 0.9 7129 -29353.4907886
+0.251 0.76 0.9 6903 -31215.4250853
+0.251 0.81 0.9 6803 -32328.4796557
+0.251 0.86 0.8 6226 -34988.652376
+0.251 0.91 0.8 6035 -37699.9416812
+0.251 0.96 0.7 5514 -43171.2734115
+0.261 0.01 0.9 11270 -1195.19771735
+0.261 0.06 0.9 11169 -1953.52277371
+0.261 0.11 0.9 11134 -2210.45925715
+0.261 0.16 0.9 10874 -4195.99216219
+0.261 0.21 0.9 10717 -5323.06958101
+0.261 0.26 0.9 9879 -11775.8402128
+0.261 0.31 0.9 9203 -16623.2220227
+0.261 0.36 0.9 8725 -19780.6281387
+0.261 0.41 0.9 8483 -21031.3047736
+0.261 0.46 0.9 8123 -23288.4771815
+0.261 0.51 0.9 7946 -24145.8719236
+0.261 0.56 0.9 7770 -25063.0021664
+0.261 0.61 0.9 7612 -25959.7256225
+0.261 0.66 0.9 7292 -28266.3410832
+0.261 0.71 0.9 7152 -29260.26434
+0.261 0.76 0.9 7021 -30382.4314288
+0.261 0.81 0.9 6803 -32441.3240879
+0.261 0.86 0.9 6666 -34250.9105369
+0.261 0.91 0.9 6437 -37502.3791835
+0.261 0.96 0.7 5596 -42902.0695088
+0.271 0.01 0.9 11270 -1195.16420318
+0.271 0.06 0.9 11180 -1864.21520807
+0.271 0.11 0.9 11134 -2210.29894437
+0.271 0.16 0.9 10874 -4191.85040734
+0.271 0.21 0.9 10717 -5319.50235156
+0.271 0.26 0.9 9879 -11754.9252657
+0.271 0.31 0.9 9246 -16256.1819985
+0.271 0.36 0.9 8725 -19769.4516064
+0.271 0.41 0.9 8489 -20980.8703281
+0.271 0.46 0.9 8295 -21920.9417751
+0.271 0.51 0.9 7946 -24171.1888447
+0.271 0.56 0.9 7770 -25099.8527993
+0.271 0.61 0.9 7617 -25969.4807708
+0.271 0.66 0.9 7444 -27110.6209563
+0.271 0.71 0.9 7271 -28401.8980977
+0.271 0.76 0.9 7023 -30477.7227704
+0.271 0.81 0.9 6903 -31758.5254464
+0.271 0.86 0.9 6697 -34163.0231046
+0.271 0.91 0.8 6137 -37409.8696626
+0.271 0.96 0.7 5683 -42578.0811648
+0.281 0.01 0.9 11270 -1194.9134648
+0.281 0.06 0.9 11180 -1863.42330795
+0.281 0.11 0.9 11050 -2883.28524331
+0.281 0.16 0.9 10881 -4132.02434425
+0.281 0.21 0.9 10733 -5188.25151321
+0.281 0.26 0.9 9888 -11664.1043082
+0.281 0.31 0.9 9259 -16134.0752755
+0.281 0.36 0.9 8979 -17713.5706644
+0.281 0.41 0.9 8531 -20643.0235764
+0.281 0.46 0.9 8295 -21930.7117434
+0.281 0.51 0.9 8130 -22705.6523788
+0.281 0.56 0.9 7807 -24843.3597321
+0.281 0.61 0.9 7640 -25829.3992706
+0.281 0.66 0.9 7468 -26987.0247084
+0.281 0.71 0.9 7296 -28288.145347
+0.281 0.76 0.9 7155 -29499.9005534
+0.281 0.81 0.9 6927 -31697.7364551
+0.281 0.86 0.9 6803 -33465.604738
+0.281 0.91 0.8 6229 -36923.9721011
+0.281 0.96 0.8 5955 -42183.2964692
+0.291 0.01 0.9 11270 -1194.85059466
+0.291 0.06 0.9 11180 -1861.41044244
+0.291 0.11 0.9 11050 -2881.31026207
+0.291 0.16 0.9 10881 -4129.4155542
+0.291 0.21 0.9 10733 -5187.00056536
+0.291 0.26 0.9 9888 -11648.6287776
+0.291 0.31 0.9 9259 -16116.270677
+0.291 0.36 0.9 8979 -17701.5873282
+0.291 0.41 0.9 8543 -20548.1485275
+0.291 0.46 0.9 8329 -21666.4297738
+0.291 0.51 0.9 8130 -22725.7736335
+0.291 0.56 0.9 7946 -23769.2587914
+0.291 0.61 0.9 7646 -25836.969377
+0.291 0.66 0.9 7473 -27018.497507
+0.291 0.71 0.9 7296 -28378.0042916
+0.291 0.76 0.9 7155 -29604.5303665
+0.291 0.81 0.9 7023 -31053.2939097
+0.291 0.86 0.8 6547 -33266.9725453
+0.291 0.91 0.8 6334 -36326.9545151
+0.291 0.96 0.7 5851 -41927.6601993
+0.301 0.01 0.9 11270 -1194.70990396
+0.301 0.06 0.9 11180 -1860.22085122
+0.301 0.11 0.9 11069 -2727.43950367
+0.301 0.16 0.9 10881 -4125.87935789
+0.301 0.21 0.9 10733 -5185.99844002
+0.301 0.26 0.9 9888 -11631.8435828
+0.301 0.31 0.9 9259 -16098.4124257
+0.301 0.36 0.9 8991 -17595.8964887
+0.301 0.41 0.9 8543 -20551.2947056
+0.301 0.46 0.9 8329 -21672.1744942
+0.301 0.51 0.9 8136 -22701.4615044
+0.301 0.56 0.9 7953 -23740.4128292
+0.301 0.61 0.9 7776 -24845.8581685
+0.301 0.66 0.9 7640 -25748.7713635
+0.301 0.71 0.9 7473 -27021.0134469
+0.301 0.76 0.9 7179 -29520.5912753
+0.301 0.81 0.8 6803 -30729.3754603
+0.301 0.86 0.9 6905 -32945.6436102
+0.301 0.91 0.9 6673 -36361.0341871
+0.301 0.96 0.8 6050 -42011.9035068
+0.311 0.01 0.9 11270 -1194.56535206
+0.311 0.06 0.9 11180 -1859.74649869
+0.311 0.11 0.9 11069 -2724.72250093
+0.311 0.16 0.9 10881 -4122.99202932
+0.311 0.21 0.9 10733 -5183.92837298
+0.311 0.26 0.9 9888 -11619.2043029
+0.311 0.31 0.9 9267 -16018.2114877
+0.311 0.36 0.9 8991 -17585.7101977
+0.311 0.41 0.9 8543 -20554.9894475
+0.311 0.46 0.9 8340 -21592.5085753
+0.311 0.51 0.9 8136 -22727.9761621
+0.311 0.56 0.9 7978 -23578.23491
+0.311 0.61 0.9 7814 -24591.6987493
+0.311 0.66 0.9 7646 -25762.6351628
+0.311 0.71 0.9 7473 -27099.8057077
+0.311 0.76 0.9 7296 -28681.7004311
+0.311 0.81 0.9 7155 -30243.6255836
+0.311 0.86 0.8 6673 -32650.4650296
+0.311 0.91 0.8 6439 -35936.0435391
+0.311 0.96 0.8 6137 -41604.4743591
+0.321 0.01 0.9 11270 -1194.44476003
+0.321 0.06 0.9 11180 -1858.39340351
+0.321 0.11 0.9 11069 -2722.56958889
+0.321 0.16 0.9 10901 -3959.37157665
+0.321 0.21 0.9 10740 -5126.52029398
+0.321 0.26 0.9 9952 -11091.5332152
+0.321 0.31 0.9 9267 -16006.6085404
+0.321 0.36 0.9 8991 -17579.7197849
+0.321 0.41 0.9 8748 -18912.8533632
+0.321 0.46 0.9 8382 -21273.2766416
+0.321 0.51 0.9 8164 -22524.3800938
+0.321 0.56 0.9 7984 -23569.552024
+0.321 0.61 0.9 7814 -24643.8839636
+0.321 0.66 0.9 7646 -25822.0861369
+0.321 0.71 0.9 7478 -27142.2374096
+0.321 0.76 0.9 7301 -28742.7703444
+0.321 0.81 0.9 7159 -30329.2614231
+0.321 0.86 0.9 7026 -32252.1856096
+0.321 0.91 0.9 6816 -35560.3191957
+0.321 0.96 0.8 6229 -41151.5121859
+0.331 0.01 0.9 11270 -1194.30119818
+0.331 0.06 0.9 11180 -1858.09804401
+0.331 0.11 0.9 11069 -2720.49358302
+0.331 0.16 0.9 10901 -3956.98976271
+0.331 0.21 0.9 10740 -5127.0376214
+0.331 0.26 0.9 9952 -11075.3916323
+0.331 0.31 0.9 9314 -15619.8937066
+0.331 0.36 0.9 9041 -17175.1493458
+0.331 0.41 0.9 8791 -18570.1373871
+0.331 0.46 0.9 8382 -21290.3875502
+0.331 0.51 0.9 8172 -22489.9518807
+0.331 0.56 0.9 7984 -23611.675454
+0.331 0.61 0.9 7814 -24697.9225175
+0.331 0.66 0.9 7814 -24528.5212146
+0.331 0.71 0.9 7646 -25879.0534644
+0.331 0.76 0.9 7473 -27467.0001286
+0.331 0.81 0.9 7179 -30288.480625
+0.331 0.86 0.8 6804 -31956.780457
+0.331 0.91 0.8 6560 -35403.9924044
+0.331 0.96 0.7 6127 -40998.2019324
+0.341 0.01 0.9 11270 -1194.30119818
+0.341 0.06 0.9 11180 -1857.32918772
+0.341 0.11 0.9 11069 -2719.27982417
+0.341 0.16 0.9 10901 -3955.23868304
+0.341 0.21 0.9 10740 -5125.7703441
+0.341 0.26 0.9 9952 -11063.2941987
+0.341 0.31 0.9 9314 -15608.0351152
+0.341 0.36 0.9 9041 -17168.0902291
+0.341 0.41 0.9 8791 -18566.3319314
+0.341 0.46 0.9 8553 -19933.2676058
+0.341 0.51 0.9 8340 -21170.4047724
+0.341 0.56 0.9 8136 -22432.5500241
+0.341 0.61 0.9 7984 -23377.2625329
+0.341 0.66 0.9 7814 -24586.0406147
+0.341 0.71 0.9 7646 -25951.6955437
+0.341 0.76 0.9 7478 -27516.3642816
+0.341 0.81 0.9 7301 -29413.0937812
+0.341 0.86 0.8 6816 -32034.0106104
+0.341 0.91 0.9 6905 -35177.4618458
+0.341 0.96 0.8 6334 -40844.2510351
+0.351 0.01 0.9 11252 -1338.40518946
+0.351 0.06 0.9 11180 -1857.1919522
+0.351 0.11 0.9 11069 -2717.20051415
+0.351 0.16 0.9 10901 -3952.26977664
+0.351 0.21 0.9 10740 -5126.05646444
+0.351 0.26 0.9 9952 -11049.603161
+0.351 0.31 0.9 9327 -15494.4226273
+0.351 0.36 0.9 9041 -17158.9986091
+0.351 0.41 0.9 8791 -18570.3611887
+0.351 0.46 0.9 8553 -19940.222645
+0.351 0.51 0.9 8340 -21195.5936606
+0.351 0.56 0.9 8172 -22178.7041508
+0.351 0.61 0.9 7984 -23424.9492451
+0.351 0.66 0.9 7819 -24606.4234144
+0.351 0.71 0.9 7651 -25986.7496196
+0.351 0.76 0.9 7501 -27414.0589407
+0.351 0.81 0.9 7324 -29339.714821
+0.351 0.86 0.8 6905 -31496.4186161
+0.351 0.91 0.8 6698 -34711.2503078
+0.351 0.96 0.7 6251 -40591.3355265
+0.361 0.01 0.9 11252 -1337.88891421
+0.361 0.06 0.9 11180 -1856.57740099
+0.361 0.11 0.9 11069 -2716.31957104
+0.361 0.16 0.9 10901 -3951.12968706
+0.361 0.21 0.9 10740 -5127.68094281
+0.361 0.26 0.9 9957 -10999.0123399
+0.361 0.31 0.9 9327 -15484.3444076
+0.361 0.36 0.9 9041 -17157.347255
+0.361 0.41 0.9 8797 -18527.8600317
+0.361 0.46 0.9 8553 -19955.9780558
+0.361 0.51 0.9 8392 -20804.7374333
+0.361 0.56 0.9 8172 -22209.3676977
+0.361 0.61 0.9 7984 -23459.9311826
+0.361 0.66 0.9 7819 -24669.0321971
+0.361 0.71 0.9 7681 -25822.6759347
+0.361 0.76 0.9 7506 -27466.3579193
+0.361 0.81 0.9 7329 -29410.9958165
+0.361 0.86 0.8 6927 -31485.9151184
+0.361 0.91 0.9 7026 -34525.8474732
+0.361 0.96 0.8 6460 -40334.1522535
+0.371 0.01 0.9 11252 -1337.43135587
+0.371 0.06 0.9 11180 -1856.58084271
+0.371 0.11 0.9 11085 -2586.04009608
+0.371 0.16 0.9 10901 -3949.20017854
+0.371 0.21 0.9 10759 -4977.09085749
+0.371 0.26 0.9 9957 -10989.2712174
+0.371 0.31 0.9 9327 -15477.5573771
+0.371 0.36 0.9 9053 -17056.2588016
+0.371 0.41 0.9 8797 -18535.1799357
+0.371 0.46 0.9 8593 -19652.8823364
+0.371 0.51 0.9 8392 -20828.8914046
+0.371 0.56 0.9 8172 -22248.5648359
+0.371 0.61 0.9 7992 -23447.03228
+0.371 0.66 0.9 7841 -24556.510562
+0.371 0.71 0.9 7819 -24781.883403
+0.371 0.76 0.9 7651 -26391.3536286
+0.371 0.81 0.9 7478 -28323.1499375
+0.371 0.86 0.8 6930 -31627.5328797
+0.371 0.91 0.8 6818 -34133.174051
+0.371 0.96 0.7 6355 -40304.1973374
+0.381 0.01 0.9 11252 -1337.03697749
+0.381 0.06 0.9 11180 -1856.15567577
+0.381 0.11 0.9 11085 -2583.53474345
+0.381 0.16 0.9 10920 -3795.60093962
+0.381 0.21 0.9 10759 -4975.7142935
+0.381 0.26 0.9 9957 -10978.845202
+0.381 0.31 0.9 9327 -15472.1664221
+0.381 0.36 0.9 9053 -17056.2445314
+0.381 0.41 0.9 8797 -18538.2526835
+0.381 0.46 0.9 8598 -19629.5345973
+0.381 0.51 0.9 8392 -20856.3446839
+0.381 0.56 0.9 8182 -22209.4031615
+0.381 0.61 0.9 8020 -23274.7675801
+0.381 0.66 0.9 7992 -23404.7398336
+0.381 0.71 0.9 7819 -24849.312304
+0.381 0.76 0.9 7651 -26474.3816647
+0.381 0.81 0.9 7501 -28239.0099857
+0.381 0.86 0.9 7324 -30652.5990819
+0.381 0.91 0.8 6818 -34318.6411321
+0.381 0.96 0.8 6567 -39941.4429019
+0.391 0.01 0.9 11252 -1336.5195599
+0.391 0.06 0.9 11189 -1783.99754981
+0.391 0.11 0.9 11085 -2582.09864816
+0.391 0.16 0.9 10920 -3792.43828046
+0.391 0.21 0.9 10359 -8176.39602443
+0.391 0.26 0.9 9957 -10970.7014522
+0.391 0.31 0.9 9331 -15430.5210654
+0.391 0.36 0.9 9053 -17057.7397155
+0.391 0.41 0.9 8837 -18226.8106874
+0.391 0.46 0.9 8598 -19646.7391823
+0.391 0.51 0.9 8392 -20879.9352773
+0.391 0.56 0.9 8222 -21917.515197
+0.391 0.61 0.9 8172 -22101.3363049
+0.391 0.66 0.9 7992 -23460.4109899
+0.391 0.71 0.9 7819 -24919.0908337
+0.391 0.76 0.9 7686 -26276.820614
+0.391 0.81 0.9 7506 -28298.8606749
+0.391 0.86 0.9 7329 -30727.6065887
+0.391 0.91 0.8 6908 -33783.272261
+0.391 0.96 0.7 6460 -39971.2531849
+0.401 0.01 0.9 11252 -1336.04857239
+0.401 0.06 0.9 11189 -1783.92032617
+0.401 0.11 0.9 11085 -2580.9907917
+0.401 0.16 0.9 10920 -3790.24171207
+0.401 0.21 0.9 10359 -8168.08388863
+0.401 0.26 0.9 9957 -10961.7365515
+0.401 0.31 0.9 9331 -15426.970613
+0.401 0.36 0.9 9098 -16699.9324524
+0.401 0.41 0.9 8849 -18139.7347165
+0.401 0.46 0.9 8598 -19666.7813852
+0.401 0.51 0.9 8397 -20870.6732706
+0.401 0.56 0.9 8392 -20587.9203106
+0.401 0.61 0.9 8182 -22065.3649951
+0.401 0.66 0.9 7992 -23509.1892942
+0.401 0.71 0.9 7846 -24772.7722634
+0.401 0.76 0.9 7686 -26360.7211137
+0.401 0.81 0.9 7506 -28401.1062331
+0.401 0.86 0.9 7329 -30849.4989546
+0.401 0.91 0.8 6930 -33768.9062987
+0.401 0.96 0.8 6698 -39347.1399945
+0.411 0.01 0.9 11252 -1335.68912689
+0.411 0.06 0.9 11189 -1783.34995105
+0.411 0.11 0.9 11085 -2579.99649071
+0.411 0.16 0.9 10920 -3789.07249399
+0.411 0.21 0.9 10359 -8161.96195242
+0.411 0.26 0.9 9972 -10834.7195986
+0.411 0.31 0.9 9331 -15424.6103449
+0.411 0.36 0.9 9098 -16696.740383
+0.411 0.41 0.9 8849 -18150.0292965
+0.411 0.46 0.9 8598 -19688.4636974
+0.411 0.51 0.9 8598 -19287.5174421
+0.411 0.56 0.9 8392 -20620.0489687
+0.411 0.61 0.9 8182 -22110.9001224
+0.411 0.66 0.9 8020 -23343.0131592
+0.411 0.71 0.9 7846 -24844.0977414
+0.411 0.76 0.9 7819 -25376.0149673
+0.411 0.81 0.9 7651 -27328.2345777
+0.411 0.86 0.9 7483 -29731.2163574
+0.411 0.91 0.8 6930 -33945.7499945
+0.411 0.96 0.8 6698 -39560.4808371
+0.421 0.01 0.9 11252 -1335.27603446
+0.421 0.06 0.9 11189 -1783.36974256
+0.421 0.11 0.9 11085 -2578.07339471
+0.421 0.16 0.9 10920 -3788.10764251
+0.421 0.21 0.9 10429 -7593.4229294
+0.421 0.26 0.9 9972 -10827.8574922
+0.421 0.31 0.9 9660 -12782.5148464
+0.421 0.36 0.9 9102 -16667.7221852
+0.421 0.41 0.9 8849 -18160.6789283
+0.421 0.46 0.9 8808 -18022.1167227
+0.421 0.51 0.9 8598 -19299.1251249
+0.421 0.56 0.9 8397 -20613.4765503
+0.421 0.61 0.9 8182 -22149.9834626
+0.421 0.66 0.9 8030 -23321.2791805
+0.421 0.71 0.9 7992 -23740.674856
+0.421 0.76 0.9 7819 -25448.1878883
+0.421 0.81 0.9 7686 -27136.8715833
+0.421 0.86 0.9 7506 -29641.5362404
+0.421 0.91 0.8 7053 -33132.6756489
+0.421 0.96 0.8 6700 -39760.2563139
+0.431 0.01 0.9 11252 -1334.9371091
+0.431 0.06 0.9 11189 -1783.4345784
+0.431 0.11 0.9 11085 -2577.28999508
+0.431 0.16 0.9 10920 -3785.46468828
+0.431 0.21 0.9 10446 -7450.44490854
+0.431 0.26 0.9 10035 -10311.6834472
+0.431 0.31 0.9 9660 -12776.9198551
+0.431 0.36 0.9 9102 -16671.7905074
+0.431 0.41 0.9 8849 -18173.7034662
+0.431 0.46 0.9 8808 -18037.4992639
+0.431 0.51 0.9 8598 -19322.9635368
+0.431 0.56 0.9 8397 -20648.3802956
+0.431 0.61 0.9 8222 -21875.6844545
+0.431 0.66 0.9 8182 -22159.9431361
+0.431 0.71 0.9 7992 -23804.0527805
+0.431 0.76 0.9 7846 -25307.1828167
+0.431 0.81 0.9 7686 -27226.9577765
+0.431 0.86 0.9 7506 -29750.13318
+0.431 0.91 0.9 7329 -33080.2978751
+0.431 0.96 0.8 6818 -38990.3419993
+0.441 0.01 0.9 11252 -1334.5273329
+0.441 0.06 0.9 11189 -1782.9874272
+0.441 0.11 0.9 11085 -2576.60468516
+0.441 0.16 0.9 10920 -3784.88004787
+0.441 0.21 0.9 10446 -7441.83674883
+0.441 0.26 0.9 10035 -10303.954216
+0.441 0.31 0.9 9660 -12772.1785093
+0.441 0.36 0.9 9102 -16677.0083349
+0.441 0.41 0.9 9053 -16548.5191608
+0.441 0.46 0.9 8849 -17723.2494379
+0.441 0.51 0.9 8609 -19259.7859491
+0.441 0.56 0.9 8397 -20684.8073474
+0.441 0.61 0.9 8226 -21890.6570561
+0.441 0.66 0.9 8182 -22210.4759088
+0.441 0.71 0.9 8030 -23558.9761654
+0.441 0.76 0.9 7846 -25384.1271346
+0.441 0.81 0.8 7483 -27285.38139
+0.441 0.86 0.8 7305 -29670.6346252
+0.441 0.91 0.9 7329 -33211.0416241
+0.441 0.96 0.8 6821 -39167.0868914
+0.451 0.01 0.9 11252 -1334.20706063
+0.451 0.06 0.9 11189 -1783.13620196
+0.451 0.11 0.9 11085 -2575.48174408
+0.451 0.16 0.9 10936 -3656.06005347
+0.451 0.21 0.9 10446 -7434.92539577
+0.451 0.26 0.9 10035 -10296.8499793
+0.451 0.31 0.9 9673 -12658.8699221
+0.451 0.36 0.9 9331 -14843.1117323
+0.451 0.41 0.9 9057 -16520.5352611
+0.451 0.46 0.9 8849 -17738.6328168
+0.451 0.51 0.9 8609 -19285.379031
+0.451 0.56 0.9 8436 -20401.041621
+0.451 0.61 0.9 8397 -20563.5333182
+0.451 0.66 0.9 8182 -22262.5714206
+0.451 0.71 0.9 8030 -23621.9471558
+0.451 0.76 0.9 7846 -25462.8042306
+0.451 0.81 0.9 7824 -26290.425211
+0.451 0.86 0.9 7686 -28522.2137573
+0.451 0.91 0.8 7183 -32584.861105
+0.451 0.96 0.8 6930 -38494.0584113
+0.461 0.01 0.9 11252 -1333.89034329
+0.461 0.06 0.9 11189 -1783.32414114
+0.461 0.11 0.9 11096 -2485.27766861
+0.461 0.16 0.9 10936 -3654.97871624
+0.461 0.21 0.9 10446 -7428.41245602
+0.461 0.26 0.9 10035 -10290.3428791
+0.461 0.31 0.9 9673 -12654.6568217
+0.461 0.36 0.9 9331 -14845.2488195
+0.461 0.41 0.9 9102 -16169.2167725
+0.461 0.46 0.9 8849 -17745.3480893
+0.461 0.51 0.9 8609 -19312.2587365
+0.461 0.56 0.9 8447 -20349.1029178
+0.461 0.61 0.9 8397 -20602.6834324
+0.461 0.66 0.9 8226 -21961.4209734
+0.461 0.71 0.9 8030 -23686.4847228
+0.461 0.76 0.9 8002 -24287.7112841
+0.461 0.81 0.9 7846 -26195.1228808
+0.461 0.86 0.9 7686 -28617.5968932
+0.461 0.91 0.9 7506 -32025.1500723
+0.461 0.96 0.8 6930 -38681.9756461
+0.471 0.01 0.9 11252 -1333.39655619
+0.471 0.06 0.9 11189 -1783.34610694
+0.471 0.11 0.9 11096 -2483.67340283
+0.471 0.16 0.9 10936 -3652.93854545
+0.471 0.21 0.9 10446 -7422.28053961
+0.471 0.26 0.9 10035 -10281.5140268
+0.471 0.31 0.9 9673 -12651.1821851
+0.471 0.36 0.9 9331 -14848.2825137
+0.471 0.41 0.9 9102 -16177.402507
+0.471 0.46 0.9 8853 -17730.1145841
+0.471 0.51 0.9 8609 -19340.3689069
+0.471 0.56 0.9 8609 -19086.5072823
+0.471 0.61 0.9 8397 -20643.1620418
+0.471 0.66 0.9 8226 -22009.0526902
+0.471 0.71 0.9 8030 -23752.5204883
+0.471 0.76 0.9 8030 -24119.9966407
+0.471 0.81 0.9 7846 -26276.888801
+0.471 0.86 0.9 7686 -28714.6372956
+0.471 0.91 0.9 7506 -32140.7580172
+0.471 0.96 0.8 6934 -38839.3540816
+0.481 0.01 0.9 11252 -1333.10127784
+0.481 0.06 0.9 11189 -1782.87422275
+0.481 0.11 0.9 11096 -2482.75904545
+0.481 0.16 0.9 10936 -3651.30824676
+0.481 0.21 0.9 10446 -7413.05922126
+0.481 0.26 0.9 10051 -10146.9912973
+0.481 0.31 0.9 9673 -12647.6025626
+0.481 0.36 0.9 9344 -14747.3378561
+0.481 0.41 0.9 9102 -16186.5478703
+0.481 0.46 0.9 8853 -17747.8052636
+0.481 0.51 0.9 8649 -19040.64807
+0.481 0.56 0.9 8609 -19115.6752997
+0.481 0.61 0.9 8436 -20372.436172
+0.481 0.66 0.9 8226 -22061.5778406
+0.481 0.71 0.9 8186 -22560.6820451
+0.481 0.76 0.9 8030 -24187.3165379
+0.481 0.81 0.9 7846 -26360.1702973
+0.481 0.86 0.8 7506 -28596.3962403
+0.481 0.91 0.9 7511 -32217.725253
+0.481 0.96 0.8 6957 -38845.0840182
+0.491 0.01 0.9 11252 -1332.71313958
+0.491 0.06 0.9 11189 -1783.16982071
+0.491 0.11 0.9 11096 -2481.91847811
+0.491 0.16 0.9 10936 -3650.67083588
+0.491 0.21 0.9 10446 -7407.43147704
+0.491 0.26 0.9 10051 -10140.8313456
+0.491 0.31 0.9 9673 -12645.482068
+0.491 0.36 0.9 9344 -14747.078396
+0.491 0.41 0.9 9102 -16196.6126403
+0.491 0.46 0.9 8853 -17766.5209459
+0.491 0.51 0.9 8653 -19036.327755
+0.491 0.56 0.9 8609 -19145.9717956
+0.491 0.61 0.9 8447 -20320.0638793
+0.491 0.66 0.9 8226 -22115.3938923
+0.491 0.71 0.9 8226 -22296.354469
+0.491 0.76 0.9 8030 -24256.0104563
+0.491 0.81 0.8 7686 -26213.1035566
+0.491 0.86 0.8 7506 -28693.378123
+0.491 0.91 0.8 7329 -31999.1061224
+0.491 0.96 0.8 7053 -38252.0335274
diff --git a/experiments/process.py b/experiments/process.py
index 40bc9f3..a538545 100644
--- a/experiments/process.py
+++ b/experiments/process.py
@@ -13,10 +13,10 @@ if __name__ == "__main__":
sys.exit("usage: {0} <file>".format(sys.argv[0]))
root_victims, victims, non_victims, age = load(open(sys.argv[1]))
- # alphas = np.arange(5e-4, 3e-3, 1e-4) # parameter of the time component
- alphas = np.logspace(-4,2,num=20)
- # deltas = np.arange(0.03, 0.1, 0.005) # parameter of the structural component
- deltas = np.logspace(-4,-1,num=10)
+ alphas = np.arange(1e-3, 5e-1, 1e-2) # parameter of the time component
+ # alphas = np.logspace(-4,0,num=20)
+ deltas = np.arange(0.01, 0.99, 0.05) # parameter of the structural component
+ # deltas = np.logspace(-3,-0.001,num=20)
with open("out.log", "w") as fh:
for alpha, delta in product(alphas, deltas):
beta, roots, ll = ml3(root_victims, victims, non_victims, age, alpha, delta)