Commits

Ruben Martinez-Cantin  committed 519a2ec

Adding score config to python/matlab

  • Participants
  • Parent commits 25e8e32

Comments (0)

Files changed (3)

File matlab/bayesoptextras.h

   
   /* See parameters.h for the available options */
   
-  char l_str[100];
+  char l_str[100], sc_str[100];
   size_t n_hp_test, n_coef_test;
 
   bopt_params parameters = initialize_parameters_to_default();
   struct_string(params, "l_type", l_str);
   parameters.l_type = str2learn(l_str);
 
+  strcpy( sc_str, score2str(parameters.sc_type));
+  struct_string(params, "sc_type", sc_str);
+  parameters.sc_type = str2score(sc_str);
+
+
   struct_value(params, "epsilon",  &parameters.epsilon);
 
   struct_string(params, "crit_name", parameters.crit_name);

File python/bayesopt.cpp

-/* Generated by Cython 0.17.4 on Mon Oct 14 19:18:58 2013 */
+/* Generated by Cython 0.19 on Wed Mar 19 00:36:54 2014 */
 
 #define PY_SSIZE_T_CLEAN
+#ifndef CYTHON_USE_PYLONG_INTERNALS
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#else
+#include "pyconfig.h"
+#ifdef PYLONG_BITS_IN_DIGIT
+#define CYTHON_USE_PYLONG_INTERNALS 1
+#else
+#define CYTHON_USE_PYLONG_INTERNALS 0
+#endif
+#endif
+#endif
 #include "Python.h"
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
   #define Py_TPFLAGS_HAVE_NEWBUFFER 0
 #endif
+#if PY_VERSION_HEX < 0x02060000
+  #define Py_TPFLAGS_HAVE_VERSION_TAG 0
+#endif
 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
   #define CYTHON_PEP393_ENABLED 1
   #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ? \
   #define PyBytes_Concat               PyString_Concat
   #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
 #endif
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+  #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \
+                                         PyString_Check(obj) || PyUnicode_Check(obj))
+  #define __Pyx_PyBaseString_CheckExact(obj) (Py_TYPE(obj) == &PyBaseString_Type)
+#endif
 #if PY_VERSION_HEX < 0x02060000
   #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
   #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
   #define __Pyx_NAMESTR(n) (n)
   #define __Pyx_DOCSTR(n)  (n)
 #endif
-
-
-#if PY_MAJOR_VERSION >= 3
-  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
-  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
-#else
-  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
-  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
-#endif
-
-#ifndef __PYX_EXTERN_C
-  #ifdef __cplusplus
-    #define __PYX_EXTERN_C extern "C"
-  #else
-    #define __PYX_EXTERN_C extern
-  #endif
-#endif
-
-#if defined(WIN32) || defined(MS_WINDOWS)
-#define _USE_MATH_DEFINES
-#endif
-#include <math.h>
-#define __PYX_HAVE__bayesopt
-#define __PYX_HAVE_API__bayesopt
-#include "stdio.h"
-#include "stdlib.h"
-#include "numpy/arrayobject.h"
-#include "numpy/ufuncobject.h"
-#include "pythread.h"
-#include "parameters.h"
-#include "bayesoptwpr.h"
-#ifdef _OPENMP
-#include <omp.h>
-#endif /* _OPENMP */
-
-#ifdef PYREX_WITHOUT_ASSERTIONS
-#define CYTHON_WITHOUT_ASSERTIONS
-#endif
-
-
-/* inline attribute */
 #ifndef CYTHON_INLINE
   #if defined(__GNUC__)
     #define CYTHON_INLINE __inline__
     #define CYTHON_INLINE
   #endif
 #endif
-
-/* unused attribute */
+#ifndef CYTHON_RESTRICT
+  #if defined(__GNUC__)
+    #define CYTHON_RESTRICT __restrict__
+  #elif defined(_MSC_VER)
+    #define CYTHON_RESTRICT __restrict
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_RESTRICT restrict
+  #else
+    #define CYTHON_RESTRICT
+  #endif
+#endif
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+  /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and
+   a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is
+   a quiet NaN. */
+  float value;
+  memset(&value, 0xFF, sizeof(value));
+  return value;
+}
+#endif
+
+
+#if PY_MAJOR_VERSION >= 3
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
+#else
+  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
+  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
+#endif
+
+#ifndef __PYX_EXTERN_C
+  #ifdef __cplusplus
+    #define __PYX_EXTERN_C extern "C"
+  #else
+    #define __PYX_EXTERN_C extern
+  #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
+#include <math.h>
+#define __PYX_HAVE__bayesopt
+#define __PYX_HAVE_API__bayesopt
+#include "string.h"
+#include "stdio.h"
+#include "stdlib.h"
+#include "numpy/arrayobject.h"
+#include "numpy/ufuncobject.h"
+#include "pythread.h"
+#include "datetime.h"
+#include "parameters.h"
+#include "bayesoptwpr.h"
+#ifdef _OPENMP
+#include <omp.h>
+#endif /* _OPENMP */
+
+#ifdef PYREX_WITHOUT_ASSERTIONS
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
 #ifndef CYTHON_UNUSED
 # if defined(__GNUC__)
 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
 #   define CYTHON_UNUSED
 # endif
 #endif
-
-typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
-
-
-/* Type Conversion Predeclarations */
-
-#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
-
+typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
+                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyBytes_FromString        PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(char*);
+#if PY_MAJOR_VERSION < 3
+    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
+    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromUString(s)  __Pyx_PyObject_FromString((char*)s)
+#define __Pyx_PyBytes_FromUString(s)   __Pyx_PyBytes_FromString((char*)s)
+#define __Pyx_PyStr_FromUString(s)     __Pyx_PyStr_FromString((char*)s)
+#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((char*)s)
+#if PY_MAJOR_VERSION < 3
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
+{
+    const Py_UNICODE *u_end = u;
+    while (*u_end++) ;
+    return u_end - u - 1;
+}
+#else
+#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
+#endif
+#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
 #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
-
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
-
 #if CYTHON_COMPILING_IN_CPYTHON
 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
 #else
 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
 #endif
 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params() {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    PyObject* ascii_chars_u = NULL;
+    PyObject* ascii_chars_b = NULL;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) {
+        __Pyx_sys_getdefaultencoding_not_ascii = 0;
+    } else {
+        const char* default_encoding_c = PyBytes_AS_STRING(default_encoding);
+        char ascii_chars[128];
+        int c;
+        for (c = 0; c < 128; c++) {
+            ascii_chars[c] = c;
+        }
+        __Pyx_sys_getdefaultencoding_not_ascii = 1;
+        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+        if (ascii_chars_u == NULL) goto bad;
+        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+        if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+            PyErr_Format(
+                PyExc_ValueError,
+                "This module compiled with c_string_encoding=ascii, but default encoding '%s' is not a superset of ascii.",
+                default_encoding_c);
+            goto bad;
+        }
+    }
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    Py_XDECREF(ascii_chars_u);
+    Py_XDECREF(ascii_chars_b);
+    return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params() {
+    PyObject* sys = NULL;
+    PyObject* default_encoding = NULL;
+    char* default_encoding_c;
+    sys = PyImport_ImportModule("sys");
+    if (sys == NULL) goto bad;
+    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+    if (default_encoding == NULL) goto bad;
+    default_encoding_c = PyBytes_AS_STRING(default_encoding);
+    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+    Py_DECREF(sys);
+    Py_DECREF(default_encoding);
+    return 0;
+bad:
+    Py_XDECREF(sys);
+    Py_XDECREF(default_encoding);
+    return -1;
+}
+#endif
+#endif
+
 
 #ifdef __GNUC__
   /* Test for GCC > 2.95 */
   #define likely(x)   (x)
   #define unlikely(x) (x)
 #endif /* __GNUC__ */
-    
+
 static PyObject *__pyx_m;
+static PyObject *__pyx_d;
 static PyObject *__pyx_b;
 static PyObject *__pyx_empty_tuple;
 static PyObject *__pyx_empty_bytes;
 static const char *__pyx_f[] = {
   "bayesopt.pyx",
   "numpy.pxd",
+  "datetime.pxd",
   "type.pxd",
   "bool.pxd",
   "complex.pxd",
 #define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
 #define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
 
-static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
-
-static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
-    PyObject* value;
-#if PY_MAJOR_VERSION >= 3
-    value = PyDict_GetItemWithError(d, key);
-    if (unlikely(!value)) {
-        if (unlikely(PyErr_Occurred()))
-            return NULL;
-        value = default_value;
-    }
-    Py_INCREF(value);
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+    PyTypeObject* tp = Py_TYPE(obj);
+    if (likely(tp->tp_getattro))
+        return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+    if (likely(tp->tp_getattr))
+        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+    return PyObject_GetAttr(obj, attr_name);
+}
 #else
-    if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
-        value = PyDict_GetItem(d, key);
-        if (unlikely(!value)) {
-            value = default_value;
-        }
-        Py_INCREF(value);
-    } else {
-        PyObject *m;
-        m = __Pyx_GetAttrString(d, "get");
-        if (!m) return NULL;
-        value = PyObject_CallFunctionObjArgs(m, key,
-                                             (default_value == Py_None) ? NULL : default_value, NULL);
-        Py_DECREF(m);
-    }
-#endif
-    return value;
-}
-
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
-    PyObject *r;
-    if (!j) return NULL;
-    r = PyObject_GetItem(o, j);
-    Py_DECREF(j);
-    return r;
-}
-#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_List_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
-        PyObject *r = PyList_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
-    return PySequence_GetItem(o, i);
-#endif
-}
-#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Tuple_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
-        PyObject *r = PyTuple_GET_ITEM(o, i);
-        Py_INCREF(r);
-        return r;
-    }
-    else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
-        PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
-        Py_INCREF(r);
-        return r;
-    }
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-#else
-    return PySequence_GetItem(o, i);
-#endif
-}
-#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_GetItemInt_Fast(o, i) : \
-                                                    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
-static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (PyList_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-            PyObject *r = PyList_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    }
-    else if (PyTuple_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
-            PyObject *r = PyTuple_GET_ITEM(o, n);
-            Py_INCREF(r);
-            return r;
-        }
-    } else {  /* inlined PySequence_GetItem() */
-        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-        if (likely(m && m->sq_item)) {
-            if (unlikely(i < 0) && likely(m->sq_length)) {
-                Py_ssize_t l = m->sq_length(o);
-                if (unlikely(l < 0)) return NULL;
-                i += l;
-            }
-            return m->sq_item(o, i);
-        }
-    }
-#else
-    if (PySequence_Check(o)) {
-        return PySequence_GetItem(o, i);
-    }
-#endif
-    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
-}
-
-#define __Pyx_SetItemInt(o, i, v, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
-                                                    __Pyx_SetItemInt_Fast(o, i, v) : \
-                                                    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
-static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
-    int r;
-    if (!j) return -1;
-    r = PyObject_SetItem(o, j, v);
-    Py_DECREF(j);
-    return r;
-}
-static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v) {
-#if CYTHON_COMPILING_IN_CPYTHON
-    if (PyList_CheckExact(o)) {
-        Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
-        if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
-            PyObject* old = PyList_GET_ITEM(o, n);
-            Py_INCREF(v);
-            PyList_SET_ITEM(o, n, v);
-            Py_DECREF(old);
-            return 1;
-        }
-    } else {  /* inlined PySequence_SetItem() */
-        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
-        if (likely(m && m->sq_ass_item)) {
-            if (unlikely(i < 0) && likely(m->sq_length)) {
-                Py_ssize_t l = m->sq_length(o);
-                if (unlikely(l < 0)) return -1;
-                i += l;
-            }
-            return m->sq_ass_item(o, i, v);
-        }
-    }
-#else
-#if CYTHON_COMPILING_IN_PYPY
-    if (PySequence_Check(o) && !PyDict_Check(o)) {
-#else
-    if (PySequence_Check(o)) {
-#endif
-        return PySequence_SetItem(o, i, v);
-    }
-#endif
-    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
-}
-
-static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/
+
+static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/
+
+#define __Pyx_GetItemInt(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
+    (((size) <= sizeof(Py_ssize_t)) ? \
+    __Pyx_GetItemInt_Fast(o, i, is_list, wraparound, boundscheck) : \
+    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+#define __Pyx_GetItemInt_List(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
+    (((size) <= sizeof(Py_ssize_t)) ? \
+    __Pyx_GetItemInt_List_Fast(o, i, wraparound, boundscheck) : \
+    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func, is_list, wraparound, boundscheck) \
+    (((size) <= sizeof(Py_ssize_t)) ? \
+    __Pyx_GetItemInt_Tuple_Fast(o, i, wraparound, boundscheck) : \
+    __Pyx_GetItemInt_Generic(o, to_py_func(i)))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+                                                              int wraparound, int boundscheck);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+                                                     int is_list, int wraparound, int boundscheck);
+
+static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
+static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
+
+static void __Pyx_WriteUnraisable(const char *name, int clineno,
+                                  int lineno, const char *filename); /*proto*/
+
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/
+
+#define __Pyx_SetItemInt(o, i, v, size, to_py_func, is_list, wraparound, boundscheck) \
+    (((size) <= sizeof(Py_ssize_t)) ? \
+    __Pyx_SetItemInt_Fast(o, i, v, is_list, wraparound, boundscheck) : \
+    __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+                                               int is_list, int wraparound, int boundscheck);
 
 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
     Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
 static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/
 
 #define __Pyx_BufPtrCContig1d(type, buf, i0, s0) ((type)buf + i0)
-  static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
-static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
-
 #define __Pyx_BufPtrCContig2d(type, buf, i0, s0, i1, s1) ((type)((char*)buf + i0 * s0) + i1)
-  static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/
 
 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
 
 #endif
 
 
-  static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
+static Py_ssize_t __Pyx_zeros[] = {0, 0, 0, 0, 0, 0, 0, 0};
 static Py_ssize_t __Pyx_minusones[] = {-1, -1, -1, -1, -1, -1, -1, -1};
 
-static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/
 
 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_Py_intptr_t(Py_intptr_t);
 
 
 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
 
-static void __Pyx_WriteUnraisable(const char *name, int clineno,
-                                  int lineno, const char *filename); /*proto*/
-
 static int __Pyx_check_binary_version(void);
 
 #if !defined(__Pyx_PyIdentifier_FromString)
 
 /* Module declarations from 'cpython.ref' */
 
+/* Module declarations from 'libc.string' */
+
 /* Module declarations from 'libc.stdio' */
 
 /* Module declarations from 'cpython.object' */
 
 /* Module declarations from 'cpython.pycapsule' */
 
+/* Module declarations from 'datetime' */
+
+/* Module declarations from 'cpython.datetime' */
+static PyTypeObject *__pyx_ptype_7cpython_8datetime_date = 0;
+static PyTypeObject *__pyx_ptype_7cpython_8datetime_time = 0;
+static PyTypeObject *__pyx_ptype_7cpython_8datetime_datetime = 0;
+static PyTypeObject *__pyx_ptype_7cpython_8datetime_timedelta = 0;
+static PyTypeObject *__pyx_ptype_7cpython_8datetime_tzinfo = 0;
+
 /* Module declarations from 'cpython' */
 
 /* Module declarations from 'bayesopt' */
 static char __pyx_k__Zf[] = "Zf";
 static char __pyx_k__Zg[] = "Zg";
 static char __pyx_k__lb[] = "lb";
-static char __pyx_k__mu[] = "mu";
 static char __pyx_k__np[] = "np";
 static char __pyx_k__ub[] = "ub";
 static char __pyx_k__cEI[] = "cEI";
+static char __pyx_k__get[] = "get";
 static char __pyx_k__beta[] = "beta";
-static char __pyx_k__mOne[] = "mOne";
 static char __pyx_k__minf[] = "minf";
 static char __pyx_k__nDim[] = "nDim";
 static char __pyx_k__np_x[] = "np_x";
-static char __pyx_k__s_mu[] = "s_mu";
-static char __pyx_k__L_MAP[] = "L_MAP";
 static char __pyx_k__alpha[] = "alpha";
 static char __pyx_k__dtype[] = "dtype";
 static char __pyx_k__noise[] = "noise";
 static char __pyx_k__np_ub[] = "np_ub";
 static char __pyx_k__numpy[] = "numpy";
 static char __pyx_k__range[] = "range";
-static char __pyx_k__theta[] = "theta";
 static char __pyx_k__zeros[] = "zeros";
+static char __pyx_k__SC_MAP[] = "SC_MAP";
 static char __pyx_k__double[] = "double";
 static char __pyx_k__l_type[] = "l_type";
+static char __pyx_k__mConst[] = "mConst";
 static char __pyx_k__params[] = "params";
 static char __pyx_k__dparams[] = "dparams";
 static char __pyx_k__epsilon[] = "epsilon";
-static char __pyx_k__s_theta[] = "s_theta";
+static char __pyx_k__sc_type[] = "sc_type";
 static char __pyx_k__sigma_s[] = "sigma_s";
 static char __pyx_k__valid_x[] = "valid_x";
 static char __pyx_k____main__[] = "__main__";
 static char __pyx_k__min_value[] = "min_value";
 static char __pyx_k__surr_name[] = "surr_name";
 static char __pyx_k__ValueError[] = "ValueError";
+static char __pyx_k____import__[] = "__import__";
 static char __pyx_k__error_code[] = "error_code";
 static char __pyx_k__np_valid_x[] = "np_valid_x";
+static char __pyx_k__L_EMPIRICAL[] = "L_EMPIRICAL";
 static char __pyx_k__crit_params[] = "crit_params";
+static char __pyx_k__init_method[] = "init_method";
 static char __pyx_k__kMaternISO3[] = "kMaternISO3";
 static char __pyx_k__kernel_name[] = "kernel_name";
 static char __pyx_k__RuntimeError[] = "RuntimeError";
 static char __pyx_k__log_filename[] = "log_filename";
 static char __pyx_k__n_iterations[] = "n_iterations";
 static char __pyx_k__kernel_hp_std[] = "kernel_hp_std";
-static char __pyx_k__learning_type[] = "learning_type";
 static char __pyx_k__mean_coef_std[] = "mean_coef_std";
 static char __pyx_k__verbose_level[] = "verbose_level";
 static char __pyx_k__kernel_hp_mean[] = "kernel_hp_mean";
 static char __pyx_k__mean_coef_mean[] = "mean_coef_mean";
 static char __pyx_k__n_init_samples[] = "n_init_samples";
 static char __pyx_k__n_iter_relearn[] = "n_iter_relearn";
+static char __pyx_k____pyx_getbuffer[] = "__pyx_getbuffer";
 static char __pyx_k__sGaussianProcess[] = "sGaussianProcess";
 static char __pyx_k__ascontiguousarray[] = "ascontiguousarray";
 static char __pyx_k__initialize_params[] = "initialize_params";
 static char __pyx_k__optimize_discrete[] = "optimize_discrete";
 static char __pyx_k__n_inner_iterations[] = "n_inner_iterations";
+static char __pyx_k____pyx_releasebuffer[] = "__pyx_releasebuffer";
 static PyObject *__pyx_kp_s_1;
 static PyObject *__pyx_kp_u_12;
 static PyObject *__pyx_kp_s_16;
 static PyObject *__pyx_kp_u_6;
 static PyObject *__pyx_kp_u_8;
 static PyObject *__pyx_kp_u_9;
-static PyObject *__pyx_n_s__L_MAP;
+static PyObject *__pyx_n_s__L_EMPIRICAL;
 static PyObject *__pyx_n_s__RuntimeError;
+static PyObject *__pyx_n_s__SC_MAP;
 static PyObject *__pyx_n_s__ValueError;
+static PyObject *__pyx_n_s____import__;
 static PyObject *__pyx_n_s____main__;
+static PyObject *__pyx_n_s____pyx_getbuffer;
+static PyObject *__pyx_n_s____pyx_releasebuffer;
 static PyObject *__pyx_n_s____test__;
 static PyObject *__pyx_n_s__alpha;
 static PyObject *__pyx_n_s__ascontiguousarray;
 static PyObject *__pyx_n_s__epsilon;
 static PyObject *__pyx_n_s__error_code;
 static PyObject *__pyx_n_s__f;
+static PyObject *__pyx_n_s__get;
+static PyObject *__pyx_n_s__init_method;
 static PyObject *__pyx_n_s__initialize_params;
 static PyObject *__pyx_n_s__kMaternISO3;
 static PyObject *__pyx_n_s__kernel_hp_mean;
 static PyObject *__pyx_n_s__kernel_name;
 static PyObject *__pyx_n_s__l_type;
 static PyObject *__pyx_n_s__lb;
-static PyObject *__pyx_n_s__learning_type;
 static PyObject *__pyx_n_s__log_filename;
-static PyObject *__pyx_n_s__mOne;
+static PyObject *__pyx_n_s__mConst;
 static PyObject *__pyx_n_s__mean_coef_mean;
 static PyObject *__pyx_n_s__mean_coef_std;
 static PyObject *__pyx_n_s__mean_name;
 static PyObject *__pyx_n_s__min_value;
 static PyObject *__pyx_n_s__minf;
-static PyObject *__pyx_n_s__mu;
 static PyObject *__pyx_n_s__nDim;
 static PyObject *__pyx_n_s__n_init_samples;
 static PyObject *__pyx_n_s__n_inner_iterations;
 static PyObject *__pyx_n_s__params;
 static PyObject *__pyx_n_s__range;
 static PyObject *__pyx_n_s__sGaussianProcess;
-static PyObject *__pyx_n_s__s_mu;
-static PyObject *__pyx_n_s__s_theta;
+static PyObject *__pyx_n_s__sc_type;
 static PyObject *__pyx_n_s__sigma_s;
 static PyObject *__pyx_n_s__surr_name;
-static PyObject *__pyx_n_s__theta;
 static PyObject *__pyx_n_s__ub;
 static PyObject *__pyx_n_s__valid_x;
 static PyObject *__pyx_n_s__verbose_level;
 static PyObject *__pyx_n_s__x;
 static PyObject *__pyx_n_s__zeros;
+static PyObject *__pyx_int_0;
 static PyObject *__pyx_int_1;
 static PyObject *__pyx_int_15;
 static PyObject *__pyx_int_30;
 static PyObject *__pyx_k_codeobj_18;
 static PyObject *__pyx_k_codeobj_20;
 
-/* "bayesopt.pyx":92
+/* "bayesopt.pyx":96
  * 
  * ###########################################################################
  * cdef bopt_params dict2structparams(dict dparams):             # <<<<<<<<<<<<<<
   PyObject *__pyx_v_logname = NULL;
   PyObject *__pyx_v_sname = NULL;
   PyObject *__pyx_v_learning = NULL;
+  PyObject *__pyx_v_score = NULL;
+  PyObject *__pyx_v_kname = NULL;
   PyObject *__pyx_v_theta = NULL;
   PyObject *__pyx_v_stheta = NULL;
   long __pyx_v_i;
+  PyObject *__pyx_v_mname = NULL;
   PyObject *__pyx_v_mu = NULL;
   PyObject *__pyx_v_smu = NULL;
+  PyObject *__pyx_v_cname = NULL;
   PyObject *__pyx_v_cp = NULL;
-  PyObject *__pyx_v_kname = NULL;
-  PyObject *__pyx_v_mname = NULL;
-  PyObject *__pyx_v_cname = NULL;
   bopt_params __pyx_r;
   __Pyx_RefNannyDeclarations
   PyObject *__pyx_t_1 = NULL;
   PyObject *__pyx_t_2 = NULL;
   unsigned int __pyx_t_3;
   char *__pyx_t_4;
-  int __pyx_t_5;
-  double __pyx_t_6;
+  double __pyx_t_5;
+  int __pyx_t_6;
   int __pyx_t_7;
   int __pyx_t_8;
   Py_ssize_t __pyx_t_9;
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("dict2structparams", 0);
 
-  /* "bayesopt.pyx":94
+  /* "bayesopt.pyx":98
  * cdef bopt_params dict2structparams(dict dparams):
  * 
  *     params = initialize_parameters_to_default()             # <<<<<<<<<<<<<<
  */
   __pyx_v_params = initialize_parameters_to_default();
 
-  /* "bayesopt.pyx":96
+  /* "bayesopt.pyx":100
  *     params = initialize_parameters_to_default()
  * 
  *     params.n_iterations = dparams.get('n_iterations',params.n_iterations)             # <<<<<<<<<<<<<<
- *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)
- *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)
- */
-  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
-    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_params.n_iterations); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__n_iterations), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 96; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_params.n_iterations = __pyx_t_3;
-
-  /* "bayesopt.pyx":97
- * 
- *     params.n_iterations = dparams.get('n_iterations',params.n_iterations)
- *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)             # <<<<<<<<<<<<<<
- *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)
- * 
- */
-  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
-    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_2 = PyLong_FromUnsignedLong(__pyx_v_params.n_init_samples); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__n_init_samples), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_params.n_init_samples = __pyx_t_3;
-
-  /* "bayesopt.pyx":98
- *     params.n_iterations = dparams.get('n_iterations',params.n_iterations)
- *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)
- *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)             # <<<<<<<<<<<<<<
- * 
- *     logname = dparams.get('log_filename',params.log_filename)
- */
-  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
-    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_params.verbose_level); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__verbose_level), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 98; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_params.verbose_level = __pyx_t_3;
-
-  /* "bayesopt.pyx":100
- *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)
- * 
- *     logname = dparams.get('log_filename',params.log_filename)             # <<<<<<<<<<<<<<
- *     params.log_filename = logname
- * 
+ *     params.n_inner_iterations = dparams.get('n_inner_iterations',
+ *                                             params.n_inner_iterations)
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_2 = PyBytes_FromString(__pyx_v_params.log_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__log_filename), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_params.n_iterations); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_v_logname = __pyx_t_1;
-  __pyx_t_1 = 0;
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__n_iterations), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_params.n_iterations = __pyx_t_3;
 
   /* "bayesopt.pyx":101
  * 
- *     logname = dparams.get('log_filename',params.log_filename)
- *     params.log_filename = logname             # <<<<<<<<<<<<<<
- * 
- *     sname = dparams.get('surr_name',params.surr_name)
- */
-  __pyx_t_4 = PyBytes_AsString(__pyx_v_logname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_params.log_filename = __pyx_t_4;
+ *     params.n_iterations = dparams.get('n_iterations',params.n_iterations)
+ *     params.n_inner_iterations = dparams.get('n_inner_iterations',             # <<<<<<<<<<<<<<
+ *                                             params.n_inner_iterations)
+ *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+
+  /* "bayesopt.pyx":102
+ *     params.n_iterations = dparams.get('n_iterations',params.n_iterations)
+ *     params.n_inner_iterations = dparams.get('n_inner_iterations',
+ *                                             params.n_inner_iterations)             # <<<<<<<<<<<<<<
+ *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)
+ *     params.n_iter_relearn = dparams.get('n_iter_relearn',params.n_iter_relearn)
+ */
+  __pyx_t_2 = PyLong_FromUnsignedLong(__pyx_v_params.n_inner_iterations); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__n_inner_iterations), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+  /* "bayesopt.pyx":101
+ * 
+ *     params.n_iterations = dparams.get('n_iterations',params.n_iterations)
+ *     params.n_inner_iterations = dparams.get('n_inner_iterations',             # <<<<<<<<<<<<<<
+ *                                             params.n_inner_iterations)
+ *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)
+ */
+  __pyx_v_params.n_inner_iterations = __pyx_t_3;
 
   /* "bayesopt.pyx":103
- *     params.log_filename = logname
- * 
- *     sname = dparams.get('surr_name',params.surr_name)             # <<<<<<<<<<<<<<
- *     params.surr_name = sname;
- * 
+ *     params.n_inner_iterations = dparams.get('n_inner_iterations',
+ *                                             params.n_inner_iterations)
+ *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)             # <<<<<<<<<<<<<<
+ *     params.n_iter_relearn = dparams.get('n_iter_relearn',params.n_iter_relearn)
+ *     params.init_method = dparams.get('init_method',params.init_method)
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
     {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_params.surr_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_params.n_init_samples); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__n_init_samples), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_params.n_init_samples = __pyx_t_3;
+
+  /* "bayesopt.pyx":104
+ *                                             params.n_inner_iterations)
+ *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)
+ *     params.n_iter_relearn = dparams.get('n_iter_relearn',params.n_iter_relearn)             # <<<<<<<<<<<<<<
+ *     params.init_method = dparams.get('init_method',params.init_method)
+ * 
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = PyLong_FromUnsignedLong(__pyx_v_params.n_iter_relearn); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__n_iter_relearn), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_params.n_iter_relearn = __pyx_t_3;
+
+  /* "bayesopt.pyx":105
+ *     params.n_init_samples = dparams.get('n_init_samples',params.n_init_samples)
+ *     params.n_iter_relearn = dparams.get('n_iter_relearn',params.n_iter_relearn)
+ *     params.init_method = dparams.get('init_method',params.init_method)             # <<<<<<<<<<<<<<
+ * 
+ *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_params.init_method); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__init_method), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_2); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_params.init_method = __pyx_t_3;
+
+  /* "bayesopt.pyx":107
+ *     params.init_method = dparams.get('init_method',params.init_method)
+ * 
+ *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)             # <<<<<<<<<<<<<<
+ *     logname = dparams.get('log_filename',params.log_filename)
+ *     params.log_filename = logname
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = PyLong_FromUnsignedLong(__pyx_v_params.verbose_level); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__verbose_level), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_3 = __Pyx_PyInt_AsUnsignedInt(__pyx_t_1); if (unlikely((__pyx_t_3 == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 107; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_params.verbose_level = __pyx_t_3;
+
+  /* "bayesopt.pyx":108
+ * 
+ *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)
+ *     logname = dparams.get('log_filename',params.log_filename)             # <<<<<<<<<<<<<<
+ *     params.log_filename = logname
+ * 
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_params.log_filename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__surr_name), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__log_filename), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_v_sname = __pyx_t_2;
+  __pyx_v_logname = __pyx_t_2;
   __pyx_t_2 = 0;
 
-  /* "bayesopt.pyx":104
+  /* "bayesopt.pyx":109
+ *     params.verbose_level = dparams.get('verbose_level',params.verbose_level)
+ *     logname = dparams.get('log_filename',params.log_filename)
+ *     params.log_filename = logname             # <<<<<<<<<<<<<<
+ * 
+ *     sname = dparams.get('surr_name',params.surr_name)
+ */
+  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_logname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_params.log_filename = __pyx_t_4;
+
+  /* "bayesopt.pyx":111
+ *     params.log_filename = logname
+ * 
+ *     sname = dparams.get('surr_name',params.surr_name)             # <<<<<<<<<<<<<<
+ *     params.surr_name = sname;
+ *     params.sigma_s = dparams.get('sigma_s',params.sigma_s)
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_params.surr_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__surr_name), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_v_sname = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "bayesopt.pyx":112
  * 
  *     sname = dparams.get('surr_name',params.surr_name)
  *     params.surr_name = sname;             # <<<<<<<<<<<<<<
- * 
- *     learning = dparams.get('learning_type', None)
- */
-  __pyx_t_4 = PyBytes_AsString(__pyx_v_sname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *     params.sigma_s = dparams.get('sigma_s',params.sigma_s)
+ *     params.noise = dparams.get('noise',params.noise)
+ */
+  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_sname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_v_params.surr_name = __pyx_t_4;
 
-  /* "bayesopt.pyx":106
+  /* "bayesopt.pyx":113
+ *     sname = dparams.get('surr_name',params.surr_name)
  *     params.surr_name = sname;
- * 
- *     learning = dparams.get('learning_type', None)             # <<<<<<<<<<<<<<
+ *     params.sigma_s = dparams.get('sigma_s',params.sigma_s)             # <<<<<<<<<<<<<<
+ *     params.noise = dparams.get('noise',params.noise)
+ *     params.alpha = dparams.get('alpha',params.alpha)
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_params.sigma_s); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__sigma_s), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_params.sigma_s = __pyx_t_5;
+
+  /* "bayesopt.pyx":114
+ *     params.surr_name = sname;
+ *     params.sigma_s = dparams.get('sigma_s',params.sigma_s)
+ *     params.noise = dparams.get('noise',params.noise)             # <<<<<<<<<<<<<<
+ *     params.alpha = dparams.get('alpha',params.alpha)
+ *     params.beta = dparams.get('beta',params.beta)
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_params.noise); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__noise), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_params.noise = __pyx_t_5;
+
+  /* "bayesopt.pyx":115
+ *     params.sigma_s = dparams.get('sigma_s',params.sigma_s)
+ *     params.noise = dparams.get('noise',params.noise)
+ *     params.alpha = dparams.get('alpha',params.alpha)             # <<<<<<<<<<<<<<
+ *     params.beta = dparams.get('beta',params.beta)
+ * 
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_params.alpha); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__alpha), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_v_params.alpha = __pyx_t_5;
+
+  /* "bayesopt.pyx":116
+ *     params.noise = dparams.get('noise',params.noise)
+ *     params.alpha = dparams.get('alpha',params.alpha)
+ *     params.beta = dparams.get('beta',params.beta)             # <<<<<<<<<<<<<<
+ * 
+ *     learning = dparams.get('l_type', None)
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_params.beta); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__beta), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+  __pyx_v_params.beta = __pyx_t_5;
+
+  /* "bayesopt.pyx":118
+ *     params.beta = dparams.get('beta',params.beta)
+ * 
+ *     learning = dparams.get('l_type', None)             # <<<<<<<<<<<<<<
  *     if learning is not None:
  *         params.l_type = str2learn(learning)
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__learning_type), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_v_learning = __pyx_t_2;
-  __pyx_t_2 = 0;
-
-  /* "bayesopt.pyx":107
- * 
- *     learning = dparams.get('learning_type', None)
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__l_type), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __pyx_v_learning = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "bayesopt.pyx":119
+ * 
+ *     learning = dparams.get('l_type', None)
  *     if learning is not None:             # <<<<<<<<<<<<<<
  *         params.l_type = str2learn(learning)
  * 
  */
-  __pyx_t_5 = (__pyx_v_learning != Py_None);
-  if (__pyx_t_5) {
-
-    /* "bayesopt.pyx":108
- *     learning = dparams.get('learning_type', None)
+  __pyx_t_6 = (__pyx_v_learning != Py_None);
+  __pyx_t_7 = (__pyx_t_6 != 0);
+  if (__pyx_t_7) {
+
+    /* "bayesopt.pyx":120
+ *     learning = dparams.get('l_type', None)
  *     if learning is not None:
  *         params.l_type = str2learn(learning)             # <<<<<<<<<<<<<<
  * 
- * 
- */
-    __pyx_t_4 = PyBytes_AsString(__pyx_v_learning); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *     score = dparams.get('sc_type', None)
+ */
+    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_learning); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_params.l_type = str2learn(__pyx_t_4);
     goto __pyx_L3;
   }
   __pyx_L3:;
 
-  /* "bayesopt.pyx":111
- * 
- * 
- *     params.alpha = dparams.get('alpha',params.alpha)             # <<<<<<<<<<<<<<
- *     params.beta = dparams.get('beta',params.beta)
- *     params.noise = dparams.get('noise',params.noise)
+  /* "bayesopt.pyx":122
+ *         params.l_type = str2learn(learning)
+ * 
+ *     score = dparams.get('sc_type', None)             # <<<<<<<<<<<<<<
+ *     if score is not None:
+ *         params.sc_type = str2score(learning)
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_params.alpha); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__alpha), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__sc_type), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_params.alpha = __pyx_t_6;
-
-  /* "bayesopt.pyx":112
- * 
- *     params.alpha = dparams.get('alpha',params.alpha)
- *     params.beta = dparams.get('beta',params.beta)             # <<<<<<<<<<<<<<
- *     params.noise = dparams.get('noise',params.noise)
- * 
+  __pyx_v_score = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "bayesopt.pyx":123
+ * 
+ *     score = dparams.get('sc_type', None)
+ *     if score is not None:             # <<<<<<<<<<<<<<
+ *         params.sc_type = str2score(learning)
+ * 
+ */
+  __pyx_t_7 = (__pyx_v_score != Py_None);
+  __pyx_t_6 = (__pyx_t_7 != 0);
+  if (__pyx_t_6) {
+
+    /* "bayesopt.pyx":124
+ *     score = dparams.get('sc_type', None)
+ *     if score is not None:
+ *         params.sc_type = str2score(learning)             # <<<<<<<<<<<<<<
+ * 
+ * 
+ */
+    __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_learning); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_v_params.sc_type = str2score(__pyx_t_4);
+    goto __pyx_L4;
+  }
+  __pyx_L4:;
+
+  /* "bayesopt.pyx":127
+ * 
+ * 
+ *     params.epsilon = dparams.get('epsilon',params.epsilon)             # <<<<<<<<<<<<<<
+ * 
+ *     kname = dparams.get('kernel_name',params.kernel.name)
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_params.beta); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_params.epsilon); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__beta), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__epsilon), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_v_params.beta = __pyx_t_6;
-
-  /* "bayesopt.pyx":113
- *     params.alpha = dparams.get('alpha',params.alpha)
- *     params.beta = dparams.get('beta',params.beta)
- *     params.noise = dparams.get('noise',params.noise)             # <<<<<<<<<<<<<<
- * 
- *     theta = dparams.get('theta',None)
+  __pyx_v_params.epsilon = __pyx_t_5;
+
+  /* "bayesopt.pyx":129
+ *     params.epsilon = dparams.get('epsilon',params.epsilon)
+ * 
+ *     kname = dparams.get('kernel_name',params.kernel.name)             # <<<<<<<<<<<<<<
+ *     params.kernel.name = kname;
+ * 
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_params.noise); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__noise), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_params.kernel.name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__kernel_name), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_v_params.noise = __pyx_t_6;
-
-  /* "bayesopt.pyx":115
- *     params.noise = dparams.get('noise',params.noise)
- * 
- *     theta = dparams.get('theta',None)             # <<<<<<<<<<<<<<
- *     stheta = dparams.get('s_theta',None)
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_v_kname = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "bayesopt.pyx":130
+ * 
+ *     kname = dparams.get('kernel_name',params.kernel.name)
+ *     params.kernel.name = kname;             # <<<<<<<<<<<<<<
+ * 
+ *     theta = dparams.get('kernel_hp_mean',None)
+ */
+  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_kname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_params.kernel.name = __pyx_t_4;
+
+  /* "bayesopt.pyx":132
+ *     params.kernel.name = kname;
+ * 
+ *     theta = dparams.get('kernel_hp_mean',None)             # <<<<<<<<<<<<<<
+ *     stheta = dparams.get('kernel_hp_std',None)
  *     if theta is not None and stheta is not None:
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__theta), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__kernel_hp_mean), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_theta = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "bayesopt.pyx":116
- * 
- *     theta = dparams.get('theta',None)
- *     stheta = dparams.get('s_theta',None)             # <<<<<<<<<<<<<<
+  /* "bayesopt.pyx":133
+ * 
+ *     theta = dparams.get('kernel_hp_mean',None)
+ *     stheta = dparams.get('kernel_hp_std',None)             # <<<<<<<<<<<<<<
  *     if theta is not None and stheta is not None:
  *         params.kernel.n_hp = len(theta)
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__s_theta), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__kernel_hp_std), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_stheta = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "bayesopt.pyx":117
- *     theta = dparams.get('theta',None)
- *     stheta = dparams.get('s_theta',None)
+  /* "bayesopt.pyx":134
+ *     theta = dparams.get('kernel_hp_mean',None)
+ *     stheta = dparams.get('kernel_hp_std',None)
  *     if theta is not None and stheta is not None:             # <<<<<<<<<<<<<<
  *         params.kernel.n_hp = len(theta)
  *         for i in range(0,params.kernel.n_hp):
  */
-  __pyx_t_5 = (__pyx_v_theta != Py_None);
-  if (__pyx_t_5) {
+  __pyx_t_6 = (__pyx_v_theta != Py_None);
+  if ((__pyx_t_6 != 0)) {
     __pyx_t_7 = (__pyx_v_stheta != Py_None);
-    __pyx_t_8 = __pyx_t_7;
+    __pyx_t_8 = (__pyx_t_7 != 0);
   } else {
-    __pyx_t_8 = __pyx_t_5;
+    __pyx_t_8 = (__pyx_t_6 != 0);
   }
   if (__pyx_t_8) {
 
-    /* "bayesopt.pyx":118
- *     stheta = dparams.get('s_theta',None)
+    /* "bayesopt.pyx":135
+ *     stheta = dparams.get('kernel_hp_std',None)
  *     if theta is not None and stheta is not None:
  *         params.kernel.n_hp = len(theta)             # <<<<<<<<<<<<<<
  *         for i in range(0,params.kernel.n_hp):
  *             params.kernel.hp_mean[i] = theta[i]
  */
-    __pyx_t_9 = PyObject_Length(__pyx_v_theta); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyObject_Length(__pyx_v_theta); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_params.kernel.n_hp = __pyx_t_9;
 
-    /* "bayesopt.pyx":119
+    /* "bayesopt.pyx":136
  *     if theta is not None and stheta is not None:
  *         params.kernel.n_hp = len(theta)
  *         for i in range(0,params.kernel.n_hp):             # <<<<<<<<<<<<<<
     for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_3; __pyx_t_10+=1) {
       __pyx_v_i = __pyx_t_10;
 
-      /* "bayesopt.pyx":120
+      /* "bayesopt.pyx":137
  *         params.kernel.n_hp = len(theta)
  *         for i in range(0,params.kernel.n_hp):
  *             params.kernel.hp_mean[i] = theta[i]             # <<<<<<<<<<<<<<
  *             params.kernel.hp_std[i] = stheta[i]
  * 
  */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_theta, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_theta, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      (__pyx_v_params.kernel.hp_mean[__pyx_v_i]) = __pyx_t_6;
-
-      /* "bayesopt.pyx":121
+      (__pyx_v_params.kernel.hp_mean[__pyx_v_i]) = __pyx_t_5;
+
+      /* "bayesopt.pyx":138
  *         for i in range(0,params.kernel.n_hp):
  *             params.kernel.hp_mean[i] = theta[i]
  *             params.kernel.hp_std[i] = stheta[i]             # <<<<<<<<<<<<<<
  * 
- * 
- */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stheta, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *     mname = dparams.get('mean_name',params.mean.name)
+ */
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_stheta, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      (__pyx_v_params.kernel.hp_std[__pyx_v_i]) = __pyx_t_6;
-    }
-    goto __pyx_L4;
+      (__pyx_v_params.kernel.hp_std[__pyx_v_i]) = __pyx_t_5;
+    }
+    goto __pyx_L5;
   }
-  __pyx_L4:;
-
-  /* "bayesopt.pyx":124
- * 
- * 
- *     mu = dparams.get('mu',None)             # <<<<<<<<<<<<<<
- *     smu = dparams.get('s_mu',None)
- *     if mu is not None and smu is not None:
+  __pyx_L5:;
+
+  /* "bayesopt.pyx":140
+ *             params.kernel.hp_std[i] = stheta[i]
+ * 
+ *     mname = dparams.get('mean_name',params.mean.name)             # <<<<<<<<<<<<<<
+ *     params.mean.name = mname
+ * 
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__mu), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_mu = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "bayesopt.pyx":125
- * 
- *     mu = dparams.get('mu',None)
- *     smu = dparams.get('s_mu',None)             # <<<<<<<<<<<<<<
+  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_params.mean.name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__mean_name), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_v_mname = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "bayesopt.pyx":141
+ * 
+ *     mname = dparams.get('mean_name',params.mean.name)
+ *     params.mean.name = mname             # <<<<<<<<<<<<<<
+ * 
+ *     mu = dparams.get('mean_coef_mean',None)
+ */
+  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_mname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_params.mean.name = __pyx_t_4;
+
+  /* "bayesopt.pyx":143
+ *     params.mean.name = mname
+ * 
+ *     mu = dparams.get('mean_coef_mean',None)             # <<<<<<<<<<<<<<
+ *     smu = dparams.get('mean_coef_std',None)
+ *     if mu is not None and smu is not None:
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__mean_coef_mean), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_mu = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "bayesopt.pyx":144
+ * 
+ *     mu = dparams.get('mean_coef_mean',None)
+ *     smu = dparams.get('mean_coef_std',None)             # <<<<<<<<<<<<<<
  *     if mu is not None and smu is not None:
  *         params.mean.n_coef = len(mu)
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__s_mu), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __pyx_v_smu = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "bayesopt.pyx":126
- *     mu = dparams.get('mu',None)
- *     smu = dparams.get('s_mu',None)
+  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__mean_coef_std), Py_None); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_2);
+  __pyx_v_smu = __pyx_t_2;
+  __pyx_t_2 = 0;
+
+  /* "bayesopt.pyx":145
+ *     mu = dparams.get('mean_coef_mean',None)
+ *     smu = dparams.get('mean_coef_std',None)
  *     if mu is not None and smu is not None:             # <<<<<<<<<<<<<<
  *         params.mean.n_coef = len(mu)
  *         for i in range(0,params.mean.n_coef):
  */
   __pyx_t_8 = (__pyx_v_mu != Py_None);
-  if (__pyx_t_8) {
-    __pyx_t_5 = (__pyx_v_smu != Py_None);
-    __pyx_t_7 = __pyx_t_5;
+  if ((__pyx_t_8 != 0)) {
+    __pyx_t_6 = (__pyx_v_smu != Py_None);
+    __pyx_t_7 = (__pyx_t_6 != 0);
   } else {
-    __pyx_t_7 = __pyx_t_8;
+    __pyx_t_7 = (__pyx_t_8 != 0);
   }
   if (__pyx_t_7) {
 
-    /* "bayesopt.pyx":127
- *     smu = dparams.get('s_mu',None)
+    /* "bayesopt.pyx":146
+ *     smu = dparams.get('mean_coef_std',None)
  *     if mu is not None and smu is not None:
  *         params.mean.n_coef = len(mu)             # <<<<<<<<<<<<<<
  *         for i in range(0,params.mean.n_coef):
  *             params.mean.coef_mean[i] = mu[i]
  */
-    __pyx_t_9 = PyObject_Length(__pyx_v_mu); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyObject_Length(__pyx_v_mu); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_params.mean.n_coef = __pyx_t_9;
 
-    /* "bayesopt.pyx":128
+    /* "bayesopt.pyx":147
  *     if mu is not None and smu is not None:
  *         params.mean.n_coef = len(mu)
  *         for i in range(0,params.mean.n_coef):             # <<<<<<<<<<<<<<
     for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_3; __pyx_t_10+=1) {
       __pyx_v_i = __pyx_t_10;
 
-      /* "bayesopt.pyx":129
+      /* "bayesopt.pyx":148
  *         params.mean.n_coef = len(mu)
  *         for i in range(0,params.mean.n_coef):
  *             params.mean.coef_mean[i] = mu[i]             # <<<<<<<<<<<<<<
  *             params.mean.coef_std[i] = smu[i]
  * 
  */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_mu, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 129; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      (__pyx_v_params.mean.coef_mean[__pyx_v_i]) = __pyx_t_6;
-
-      /* "bayesopt.pyx":130
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_mu, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      (__pyx_v_params.mean.coef_mean[__pyx_v_i]) = __pyx_t_5;
+
+      /* "bayesopt.pyx":149
  *         for i in range(0,params.mean.n_coef):
  *             params.mean.coef_mean[i] = mu[i]
  *             params.mean.coef_std[i] = smu[i]             # <<<<<<<<<<<<<<
  * 
+ *     cname = dparams.get('crit_name',params.crit_name)
+ */
+      __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_smu, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_GOTREF(__pyx_t_2);
+      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+      (__pyx_v_params.mean.coef_std[__pyx_v_i]) = __pyx_t_5;
+    }
+    goto __pyx_L8;
+  }
+  __pyx_L8:;
+
+  /* "bayesopt.pyx":151
+ *             params.mean.coef_std[i] = smu[i]
+ * 
+ *     cname = dparams.get('crit_name',params.crit_name)             # <<<<<<<<<<<<<<
+ *     params.crit_name = cname
+ * 
+ */
+  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
+    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  }
+  __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_params.crit_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__crit_name), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
+  __pyx_v_cname = __pyx_t_1;
+  __pyx_t_1 = 0;
+
+  /* "bayesopt.pyx":152
+ * 
+ *     cname = dparams.get('crit_name',params.crit_name)
+ *     params.crit_name = cname             # <<<<<<<<<<<<<<
+ * 
  *     cp = dparams.get('crit_params',None)
  */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_smu, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 130; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      (__pyx_v_params.mean.coef_std[__pyx_v_i]) = __pyx_t_6;
-    }
-    goto __pyx_L7;
-  }
-  __pyx_L7:;
-
-  /* "bayesopt.pyx":132
- *             params.mean.coef_std[i] = smu[i]
+  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_v_cname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_v_params.crit_name = __pyx_t_4;
+
+  /* "bayesopt.pyx":154
+ *     params.crit_name = cname
  * 
  *     cp = dparams.get('crit_params',None)             # <<<<<<<<<<<<<<
  *     if cp is not None:
  */
   if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
     PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   }
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__crit_params), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__crit_params), Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __pyx_v_cp = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "bayesopt.pyx":133
+  /* "bayesopt.pyx":155
  * 
  *     cp = dparams.get('crit_params',None)
  *     if cp is not None:             # <<<<<<<<<<<<<<
  *         for i in range(0,params.n_crit_params):
  */
   __pyx_t_7 = (__pyx_v_cp != Py_None);
-  if (__pyx_t_7) {
-
-    /* "bayesopt.pyx":134
+  __pyx_t_8 = (__pyx_t_7 != 0);
+  if (__pyx_t_8) {
+
+    /* "bayesopt.pyx":156
  *     cp = dparams.get('crit_params',None)
  *     if cp is not None:
  *         params.n_crit_params = len(cp)             # <<<<<<<<<<<<<<
  *         for i in range(0,params.n_crit_params):
  *             params.crit_params[i] = cp[i]
  */
-    __pyx_t_9 = PyObject_Length(__pyx_v_cp); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_9 = PyObject_Length(__pyx_v_cp); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __pyx_v_params.n_crit_params = __pyx_t_9;
 
-    /* "bayesopt.pyx":135
+    /* "bayesopt.pyx":157
  *     if cp is not None:
  *         params.n_crit_params = len(cp)
  *         for i in range(0,params.n_crit_params):             # <<<<<<<<<<<<<<
     for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_3; __pyx_t_10+=1) {
       __pyx_v_i = __pyx_t_10;
 
-      /* "bayesopt.pyx":136
+      /* "bayesopt.pyx":158
  *         params.n_crit_params = len(cp)
  *         for i in range(0,params.n_crit_params):
  *             params.crit_params[i] = cp[i]             # <<<<<<<<<<<<<<
  * 
- *     kname = dparams.get('kernel_name',params.kernel.name)
- */
-      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cp, __pyx_v_i, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ *     return params
+ */
+      __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cp, __pyx_v_i, sizeof(long), PyInt_FromLong, 0, 1, 1); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
-      __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+      __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-      (__pyx_v_params.crit_params[__pyx_v_i]) = __pyx_t_6;
-    }
-    goto __pyx_L10;
+      (__pyx_v_params.crit_params[__pyx_v_i]) = __pyx_t_5;
+    }
+    goto __pyx_L11;
   }
-  __pyx_L10:;
-
-  /* "bayesopt.pyx":138
+  __pyx_L11:;
+
+  /* "bayesopt.pyx":160
  *             params.crit_params[i] = cp[i]
  * 
- *     kname = dparams.get('kernel_name',params.kernel.name)             # <<<<<<<<<<<<<<
- *     params.kernel.name = kname;
- * 
- */
-  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
-    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_params.kernel.name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__kernel_name), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_v_kname = __pyx_t_2;
-  __pyx_t_2 = 0;
-
-  /* "bayesopt.pyx":139
- * 
- *     kname = dparams.get('kernel_name',params.kernel.name)
- *     params.kernel.name = kname;             # <<<<<<<<<<<<<<
- * 
- *     mname = dparams.get('mean_name',params.mean.name)
- */
-  __pyx_t_4 = PyBytes_AsString(__pyx_v_kname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_params.kernel.name = __pyx_t_4;
-
-  /* "bayesopt.pyx":141
- *     params.kernel.name = kname;
- * 
- *     mname = dparams.get('mean_name',params.mean.name)             # <<<<<<<<<<<<<<
- *     params.mean.name = mname
- * 
- */
-  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
-    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_2 = PyBytes_FromString(__pyx_v_params.mean.name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
-  __pyx_t_1 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__mean_name), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 141; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_1);
-  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
-  __pyx_v_mname = __pyx_t_1;
-  __pyx_t_1 = 0;
-
-  /* "bayesopt.pyx":142
- * 
- *     mname = dparams.get('mean_name',params.mean.name)
- *     params.mean.name = mname             # <<<<<<<<<<<<<<
- * 
- *     cname = dparams.get('crit_name',params.crit_name)
- */
-  __pyx_t_4 = PyBytes_AsString(__pyx_v_mname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_params.mean.name = __pyx_t_4;
-
-  /* "bayesopt.pyx":144
- *     params.mean.name = mname
- * 
- *     cname = dparams.get('crit_name',params.crit_name)             # <<<<<<<<<<<<<<
- *     params.crit_name = cname
- * 
- */
-  if (unlikely(((PyObject *)__pyx_v_dparams) == Py_None)) {
-    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "get");
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  }
-  __pyx_t_1 = PyBytes_FromString(__pyx_v_params.crit_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  __pyx_t_2 = __Pyx_PyDict_GetItemDefault(((PyObject *)__pyx_v_dparams), ((PyObject *)__pyx_n_s__crit_name), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __Pyx_GOTREF(__pyx_t_2);
-  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-  __pyx_v_cname = __pyx_t_2;
-  __pyx_t_2 = 0;
-
-  /* "bayesopt.pyx":145
- * 
- *     cname = dparams.get('crit_name',params.crit_name)
- *     params.crit_name = cname             # <<<<<<<<<<<<<<
- * 
- *     return params
- */
-  __pyx_t_4 = PyBytes_AsString(__pyx_v_cname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 145; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  __pyx_v_params.crit_name = __pyx_t_4;
-
-  /* "bayesopt.pyx":147
- *     params.crit_name = cname
- * 
  *     return params             # <<<<<<<<<<<<<<
  * 
  * cdef double callback(unsigned int n, const_double_ptr x,
   __Pyx_XDECREF(__pyx_v_logname);
   __Pyx_XDECREF(__pyx_v_sname);
   __Pyx_XDECREF(__pyx_v_learning);
+  __Pyx_XDECREF(__pyx_v_score);
+  __Pyx_XDECREF(__pyx_v_kname);
   __Pyx_XDECREF(__pyx_v_theta);
   __Pyx_XDECREF(__pyx_v_stheta);
+  __Pyx_XDECREF(__pyx_v_mname);
   __Pyx_XDECREF(__pyx_v_mu);
   __Pyx_XDECREF(__pyx_v_smu);
+  __Pyx_XDECREF(__pyx_v_cname);
   __Pyx_XDECREF(__pyx_v_cp);
-  __Pyx_XDECREF(__pyx_v_kname);
-  __Pyx_XDECREF(__pyx_v_mname);
-  __Pyx_XDECREF(__pyx_v_cname);
   __Pyx_RefNannyFinishContext();
   return __pyx_r;
 }
 
-/* "bayesopt.pyx":149
+/* "bayesopt.pyx":162
  *     return params
  * 
  * cdef double callback(unsigned int n, const_double_ptr x,             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("callback", 0);
 
-  /* "bayesopt.pyx":151
+  /* "bayesopt.pyx":164
  * cdef double callback(unsigned int n, const_double_ptr x,
  *                      double *gradient, void *func_data):
  *     x_np = np.zeros(n)             # <<<<<<<<<<<<<<
  *     for i in range(0,n):
  *         x_np[i] = <double>x[i]
  */
-  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s__np); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s__zeros); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_2);
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_n); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
-  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_3);
   PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
   __Pyx_GIVEREF(__pyx_t_1);
   __pyx_t_1 = 0;
-  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(__pyx_t_1);
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
   __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
   __pyx_v_x_np = __pyx_t_1;
   __pyx_t_1 = 0;
 
-  /* "bayesopt.pyx":152
+  /* "bayesopt.pyx":165
  *                      double *gradient, void *func_data):
  *     x_np = np.zeros(n)
  *     for i in range(0,n):             # <<<<<<<<<<<<<<
  *         x_np[i] = <double>x[i]
- *         result = (<object>func_data)(x_np)
+ *     result = (<object>func_data)(x_np)
  */
   __pyx_t_4 = __pyx_v_n;
   for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
     __pyx_v_i = __pyx_t_5;
 
-    /* "bayesopt.pyx":153
+    /* "bayesopt.pyx":166
  *     x_np = np.zeros(n)
  *     for i in range(0,n):
  *         x_np[i] = <double>x[i]             # <<<<<<<<<<<<<<
- *         result = (<object>func_data)(x_np)
+ *     result = (<object>func_data)(x_np)
  *     return result
  */
-    __pyx_t_1 = PyFloat_FromDouble(((double)(__pyx_v_x[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    __pyx_t_1 = PyFloat_FromDouble(((double)(__pyx_v_x[__pyx_v_i]))); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_GOTREF(__pyx_t_1);
-    if (__Pyx_SetItemInt(__pyx_v_x_np, __pyx_v_i, __pyx_t_1, sizeof(long), PyInt_FromLong) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+    if (__Pyx_SetItemInt(__pyx_v_x_np, __pyx_v_i, __pyx_t_1, sizeof(long), PyInt_FromLong, 0, 1, 1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-
-    /* "bayesopt.pyx":154
+  }
+
+  /* "bayesopt.pyx":167
  *     for i in range(0,n):
  *         x_np[i] = <double>x[i]
- *         result = (<object>func_data)(x_np)             # <<<<<<<<<<<<<<
+ *     result = (<object>func_data)(x_np)             # <<<<<<<<<<<<<<
  *     return result
  * 
  */
-    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_1);
-    __Pyx_INCREF(__pyx_v_x_np);
-    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x_np);
-    __Pyx_GIVEREF(__pyx_v_x_np);
-    __pyx_t_3 = PyObject_Call(((PyObject *)__pyx_v_func_data), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-    __Pyx_GOTREF(__pyx_t_3);
-    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
-    __Pyx_XDECREF(__pyx_v_result);
-    __pyx_v_result = __pyx_t_3;
-    __pyx_t_3 = 0;
-  }
-
-  /* "bayesopt.pyx":155
+  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_1);
+  __Pyx_INCREF(__pyx_v_x_np);
+  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x_np);
+  __Pyx_GIVEREF(__pyx_v_x_np);
+  __pyx_t_3 = PyObject_Call(((PyObject *)__pyx_v_func_data), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __Pyx_GOTREF(__pyx_t_3);
+  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
+  __pyx_v_result = __pyx_t_3;
+  __pyx_t_3 = 0;
+
+  /* "bayesopt.pyx":168
  *         x_np[i] = <double>x[i]
- *         result = (<object>func_data)(x_np)
+ *     result = (<object>func_data)(x_np)
  *     return result             # <<<<<<<<<<<<<<
  * 
  * 
  */
-  if (unlikely(!__pyx_v_result)) { __Pyx_RaiseUnboundLocalError("result"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} }
-  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_result); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_result); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __pyx_r = __pyx_t_6;
   goto __pyx_L0;
 
   return __pyx_r;
 }
 
-/* "bayesopt.pyx":158
+/* "bayesopt.pyx":171
  * 
  * 
  * def initialize_params():             # <<<<<<<<<<<<<<
   int __pyx_clineno = 0;
   __Pyx_RefNannySetupContext("initialize_params", 0);
 
-  /* "bayesopt.pyx":159
+  /* "bayesopt.pyx":172
  * 
  * def initialize_params():
  *     params = {             # <<<<<<<<<<<<<<
  *         "n_iterations"   : 300,
  *         "n_inner_iterations" : 500,
  */
-  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_iterations), __pyx_int_300) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_inner_iterations), __pyx_int_500) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_init_samples), __pyx_int_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_iter_relearn), __pyx_int_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__verbose_level), __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__log_filename), ((PyObject *)__pyx_kp_s_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__surr_name), ((PyObject *)__pyx_n_s__sGaussianProcess)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
-
-  /* "bayesopt.pyx":167
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_iterations), __pyx_int_300) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_inner_iterations), __pyx_int_500) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__n_init_samples), __pyx_int_30) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}