diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index df5a6ad..fd35775 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -24,7 +24,7 @@ standards. rating of 10/10. - Ensure to profile your modules and move any bottlenecks to a low latency system/module. - Ensure to add unit tests with corner cases and achieve 100% code coverage. -- Limit the use of third party libraries. If you do have to use them, ensure that it exists in [bigRED environment](https://wiki.target.com/tgtwiki/index.php/Portal:BigRED/_Software_Libraries). +- Limit the use of third party libraries. If you do have to use them, ensure that it exists in production environment. - Follow [pull request](PULL_REQUEST_TEMPLATE.md) guidelines. ### Guidelines diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6e3bc20..9652cab 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -19,7 +19,7 @@ Please select option(s) that are relevant. Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration -- [ ] Unit tests in the code +- [ ] Unit/Integration tests in the code - [ ] Code runs locally without any warnings/errors with test files ## Checklist: diff --git a/.github/workflows/python.yml b/.github/workflows/checks.yml similarity index 72% rename from .github/workflows/python.yml rename to .github/workflows/checks.yml index 99d197b..7745894 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/checks.yml @@ -1,7 +1,20 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions +# ============================================================================= +# Workflow for checks +# +# Objective: +# - Install python dependencies +# - Run linter +# - Run tests +# +# Version: 0.1.0 +# +# Author: Diptesh +# +# Date: May 03, 2020 +# +# ============================================================================= -name: Python +name: checks on: push: @@ -40,7 +53,7 @@ jobs: - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --extend-ignore=E402 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest diff --git a/README.md b/README.md index bd1074c..9be7aef 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -[![Python](https://github.com/bdiptesh/mllib/actions/workflows/python.yml/badge.svg)](https://github.com/bdiptesh/mllib/actions/workflows/python.yml) -[![pylint Score](https://mperlet.github.io/pybadge/badges/10.0.svg)](./log/pylint/) -[![Coverage score](https://img.shields.io/badge/coverage-100%25-dagreen.svg)](./log/cov.out) -[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![checks](../../actions/workflows/checks.yml/badge.svg)](../../actions/workflows/checks.yml) +[![pylint Score](https://mperlet.github.io/pybadge/badges/10.0.svg)](./logs/pylint/) +[![Coverage score](https://img.shields.io/badge/coverage-100%25-dagreen.svg)](./logs/cov.out) +[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](./LICENSE) *** ## Table of contents @@ -17,6 +17,7 @@ 1. [Initial setup](./README.md#initial-setup) 1. [Unit tests](./README.md#run-unit-tests-and-pylint-ratings) 1. [Important links](./README.md#important-links) +1. [License](./LICENSE) *** ## Introduction @@ -75,7 +76,7 @@ Available options: -r code rating. ``` The pylint ratings for each python script can be found at -[log/pylint/](./log/pylint/) +[logs/pylint/](./logs/pylint/) *** ## Important links diff --git a/bin/metrics/build.sh b/bin/metrics/build.sh new file mode 100644 index 0000000..c233a63 --- /dev/null +++ b/bin/metrics/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# ============================================================================= +# Shared objects +# +# Objective: Build compiled shared objects (*.so files) from *pyx files. +# +# Version: 0.1.0 +# +# Author: Diptesh +# +# Date: Apr 17, 2020 +# +# ============================================================================= + +python setup.py build_ext --inplace + +pat="\.\/[^\/]+\.so" + +for i in $(find -name "*.so") +do + if [[ $i =~ $pat ]] + then + file_new=$(sed -E 's/(\.\/)([a-z0-9]+)(\..+\.so)/\2.so/' <<< $i) + file_old=$(sed -E 's/(\.\/)(.+)/\2/' <<< $i) + mv $file_old $file_new + fi +done diff --git a/bin/metrics/build/lib.linux-x86_64-3.7/metrics.cpython-37m-x86_64-linux-gnu.so b/bin/metrics/build/lib.linux-x86_64-3.7/metrics.cpython-37m-x86_64-linux-gnu.so new file mode 100644 index 0000000..c972ad9 Binary files /dev/null and b/bin/metrics/build/lib.linux-x86_64-3.7/metrics.cpython-37m-x86_64-linux-gnu.so differ diff --git a/bin/metrics/build/temp.linux-x86_64-3.7/metrics.o b/bin/metrics/build/temp.linux-x86_64-3.7/metrics.o new file mode 100644 index 0000000..f0c644c Binary files /dev/null and b/bin/metrics/build/temp.linux-x86_64-3.7/metrics.o differ diff --git a/bin/metrics/metrics.c b/bin/metrics/metrics.c new file mode 100644 index 0000000..ea9ce05 --- /dev/null +++ b/bin/metrics/metrics.c @@ -0,0 +1,4319 @@ +/* Generated by Cython 0.29.15 */ + +/* BEGIN: Cython Metadata +{ + "distutils": { + "name": "metrics", + "sources": [ + "metrics.pyx" + ] + }, + "module_name": "metrics" +} +END: Cython Metadata */ + +#define PY_SSIZE_T_CLEAN +#include "Python.h" +#ifndef Py_PYTHON_H + #error Python headers needed to compile C extensions, please install development version of Python. +#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. +#else +#define CYTHON_ABI "0_29_15" +#define CYTHON_HEX_VERSION 0x001D0FF0 +#define CYTHON_FUTURE_DIVISION 0 +#include +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif +#define __PYX_COMMA , +#ifndef HAVE_LONG_LONG + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #ifndef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 1 + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif +#endif +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif +#if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #undef SHIFT + #undef BASE + #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" +#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func)\ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif +#if CYTHON_COMPILING_IN_PYSTON + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +#endif +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #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 +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact + #define PyObject_Unicode PyObject_Str +#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_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t PyInt_AsLong +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t +#endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + +#if defined(WIN32) || defined(MS_WINDOWS) + #define _USE_MATH_DEFINES +#endif +#include +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + + +#define __PYX_ERR(f_index, lineno, Ln_error) \ +{ \ + __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ +} + +#ifndef __PYX_EXTERN_C + #ifdef __cplusplus + #define __PYX_EXTERN_C extern "C" + #else + #define __PYX_EXTERN_C extern + #endif +#endif + +#define __PYX_HAVE__metrics +#define __PYX_HAVE_API__metrics +/* Early includes */ +#ifdef _OPENMP +#include +#endif /* _OPENMP */ + +#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS) +#define CYTHON_WITHOUT_ASSERTIONS +#endif + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\ + (sizeof(type) < sizeof(Py_ssize_t)) ||\ + (sizeof(type) > sizeof(Py_ssize_t) &&\ + likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX) &&\ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\ + v == (type)PY_SSIZE_T_MIN))) ||\ + (sizeof(type) == sizeof(Py_ssize_t) &&\ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const 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_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} +#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_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); +#define __Pyx_PySequence_Tuple(obj)\ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +#if CYTHON_ASSUME_SAFE_MACROS +#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 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(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(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + 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) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(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 '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + 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(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + + +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ + #define likely(x) (x) + #define unlikely(x) (x) +#endif /* __GNUC__ */ +static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; } + +static PyObject *__pyx_m = NULL; +static PyObject *__pyx_d; +static PyObject *__pyx_b; +static PyObject *__pyx_cython_runtime = NULL; +static PyObject *__pyx_empty_tuple; +static PyObject *__pyx_empty_bytes; +static PyObject *__pyx_empty_unicode; +static int __pyx_lineno; +static int __pyx_clineno = 0; +static const char * __pyx_cfilenm= __FILE__; +static const char *__pyx_filename; + + +static const char *__pyx_f[] = { + "metrics.pyx", +}; + +/*--- Type declarations ---*/ + +/* --- Runtime support code (head) --- */ +/* Refnanny.proto */ +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + if (acquire_gil) {\ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + PyGILState_Release(__pyx_gilstate_save);\ + } else {\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil)\ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext()\ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif +#define __Pyx_XDECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_XDECREF(tmp);\ + } while (0) +#define __Pyx_DECREF_SET(r, v) do {\ + PyObject *tmp = (PyObject *) r;\ + r = v; __Pyx_DECREF(tmp);\ + } while (0) +#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) + +/* PyObjectGetAttrStr.proto */ +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name); +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/* GetBuiltinName.proto */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name); + +/* PyDictVersioning.proto */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/* GetModuleGlobalName.proto */ +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyFunctionFastCall.proto */ +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs)\ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif + +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCall.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/* GetItemInt.proto */ +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static 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); + +/* RaiseArgTupleInvalid.proto */ +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); + +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + +/* ArgTypeTest.proto */ +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\ + __Pyx__ArgTypeTest(obj, type, name, exact)) +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); + +/* Import.proto */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); + +/* PyThreadStateGet.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; +#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + +/* PyErrFetchRestore.proto */ +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/* CLineInTraceback.proto */ +#ifdef CYTHON_CLINE_IN_TRACEBACK +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line); +#endif + +/* CodeObjectCache.proto */ +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/* AddTraceback.proto */ +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +/* CIntToPy.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +/* CIntFromPy.proto */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); + +/* CIntFromPy.proto */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); + +/* FastTypeChecks.proto */ +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type); +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2); +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/* CheckBinaryVersion.proto */ +static int __Pyx_check_binary_version(void); + +/* InitStrings.proto */ +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); + + +/* Module declarations from 'metrics' */ +static PyObject *__pyx_f_7metrics_rsq(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_7metrics_mse(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_7metrics_rmse(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_7metrics_mae(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +static PyObject *__pyx_f_7metrics_mape(PyObject *, PyObject *, int __pyx_skip_dispatch); /*proto*/ +#define __Pyx_MODULE_NAME "metrics" +extern int __pyx_module_is_main_metrics; +int __pyx_module_is_main_metrics = 0; + +/* Implementation of 'metrics' */ +static PyObject *__pyx_builtin_range; +static const char __pyx_k_y[] = "y"; +static const char __pyx_k_np[] = "_np"; +static const char __pyx_k_main[] = "__main__"; +static const char __pyx_k_name[] = "__name__"; +static const char __pyx_k_test[] = "__test__"; +static const char __pyx_k_numpy[] = "numpy"; +static const char __pyx_k_range[] = "range"; +static const char __pyx_k_round[] = "round"; +static const char __pyx_k_y_hat[] = "y_hat"; +static const char __pyx_k_import[] = "__import__"; +static const char __pyx_k_corrcoef[] = "corrcoef"; +static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +static const char __pyx_k_Common_metrics_required_in_mach[] = "\nCommon metrics required in machine learning modules.\n\n**Available functions:**\n - ``rsq``: R-Squared\n - ``mse``: Mean squared error\n - ``rmse``: Root mean squared error\n - ``mae``: Mean absolute error\n - ``mape``: Mean absolute percentage error\n\nCredits\n-------\n::\n\n Authors:\n - Diptesh\n\n Date: Sep 10, 2021\n"; +static PyObject *__pyx_n_s_cline_in_traceback; +static PyObject *__pyx_n_s_corrcoef; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_name; +static PyObject *__pyx_n_s_np; +static PyObject *__pyx_n_s_numpy; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_round; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_y; +static PyObject *__pyx_n_s_y_hat; +static PyObject *__pyx_pf_7metrics_rsq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat); /* proto */ +static PyObject *__pyx_pf_7metrics_2mse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat); /* proto */ +static PyObject *__pyx_pf_7metrics_4rmse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat); /* proto */ +static PyObject *__pyx_pf_7metrics_6mae(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat); /* proto */ +static PyObject *__pyx_pf_7metrics_8mape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat); /* proto */ +static PyObject *__pyx_float_0_5; +static PyObject *__pyx_int_2; +static PyObject *__pyx_int_3; +/* Late includes */ + +/* "metrics.pyx":28 + * + * + * cpdef rsq(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Coefficient of determination + */ + +static PyObject *__pyx_pw_7metrics_1rsq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_7metrics_rsq(PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; + PyObject *__pyx_t_7 = NULL; + __Pyx_RefNannySetupContext("rsq", 0); + + /* "metrics.pyx":51 + * + * """ + * return _np.round(_np.corrcoef(y, y_hat)[0][1] ** 2, 3) # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_round); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_corrcoef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_y, __pyx_v_y_hat}; + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { + PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_y, __pyx_v_y_hat}; + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_2); + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_INCREF(__pyx_v_y); + __Pyx_GIVEREF(__pyx_v_y); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_y); + __Pyx_INCREF(__pyx_v_y_hat); + __Pyx_GIVEREF(__pyx_v_y_hat); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_y_hat); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyNumber_Power(__pyx_t_2, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_6 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_int_3}; + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_5, __pyx_int_3}; + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + } else + #endif + { + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_2) { + __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL; + } + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_5); + __Pyx_INCREF(__pyx_int_3); + __Pyx_GIVEREF(__pyx_int_3); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_int_3); + __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "metrics.pyx":28 + * + * + * cpdef rsq(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Coefficient of determination + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_AddTraceback("metrics.rsq", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7metrics_1rsq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7metrics_rsq[] = "\n Compute `Coefficient of determination\n `_\n or R-Squared.\n\n Parameters\n ----------\n y : list\n\n Actual values.\n\n y_hat : list\n\n Predicted values.\n\n Returns\n -------\n op : float\n\n R-Squared value.\n\n "; +static PyObject *__pyx_pw_7metrics_1rsq(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_y = 0; + PyObject *__pyx_v_y_hat = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("rsq (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_y_hat,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y_hat)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("rsq", 1, 2, 2, 1); __PYX_ERR(0, 28, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rsq") < 0)) __PYX_ERR(0, 28, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_y = ((PyObject*)values[0]); + __pyx_v_y_hat = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("rsq", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("metrics.rsq", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), (&PyList_Type), 1, "y", 1))) __PYX_ERR(0, 28, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_hat), (&PyList_Type), 1, "y_hat", 1))) __PYX_ERR(0, 28, __pyx_L1_error) + __pyx_r = __pyx_pf_7metrics_rsq(__pyx_self, __pyx_v_y, __pyx_v_y_hat); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7metrics_rsq(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("rsq", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_7metrics_rsq(__pyx_v_y, __pyx_v_y_hat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("metrics.rsq", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "metrics.pyx":54 + * + * + * cpdef mse(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Mean squared error + */ + +static PyObject *__pyx_pw_7metrics_3mse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_7metrics_mse(PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_i; + int __pyx_v_arr_len; + double __pyx_v_a; + double __pyx_v_b; + double __pyx_v_op; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + double __pyx_t_6; + __Pyx_RefNannySetupContext("mse", 0); + + /* "metrics.pyx":80 + * cdef double a + * cdef double b + * cdef double op = 0.0 # <<<<<<<<<<<<<< + * arr_len = len(y) + * for i in range(0, arr_len, 1): + */ + __pyx_v_op = 0.0; + + /* "metrics.pyx":81 + * cdef double b + * cdef double op = 0.0 + * arr_len = len(y) # <<<<<<<<<<<<<< + * for i in range(0, arr_len, 1): + * a = y[i] + */ + if (unlikely(__pyx_v_y == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 81, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_y); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_v_arr_len = __pyx_t_1; + + /* "metrics.pyx":82 + * cdef double op = 0.0 + * arr_len = len(y) + * for i in range(0, arr_len, 1): # <<<<<<<<<<<<<< + * a = y[i] + * b = y_hat[i] + */ + __pyx_t_2 = __pyx_v_arr_len; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "metrics.pyx":83 + * arr_len = len(y) + * for i in range(0, arr_len, 1): + * a = y[i] # <<<<<<<<<<<<<< + * b = y_hat[i] + * op = op + (a - b) ** 2 + */ + if (unlikely(__pyx_v_y == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 83, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_y, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 83, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_a = __pyx_t_6; + + /* "metrics.pyx":84 + * for i in range(0, arr_len, 1): + * a = y[i] + * b = y_hat[i] # <<<<<<<<<<<<<< + * op = op + (a - b) ** 2 + * op = op * arr_len ** -1.0 + */ + if (unlikely(__pyx_v_y_hat == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 84, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_y_hat, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_b = __pyx_t_6; + + /* "metrics.pyx":85 + * a = y[i] + * b = y_hat[i] + * op = op + (a - b) ** 2 # <<<<<<<<<<<<<< + * op = op * arr_len ** -1.0 + * return op + */ + __pyx_v_op = (__pyx_v_op + pow((__pyx_v_a - __pyx_v_b), 2.0)); + } + + /* "metrics.pyx":86 + * b = y_hat[i] + * op = op + (a - b) ** 2 + * op = op * arr_len ** -1.0 # <<<<<<<<<<<<<< + * return op + * + */ + __pyx_v_op = (__pyx_v_op * pow(((double)__pyx_v_arr_len), -1.0)); + + /* "metrics.pyx":87 + * op = op + (a - b) ** 2 + * op = op * arr_len ** -1.0 + * return op # <<<<<<<<<<<<<< + * + * cpdef rmse(list y, list y_hat): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_op); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 87, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "metrics.pyx":54 + * + * + * cpdef mse(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Mean squared error + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("metrics.mse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7metrics_3mse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7metrics_2mse[] = "\n Compute `Mean squared error\n `_.\n\n Parameters\n ----------\n :y: list\n\n Actual values.\n\n :y_hat: list\n\n Predicted values.\n\n Returns\n -------\n :op: float\n\n Mean squared error.\n\n "; +static PyObject *__pyx_pw_7metrics_3mse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_y = 0; + PyObject *__pyx_v_y_hat = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("mse (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_y_hat,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y_hat)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("mse", 1, 2, 2, 1); __PYX_ERR(0, 54, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mse") < 0)) __PYX_ERR(0, 54, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_y = ((PyObject*)values[0]); + __pyx_v_y_hat = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("mse", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 54, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("metrics.mse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), (&PyList_Type), 1, "y", 1))) __PYX_ERR(0, 54, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_hat), (&PyList_Type), 1, "y_hat", 1))) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_r = __pyx_pf_7metrics_2mse(__pyx_self, __pyx_v_y, __pyx_v_y_hat); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7metrics_2mse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("mse", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_7metrics_mse(__pyx_v_y, __pyx_v_y_hat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("metrics.mse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "metrics.pyx":89 + * return op + * + * cpdef rmse(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Root mean square error + */ + +static PyObject *__pyx_pw_7metrics_5rmse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_7metrics_rmse(PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat, CYTHON_UNUSED int __pyx_skip_dispatch) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + __Pyx_RefNannySetupContext("rmse", 0); + + /* "metrics.pyx":111 + * + * """ + * return mse(y, y_hat) ** 0.5 # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_7metrics_mse(__pyx_v_y, __pyx_v_y_hat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyNumber_Power(__pyx_t_1, __pyx_float_0_5, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "metrics.pyx":89 + * return op + * + * cpdef rmse(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Root mean square error + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("metrics.rmse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7metrics_5rmse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7metrics_4rmse[] = "\n Compute `Root mean square error\n `_.\n\n Parameters\n ----------\n y : list\n\n Actual values.\n\n y_hat : list\n\n Predicted values.\n\n Returns\n -------\n op : float\n\n Root mean square error.\n\n "; +static PyObject *__pyx_pw_7metrics_5rmse(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_y = 0; + PyObject *__pyx_v_y_hat = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("rmse (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_y_hat,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y_hat)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("rmse", 1, 2, 2, 1); __PYX_ERR(0, 89, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "rmse") < 0)) __PYX_ERR(0, 89, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_y = ((PyObject*)values[0]); + __pyx_v_y_hat = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("rmse", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 89, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("metrics.rmse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), (&PyList_Type), 1, "y", 1))) __PYX_ERR(0, 89, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_hat), (&PyList_Type), 1, "y_hat", 1))) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_r = __pyx_pf_7metrics_4rmse(__pyx_self, __pyx_v_y, __pyx_v_y_hat); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7metrics_4rmse(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("rmse", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_7metrics_rmse(__pyx_v_y, __pyx_v_y_hat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("metrics.rmse", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "metrics.pyx":114 + * + * + * cpdef mae(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Mean absolute error + */ + +static PyObject *__pyx_pw_7metrics_7mae(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_7metrics_mae(PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_i; + int __pyx_v_arr_len; + double __pyx_v_a; + double __pyx_v_b; + double __pyx_v_op; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + double __pyx_t_6; + __Pyx_RefNannySetupContext("mae", 0); + + /* "metrics.pyx":140 + * cdef double a + * cdef double b + * cdef double op = 0.0 # <<<<<<<<<<<<<< + * arr_len = len(y) + * for i in range(0, arr_len, 1): + */ + __pyx_v_op = 0.0; + + /* "metrics.pyx":141 + * cdef double b + * cdef double op = 0.0 + * arr_len = len(y) # <<<<<<<<<<<<<< + * for i in range(0, arr_len, 1): + * a = y[i] + */ + if (unlikely(__pyx_v_y == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 141, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_y); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 141, __pyx_L1_error) + __pyx_v_arr_len = __pyx_t_1; + + /* "metrics.pyx":142 + * cdef double op = 0.0 + * arr_len = len(y) + * for i in range(0, arr_len, 1): # <<<<<<<<<<<<<< + * a = y[i] + * b = y_hat[i] + */ + __pyx_t_2 = __pyx_v_arr_len; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "metrics.pyx":143 + * arr_len = len(y) + * for i in range(0, arr_len, 1): + * a = y[i] # <<<<<<<<<<<<<< + * b = y_hat[i] + * op += abs(a - b) + */ + if (unlikely(__pyx_v_y == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 143, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_y, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_a = __pyx_t_6; + + /* "metrics.pyx":144 + * for i in range(0, arr_len, 1): + * a = y[i] + * b = y_hat[i] # <<<<<<<<<<<<<< + * op += abs(a - b) + * op = op * arr_len ** -1.0 + */ + if (unlikely(__pyx_v_y_hat == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 144, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_y_hat, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_b = __pyx_t_6; + + /* "metrics.pyx":145 + * a = y[i] + * b = y_hat[i] + * op += abs(a - b) # <<<<<<<<<<<<<< + * op = op * arr_len ** -1.0 + * return op + */ + __pyx_v_op = (__pyx_v_op + fabs((__pyx_v_a - __pyx_v_b))); + } + + /* "metrics.pyx":146 + * b = y_hat[i] + * op += abs(a - b) + * op = op * arr_len ** -1.0 # <<<<<<<<<<<<<< + * return op + * + */ + __pyx_v_op = (__pyx_v_op * pow(((double)__pyx_v_arr_len), -1.0)); + + /* "metrics.pyx":147 + * op += abs(a - b) + * op = op * arr_len ** -1.0 + * return op # <<<<<<<<<<<<<< + * + * + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_op); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 147, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "metrics.pyx":114 + * + * + * cpdef mae(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Mean absolute error + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("metrics.mae", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7metrics_7mae(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7metrics_6mae[] = "\n Compute `Mean absolute error\n `_.\n\n Parameters\n ----------\n y : list\n\n Actual values.\n\n y_hat : list\n\n Predicted values.\n\n Returns\n -------\n op : float\n\n Mean absolute error.\n\n "; +static PyObject *__pyx_pw_7metrics_7mae(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_y = 0; + PyObject *__pyx_v_y_hat = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("mae (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_y_hat,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y_hat)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("mae", 1, 2, 2, 1); __PYX_ERR(0, 114, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mae") < 0)) __PYX_ERR(0, 114, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_y = ((PyObject*)values[0]); + __pyx_v_y_hat = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("mae", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 114, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("metrics.mae", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), (&PyList_Type), 1, "y", 1))) __PYX_ERR(0, 114, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_hat), (&PyList_Type), 1, "y_hat", 1))) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_r = __pyx_pf_7metrics_6mae(__pyx_self, __pyx_v_y, __pyx_v_y_hat); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7metrics_6mae(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("mae", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_7metrics_mae(__pyx_v_y, __pyx_v_y_hat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("metrics.mae", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "metrics.pyx":150 + * + * + * cpdef mape(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Mean absolute percentage error + */ + +static PyObject *__pyx_pw_7metrics_9mape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_f_7metrics_mape(PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat, CYTHON_UNUSED int __pyx_skip_dispatch) { + int __pyx_v_i; + int __pyx_v_arr_len; + double __pyx_v_a; + double __pyx_v_b; + double __pyx_v_op; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + double __pyx_t_6; + __Pyx_RefNannySetupContext("mape", 0); + + /* "metrics.pyx":176 + * cdef double a + * cdef double b + * cdef double op = 0.0 # <<<<<<<<<<<<<< + * arr_len = len(y) + * for i in range(0, arr_len, 1): + */ + __pyx_v_op = 0.0; + + /* "metrics.pyx":177 + * cdef double b + * cdef double op = 0.0 + * arr_len = len(y) # <<<<<<<<<<<<<< + * for i in range(0, arr_len, 1): + * a = y[i] + */ + if (unlikely(__pyx_v_y == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 177, __pyx_L1_error) + } + __pyx_t_1 = PyList_GET_SIZE(__pyx_v_y); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 177, __pyx_L1_error) + __pyx_v_arr_len = __pyx_t_1; + + /* "metrics.pyx":178 + * cdef double op = 0.0 + * arr_len = len(y) + * for i in range(0, arr_len, 1): # <<<<<<<<<<<<<< + * a = y[i] + * b = y_hat[i] + */ + __pyx_t_2 = __pyx_v_arr_len; + __pyx_t_3 = __pyx_t_2; + for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { + __pyx_v_i = __pyx_t_4; + + /* "metrics.pyx":179 + * arr_len = len(y) + * for i in range(0, arr_len, 1): + * a = y[i] # <<<<<<<<<<<<<< + * b = y_hat[i] + * op += abs(1 - (b * a ** -1.0)) + */ + if (unlikely(__pyx_v_y == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 179, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_y, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_a = __pyx_t_6; + + /* "metrics.pyx":180 + * for i in range(0, arr_len, 1): + * a = y[i] + * b = y_hat[i] # <<<<<<<<<<<<<< + * op += abs(1 - (b * a ** -1.0)) + * op = op * arr_len ** -1.0 + */ + if (unlikely(__pyx_v_y_hat == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); + __PYX_ERR(0, 180, __pyx_L1_error) + } + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_y_hat, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_b = __pyx_t_6; + + /* "metrics.pyx":181 + * a = y[i] + * b = y_hat[i] + * op += abs(1 - (b * a ** -1.0)) # <<<<<<<<<<<<<< + * op = op * arr_len ** -1.0 + * return op + */ + __pyx_v_op = (__pyx_v_op + fabs((1.0 - (__pyx_v_b * pow(__pyx_v_a, -1.0))))); + } + + /* "metrics.pyx":182 + * b = y_hat[i] + * op += abs(1 - (b * a ** -1.0)) + * op = op * arr_len ** -1.0 # <<<<<<<<<<<<<< + * return op + */ + __pyx_v_op = (__pyx_v_op * pow(((double)__pyx_v_arr_len), -1.0)); + + /* "metrics.pyx":183 + * op += abs(1 - (b * a ** -1.0)) + * op = op * arr_len ** -1.0 + * return op # <<<<<<<<<<<<<< + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_5 = PyFloat_FromDouble(__pyx_v_op); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L0; + + /* "metrics.pyx":150 + * + * + * cpdef mape(list y, list y_hat): # <<<<<<<<<<<<<< + * """ + * Compute `Mean absolute percentage error + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_AddTraceback("metrics.mape", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_7metrics_9mape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_7metrics_8mape[] = "\n Compute `Mean absolute percentage error\n `_.\n\n Parameters\n ----------\n y : list\n\n Actual values.\n\n y_hat : list\n\n Predicted values.\n\n Returns\n -------\n op : float\n\n Mean absolute percentage error.\n\n "; +static PyObject *__pyx_pw_7metrics_9mape(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_y = 0; + PyObject *__pyx_v_y_hat = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("mape (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_y,&__pyx_n_s_y_hat,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y_hat)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("mape", 1, 2, 2, 1); __PYX_ERR(0, 150, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mape") < 0)) __PYX_ERR(0, 150, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_y = ((PyObject*)values[0]); + __pyx_v_y_hat = ((PyObject*)values[1]); + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("mape", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 150, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("metrics.mape", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y), (&PyList_Type), 1, "y", 1))) __PYX_ERR(0, 150, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_y_hat), (&PyList_Type), 1, "y_hat", 1))) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_r = __pyx_pf_7metrics_8mape(__pyx_self, __pyx_v_y, __pyx_v_y_hat); + + /* function exit code */ + goto __pyx_L0; + __pyx_L1_error:; + __pyx_r = NULL; + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_7metrics_8mape(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_y, PyObject *__pyx_v_y_hat) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannySetupContext("mape", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_7metrics_mape(__pyx_v_y, __pyx_v_y_hat, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("metrics.mape", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyMethodDef __pyx_methods[] = { + {"rsq", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7metrics_1rsq, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7metrics_rsq}, + {"mse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7metrics_3mse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7metrics_2mse}, + {"rmse", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7metrics_5rmse, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7metrics_4rmse}, + {"mae", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7metrics_7mae, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7metrics_6mae}, + {"mape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_7metrics_9mape, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7metrics_8mape}, + {0, 0, 0, 0} +}; + +#if PY_MAJOR_VERSION >= 3 +#if CYTHON_PEP489_MULTI_PHASE_INIT +static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/ +static int __pyx_pymod_exec_metrics(PyObject* module); /*proto*/ +static PyModuleDef_Slot __pyx_moduledef_slots[] = { + {Py_mod_create, (void*)__pyx_pymod_create}, + {Py_mod_exec, (void*)__pyx_pymod_exec_metrics}, + {0, NULL} +}; +#endif + +static struct PyModuleDef __pyx_moduledef = { + PyModuleDef_HEAD_INIT, + "metrics", + __pyx_k_Common_metrics_required_in_mach, /* m_doc */ + #if CYTHON_PEP489_MULTI_PHASE_INIT + 0, /* m_size */ + #else + -1, /* m_size */ + #endif + __pyx_methods /* m_methods */, + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_moduledef_slots, /* m_slots */ + #else + NULL, /* m_reload */ + #endif + NULL, /* m_traverse */ + NULL, /* m_clear */ + NULL /* m_free */ +}; +#endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + +static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, + {&__pyx_n_s_corrcoef, __pyx_k_corrcoef, sizeof(__pyx_k_corrcoef), 0, 0, 1, 1}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, + {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, + {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, + {&__pyx_n_s_y_hat, __pyx_k_y_hat, sizeof(__pyx_k_y_hat), 0, 0, 1, 1}, + {0, 0, 0, 0, 0, 0, 0} +}; +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 82, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); + __Pyx_RefNannyFinishContext(); + return 0; +} + +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { + if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + __pyx_float_0_5 = PyFloat_FromDouble(0.5); if (unlikely(!__pyx_float_0_5)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +} + +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ + +static int __Pyx_modinit_global_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0); + /*--- Global init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0); + /*--- Variable export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_export_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); + /*--- Function export code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_init_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); + /*--- Type init code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_type_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); + /*--- Type import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_variable_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0); + /*--- Variable import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + +static int __Pyx_modinit_function_import_code(void) { + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); + /*--- Function import code ---*/ + __Pyx_RefNannyFinishContext(); + return 0; +} + + +#if PY_MAJOR_VERSION < 3 +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC void +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#else +#ifdef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC +#endif +#endif + + +#if PY_MAJOR_VERSION < 3 +__Pyx_PyMODINIT_FUNC initmetrics(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC initmetrics(void) +#else +__Pyx_PyMODINIT_FUNC PyInit_metrics(void) CYTHON_SMALL_CODE; /*proto*/ +__Pyx_PyMODINIT_FUNC PyInit_metrics(void) +#if CYTHON_PEP489_MULTI_PHASE_INIT +{ + return PyModuleDef_Init(&__pyx_moduledef); +} +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; + if (__pyx_m) + return __Pyx_NewRef(__pyx_m); + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + return module; +bad: + Py_XDECREF(module); + return NULL; +} + + +static CYTHON_SMALL_CODE int __pyx_pymod_exec_metrics(PyObject *__pyx_pyinit_module) +#endif +#endif +{ + PyObject *__pyx_t_1 = NULL; + __Pyx_RefNannyDeclarations + #if CYTHON_PEP489_MULTI_PHASE_INIT + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module 'metrics' has already been imported. Re-initialisation is not supported."); + return -1; + } + #elif PY_MAJOR_VERSION >= 3 + if (__pyx_m) return __Pyx_NewRef(__pyx_m); + #endif + #if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_metrics(void)", 0); + if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif + __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) + __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pyx_CyFunction_USED + if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_FusedFunction_USED + if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Coroutine_USED + if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_Generator_USED + if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + #ifdef __Pyx_StopAsyncIteration_USED + if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + /*--- Library function declarations ---*/ + /*--- Threads initialization code ---*/ + #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS + #ifdef WITH_THREAD /* Python build with threading support? */ + PyEval_InitThreads(); + #endif + #endif + /*--- Module creation code ---*/ + #if CYTHON_PEP489_MULTI_PHASE_INIT + __pyx_m = __pyx_pyinit_module; + Py_INCREF(__pyx_m); + #else + #if PY_MAJOR_VERSION < 3 + __pyx_m = Py_InitModule4("metrics", __pyx_methods, __pyx_k_Common_metrics_required_in_mach, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m); + #else + __pyx_m = PyModule_Create(&__pyx_moduledef); + #endif + if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_d); + __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_b); + __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error) + Py_INCREF(__pyx_cython_runtime); + if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error); + /*--- Initialize various global constants etc. ---*/ + if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + if (__pyx_module_is_main_metrics) { + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error) + if (!PyDict_GetItemString(modules, "metrics")) { + if (unlikely(PyDict_SetItemString(modules, "metrics", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error) + } + } + #endif + /*--- Builtin init code ---*/ + if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; + /*--- Constants init code ---*/ + if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; + /*--- Global type/function init code ---*/ + (void)__Pyx_modinit_global_init_code(); + (void)__Pyx_modinit_variable_export_code(); + (void)__Pyx_modinit_function_export_code(); + (void)__Pyx_modinit_type_init_code(); + (void)__Pyx_modinit_type_import_code(); + (void)__Pyx_modinit_variable_import_code(); + (void)__Pyx_modinit_function_import_code(); + /*--- Execution code ---*/ + #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #endif + + /* "metrics.pyx":21 + * """ + * + * import numpy as _np # <<<<<<<<<<<<<< + * + * # ============================================================================= + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "metrics.pyx":1 + * """ # <<<<<<<<<<<<<< + * Common metrics required in machine learning modules. + * + */ + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /*--- Wrapped vars code ---*/ + + goto __pyx_L0; + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + if (__pyx_m) { + if (__pyx_d) { + __Pyx_AddTraceback("init metrics", __pyx_clineno, __pyx_lineno, __pyx_filename); + } + Py_CLEAR(__pyx_m); + } else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_ImportError, "init metrics"); + } + __pyx_L0:; + __Pyx_RefNannyFinishContext(); + #if CYTHON_PEP489_MULTI_PHASE_INIT + return (__pyx_m != NULL) ? 0 : -1; + #elif PY_MAJOR_VERSION >= 3 + return __pyx_m; + #else + return; + #endif +} + +/* --- Runtime support code --- */ +/* Refnanny */ +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif + +/* PyObjectGetAttrStr */ +#if CYTHON_USE_TYPE_SLOTS +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); +} +#endif + +/* GetBuiltinName */ +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/* PyDictVersioning */ +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif + +/* GetModuleGlobalName */ +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +/* PyFunctionFastCall */ +#if CYTHON_FAST_PYCALL +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + return result; +} +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); +#endif + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif +#endif + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + +/* PyObjectCall */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + +/* GetItemInt */ +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyList_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += PyTuple_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(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 = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/* RaiseArgTupleInvalid */ +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) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + +/* RaiseDoubleKeywords */ +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + +/* ParseKeywords */ +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : + #endif + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + +/* ArgTypeTest */ +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +/* Import */ +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/* CLineInTraceback */ +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/* CodeObjectCache */ +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/* AddTraceback */ +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + #if PY_MAJOR_VERSION < 3 + py_srcfile = PyString_FromString(filename); + #else + py_srcfile = PyUnicode_FromString(filename); + #endif + if (!py_srcfile) goto bad; + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + #else + py_funcname = PyUnicode_FromString(funcname); + #endif + } + if (!py_funcname) goto bad; + py_code = __Pyx_PyCode_New( + 0, + 0, + 0, + 0, + 0, + __pyx_empty_bytes, /*PyObject *code,*/ + __pyx_empty_tuple, /*PyObject *consts,*/ + __pyx_empty_tuple, /*PyObject *names,*/ + __pyx_empty_tuple, /*PyObject *varnames,*/ + __pyx_empty_tuple, /*PyObject *freevars,*/ + __pyx_empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, + __pyx_empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + Py_DECREF(py_funcname); + return py_code; +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); + return NULL; +} +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + py_code = __pyx_find_code_object(c_line ? -c_line : py_line); + if (!py_code) { + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) goto bad; + __pyx_insert_code_object(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + __pyx_d, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); + } +} + +/* CIntToPy */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +/* CIntFromPyVerify */ +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ + {\ + func_type value = func_value;\ + if (sizeof(target_type) < sizeof(func_type)) {\ + if (unlikely(value != (func_type) (target_type) value)) {\ + func_type zero = 0;\ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ + return (target_type) -1;\ + if (is_unsigned && unlikely(value < zero))\ + goto raise_neg_overflow;\ + else\ + goto raise_overflow;\ + }\ + }\ + return (target_type) value;\ + } + +/* CIntFromPy */ +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (int) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { + return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { + return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { + return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (int) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (int) 0; + case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) + case -2: + if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(int) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(int) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(int) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { + return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); + } + } + break; + } +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; + } + } else { + int val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to int"); + return (int) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; +} + +/* CIntFromPy */ +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return (long) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { + return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { + return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { + return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); + } + } + break; + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return (long) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return (long) 0; + case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) + case -2: + if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 2: + if (8 * sizeof(long) > 1 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -3: + if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 3: + if (8 * sizeof(long) > 2 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case -4: + if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + case 4: + if (8 * sizeof(long) > 3 * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) + } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { + return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); + } + } + break; + } +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; + } + } else { + long val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); + Py_DECREF(tmp); + return val; + } +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to long"); + return (long) -1; +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; +} + +/* FastTypeChecks */ +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + return __Pyx_InBases(a, b); +} +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; ip) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} +#else +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else + return PyUnicode_AsUTF8AndSize(o, length); +#endif +} +#endif +#endif +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + case 2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -2: + if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -3: + if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case 4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + case -4: + if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) { + return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])); + } + break; + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +#endif /* Py_PYTHON_H */ diff --git a/bin/metrics/metrics.pyx b/bin/metrics/metrics.pyx new file mode 100644 index 0000000..268ac13 --- /dev/null +++ b/bin/metrics/metrics.pyx @@ -0,0 +1,183 @@ +""" +Common metrics required in machine learning modules. + +**Available functions:** + - ``rsq``: R-Squared + - ``mse``: Mean squared error + - ``rmse``: Root mean squared error + - ``mae``: Mean absolute error + - ``mape``: Mean absolute percentage error + +Credits +------- +:: + + Authors: + - Diptesh + + Date: Sep 10, 2021 +""" + +import numpy as _np + +# ============================================================================= +# --- User defined functions +# ============================================================================= + + +cpdef rsq(list y, list y_hat): + """ + Compute `Coefficient of determination + `_ + or R-Squared. + + Parameters + ---------- + y : list + + Actual values. + + y_hat : list + + Predicted values. + + Returns + ------- + op : float + + R-Squared value. + + """ + return _np.round(_np.corrcoef(y, y_hat)[0][1] ** 2, 3) + + +cpdef mse(list y, list y_hat): + """ + Compute `Mean squared error + `_. + + Parameters + ---------- + :y: list + + Actual values. + + :y_hat: list + + Predicted values. + + Returns + ------- + :op: float + + Mean squared error. + + """ + cdef int i + cdef int arr_len + cdef double a + cdef double b + cdef double op = 0.0 + arr_len = len(y) + for i in range(0, arr_len, 1): + a = y[i] + b = y_hat[i] + op = op + (a - b) ** 2 + op = op * arr_len ** -1.0 + return op + +cpdef rmse(list y, list y_hat): + """ + Compute `Root mean square error + `_. + + Parameters + ---------- + y : list + + Actual values. + + y_hat : list + + Predicted values. + + Returns + ------- + op : float + + Root mean square error. + + """ + return mse(y, y_hat) ** 0.5 + + +cpdef mae(list y, list y_hat): + """ + Compute `Mean absolute error + `_. + + Parameters + ---------- + y : list + + Actual values. + + y_hat : list + + Predicted values. + + Returns + ------- + op : float + + Mean absolute error. + + """ + cdef int i + cdef int arr_len + cdef double a + cdef double b + cdef double op = 0.0 + arr_len = len(y) + for i in range(0, arr_len, 1): + a = y[i] + b = y_hat[i] + op += abs(a - b) + op = op * arr_len ** -1.0 + return op + + +cpdef mape(list y, list y_hat): + """ + Compute `Mean absolute percentage error + `_. + + Parameters + ---------- + y : list + + Actual values. + + y_hat : list + + Predicted values. + + Returns + ------- + op : float + + Mean absolute percentage error. + + """ + cdef int i + cdef int arr_len + cdef double a + cdef double b + cdef double op = 0.0 + arr_len = len(y) + for i in range(0, arr_len, 1): + a = y[i] + b = y_hat[i] + op += abs(1 - (b * a ** -1.0)) + op = op * arr_len ** -1.0 + return op diff --git a/bin/metrics/metrics.so b/bin/metrics/metrics.so new file mode 100644 index 0000000..c972ad9 Binary files /dev/null and b/bin/metrics/metrics.so differ diff --git a/bin/metrics/setup.py b/bin/metrics/setup.py new file mode 100644 index 0000000..abd9145 --- /dev/null +++ b/bin/metrics/setup.py @@ -0,0 +1,7 @@ +"""Setup file.""" + +from setuptools import setup +from Cython.Build import cythonize + +setup(name="Shared objects", + ext_modules=cythonize("*.pyx")) diff --git a/bin/run_tests.sh b/bin/run_tests.sh index 6ca921f..ff63c0e 100644 --- a/bin/run_tests.sh +++ b/bin/run_tests.sh @@ -33,14 +33,14 @@ if [[ $module == "-a" || $module == "-u" ]] then printf "\nRunning unit & integration tests...\n\n" coverage run -m unittest discover -v -s $test_dir -p "test_*.py" - coverage report -m --omit="*/tests/test_*,*/opt/spark-*" > "$proj_dir/log/cov.out" - COV_SCORE=`grep "TOTAL" $proj_dir/log/cov.out | tail -1 | awk '{ printf("%d", $4) }'` + coverage report -m --omit="*/tests/test_*,*/opt/spark-*" > "$proj_dir/logs/cov.out" + COV_SCORE=`grep "TOTAL" $proj_dir/logs/cov.out | tail -1 | awk '{ printf("%d", $4) }'` COV_COLOR="red" if [[ $COV_SCORE == "100" ]] then COV_COLOR="dagreen" fi - sed -i "3s/.*/\[\!\[Coverage score\]\(\https\:\/\/img\.shields\.io\/badge\/coverage\-$COV_SCORE\%25\-$COV_COLOR.svg\)\]\(\.\/log\/cov\.out\)/" "$proj_dir/README.md" + sed -i "3s/.*/\[\!\[Coverage score\]\(\https\:\/\/img\.shields\.io\/badge\/coverage\-$COV_SCORE\%25\-$COV_COLOR.svg\)\]\(\.\/logs\/cov\.out\)/" "$proj_dir/README.md" printf "=%.0s" {1..70} printf "\n" fi @@ -57,11 +57,11 @@ then printf "%-67s %s" "$file" file_dir=$(sed -E 's/(.+\/)(.+\.py)/\1/' <<< $i) cd "$file_dir" - pylint "$i" > "$proj_dir/log/pylint/pylint.out" - PYLINT_SCORE=`grep "Your code has been rated" $proj_dir/log/pylint/pylint.out | cut -d" " -f7 | cut -d"." -f1` + pylint "$i" > "$proj_dir/logs/pylint/pylint.out" + PYLINT_SCORE=`grep "Your code has been rated" $proj_dir/logs/pylint/pylint.out | cut -d" " -f7 | cut -d"." -f1` file_name=$(sed -E 's/(\/)/-/' <<< $file) file_name=$(sed -E 's/(\.)/-/' <<< $file_name) - cp "$proj_dir/log/pylint/pylint.out" "$proj_dir/log/pylint/$file_name.out" + cp "$proj_dir/logs/pylint/pylint.out" "$proj_dir/logs/pylint/$file_name.out" score=$((score + PYLINT_SCORE)) cnt=$((cnt + 1)) printf "$PYLINT_SCORE\n" @@ -70,11 +70,11 @@ then tot_score=$(echo "scale=1; $score/$cnt" | bc) printf "\nTotal score: $tot_score\n" # Add pylint badge to README.md - sed -i "2s/.*/\[\!\[pylint Score\]\(https\:\/\/mperlet\.github\.io\/pybadge\/badges\/$tot_score.svg\)\]\(\.\/log\/pylint\/\)/" "$proj_dir/README.md" + sed -i "2s/.*/\[\!\[pylint Score\]\(https\:\/\/mperlet\.github\.io\/pybadge\/badges\/$tot_score.svg\)\]\(\.\/logs\/pylint\/\)/" "$proj_dir/README.md" printf "=%.0s" {1..70} printf "\n" fi -pipreqs --force $proj_dir &> $proj_dir/log/pip.out +pipreqs --force $proj_dir &> $proj_dir/logs/pip.out exit 0 diff --git a/data/input/iris.csv b/data/input/iris.csv deleted file mode 100644 index d93a29c..0000000 --- a/data/input/iris.csv +++ /dev/null @@ -1,151 +0,0 @@ -x3,x4,x1,x2,y -5.1,3.5,1.4,0.2,0 -4.9,3.0,1.4,0.2,0 -4.7,3.2,1.3,0.2,0 -4.6,3.1,1.5,0.2,0 -5.0,3.6,1.4,0.2,0 -5.4,3.9,1.7,0.4,0 -4.6,3.4,1.4,0.3,0 -5.0,3.4,1.5,0.2,0 -4.4,2.9,1.4,0.2,0 -4.9,3.1,1.5,0.1,0 -5.4,3.7,1.5,0.2,0 -4.8,3.4,1.6,0.2,0 -4.8,3.0,1.4,0.1,0 -4.3,3.0,1.1,0.1,0 -5.8,4.0,1.2,0.2,0 -5.7,4.4,1.5,0.4,0 -5.4,3.9,1.3,0.4,0 -5.1,3.5,1.4,0.3,0 -5.7,3.8,1.7,0.3,0 -5.1,3.8,1.5,0.3,0 -5.4,3.4,1.7,0.2,0 -5.1,3.7,1.5,0.4,0 -4.6,3.6,1.0,0.2,0 -5.1,3.3,1.7,0.5,0 -4.8,3.4,1.9,0.2,0 -5.0,3.0,1.6,0.2,0 -5.0,3.4,1.6,0.4,0 -5.2,3.5,1.5,0.2,0 -5.2,3.4,1.4,0.2,0 -4.7,3.2,1.6,0.2,0 -4.8,3.1,1.6,0.2,0 -5.4,3.4,1.5,0.4,0 -5.2,4.1,1.5,0.1,0 -5.5,4.2,1.4,0.2,0 -4.9,3.1,1.5,0.2,0 -5.0,3.2,1.2,0.2,0 -5.5,3.5,1.3,0.2,0 -4.9,3.6,1.4,0.1,0 -4.4,3.0,1.3,0.2,0 -5.1,3.4,1.5,0.2,0 -5.0,3.5,1.3,0.3,0 -4.5,2.3,1.3,0.3,0 -4.4,3.2,1.3,0.2,0 -5.0,3.5,1.6,0.6,0 -5.1,3.8,1.9,0.4,0 -4.8,3.0,1.4,0.3,0 -5.1,3.8,1.6,0.2,0 -4.6,3.2,1.4,0.2,0 -5.3,3.7,1.5,0.2,0 -5.0,3.3,1.4,0.2,0 -7.0,3.2,4.7,1.4,1 -6.4,3.2,4.5,1.5,1 -6.9,3.1,4.9,1.5,1 -5.5,2.3,4.0,1.3,1 -6.5,2.8,4.6,1.5,1 -5.7,2.8,4.5,1.3,1 -6.3,3.3,4.7,1.6,1 -4.9,2.4,3.3,1.0,1 -6.6,2.9,4.6,1.3,1 -5.2,2.7,3.9,1.4,1 -5.0,2.0,3.5,1.0,1 -5.9,3.0,4.2,1.5,1 -6.0,2.2,4.0,1.0,1 -6.1,2.9,4.7,1.4,1 -5.6,2.9,3.6,1.3,1 -6.7,3.1,4.4,1.4,1 -5.6,3.0,4.5,1.5,1 -5.8,2.7,4.1,1.0,1 -6.2,2.2,4.5,1.5,1 -5.6,2.5,3.9,1.1,1 -5.9,3.2,4.8,1.8,1 -6.1,2.8,4.0,1.3,1 -6.3,2.5,4.9,1.5,1 -6.1,2.8,4.7,1.2,1 -6.4,2.9,4.3,1.3,1 -6.6,3.0,4.4,1.4,1 -6.8,2.8,4.8,1.4,1 -6.7,3.0,5.0,1.7,1 -6.0,2.9,4.5,1.5,1 -5.7,2.6,3.5,1.0,1 -5.5,2.4,3.8,1.1,1 -5.5,2.4,3.7,1.0,1 -5.8,2.7,3.9,1.2,1 -6.0,2.7,5.1,1.6,1 -5.4,3.0,4.5,1.5,1 -6.0,3.4,4.5,1.6,1 -6.7,3.1,4.7,1.5,1 -6.3,2.3,4.4,1.3,1 -5.6,3.0,4.1,1.3,1 -5.5,2.5,4.0,1.3,1 -5.5,2.6,4.4,1.2,1 -6.1,3.0,4.6,1.4,1 -5.8,2.6,4.0,1.2,1 -5.0,2.3,3.3,1.0,1 -5.6,2.7,4.2,1.3,1 -5.7,3.0,4.2,1.2,1 -5.7,2.9,4.2,1.3,1 -6.2,2.9,4.3,1.3,1 -5.1,2.5,3.0,1.1,1 -5.7,2.8,4.1,1.3,1 -6.3,3.3,6.0,2.5,2 -5.8,2.7,5.1,1.9,2 -7.1,3.0,5.9,2.1,2 -6.3,2.9,5.6,1.8,2 -6.5,3.0,5.8,2.2,2 -7.6,3.0,6.6,2.1,2 -4.9,2.5,4.5,1.7,2 -7.3,2.9,6.3,1.8,2 -6.7,2.5,5.8,1.8,2 -7.2,3.6,6.1,2.5,2 -6.5,3.2,5.1,2.0,2 -6.4,2.7,5.3,1.9,2 -6.8,3.0,5.5,2.1,2 -5.7,2.5,5.0,2.0,2 -5.8,2.8,5.1,2.4,2 -6.4,3.2,5.3,2.3,2 -6.5,3.0,5.5,1.8,2 -7.7,3.8,6.7,2.2,2 -7.7,2.6,6.9,2.3,2 -6.0,2.2,5.0,1.5,2 -6.9,3.2,5.7,2.3,2 -5.6,2.8,4.9,2.0,2 -7.7,2.8,6.7,2.0,2 -6.3,2.7,4.9,1.8,2 -6.7,3.3,5.7,2.1,2 -7.2,3.2,6.0,1.8,2 -6.2,2.8,4.8,1.8,2 -6.1,3.0,4.9,1.8,2 -6.4,2.8,5.6,2.1,2 -7.2,3.0,5.8,1.6,2 -7.4,2.8,6.1,1.9,2 -7.9,3.8,6.4,2.0,2 -6.4,2.8,5.6,2.2,2 -6.3,2.8,5.1,1.5,2 -6.1,2.6,5.6,1.4,2 -7.7,3.0,6.1,2.3,2 -6.3,3.4,5.6,2.4,2 -6.4,3.1,5.5,1.8,2 -6.0,3.0,4.8,1.8,2 -6.9,3.1,5.4,2.1,2 -6.7,3.1,5.6,2.4,2 -6.9,3.1,5.1,2.3,2 -5.8,2.7,5.1,1.9,2 -6.8,3.2,5.9,2.3,2 -6.7,3.3,5.7,2.5,2 -6.7,3.0,5.2,2.3,2 -6.3,2.5,5.0,1.9,2 -6.5,3.0,5.2,2.0,2 -6.2,3.4,5.4,2.3,2 -5.9,3.0,5.1,1.8,2 diff --git a/data/input/store.csv b/data/input/store.csv deleted file mode 100644 index 55e3503..0000000 --- a/data/input/store.csv +++ /dev/null @@ -1,1843 +0,0 @@ -y,x1,x2,x3,x4,x5,x6,x7,x8 -3,R100 ,R131 ,17413.06,1.02,80844,5,10,A -4,R100 ,R114 ,23290.41,1.36,82980,5,10,A -5,R100 ,R163 ,18241.02,1.06,80933,5,10,A -12,R100 ,R117 ,20692.01,1.21,69184,7,10,A -13,R300 ,R352 ,8252.73,0.48,69674,6,10,A -19,R100 ,R129 ,16169.47,0.94,74595,6,10,A -26,R100 ,R117 ,20397.41,1.19,72984,7,10,A -43,R300 ,R301 ,18933.64,1.1,81050,6,10,A -48,R100 ,R175 ,14473.25,0.84,78121,8,10,A -52,R100 ,R126 ,17470.96,1.02,73182,5,10,A -55,R300 ,R352 ,11862.25,0.69,75618,6,10,A -61,R100 ,R143 ,31066.83,1.81,79900,8,10,A -64,R100 ,R176 ,26316.01,1.53,80978,8,10,A -67,R300 ,R326 ,8210.73,0.48,74609,6,10,A -68,R100 ,R102 ,13214,0.77,72394,5,10,A -69,R100 ,R105 ,16713.05,0.97,72221,7,10,A -75,R300 ,R311 ,11314.14,0.66,77492,6,10,A -76,R100 ,R143 ,22717.36,1.32,79855,8,10,A -78,R100 ,R147 ,11464.04,0.67,62523,5,10,A -79,R100 ,R176 ,16834.94,0.98,74041,8,10,A -80,R300 ,R326 ,11171.17,0.65,64431,6,10,A -82,R100 ,R110 ,13369.59,0.78,80681,5,10,A -83,R300 ,R352 ,8377.58,0.49,74591,6,10,A -85,R100 ,R143 ,17766.32,1.04,59142,8,10,A -86,R100 ,R127 ,14260.12,0.83,59850,7,10,A -90,R300 ,R332 ,15633,0.91,76659,4,10,A -93,R100 ,R179 ,14529.19,0.85,72158,8,10,A -95,R300 ,R341 ,8524.54,0.5,73885,6,10,A -96,R300 ,R322 ,10237.9,0.6,65671,6,10,A -100,R100 ,R101 ,21131.13,1.23,87002,5,10,A -108,R100 ,R140 ,15754.07,0.92,71622,5,10,A -111,R100 ,R138 ,11261.98,0.66,66487,5,10,A -137,R100 ,R147 ,15292.52,0.89,64431,5,10,A -139,R100 ,R168 ,11471.15,0.67,64721,5,10,A -144,R300 ,R333 ,10607.4,0.62,73295,4,10,A -146,R300 ,R369 ,18405.68,1.07,81849,4,10,A -147,R100 ,R177 ,12738.47,0.74,64658,8,10,A -151,R300 ,R351 ,13956.32,0.81,76401,4,10,A -152,R100 ,R150 ,12321.35,0.72,61912,5,10,A -154,R100 ,R177 ,14698.64,0.86,77392,8,10,A -158,R300 ,R303 ,10653.68,0.62,77114,6,10,A -162,R100 ,R167 ,12722.31,0.74,62900,6,10,A -164,R100 ,R176 ,11060.36,0.65,48505,8,10,A -167,R300 ,R353 ,9746.49,0.57,64427,6,10,A -171,R100 ,R161 ,17392.43,1.01,64978,8,10,A -176,R300 ,R327 ,8160.21,0.48,54334,6,10,A -183,R200 ,R219 ,13248.23,0.77,63185,9,10,A -184,R200 ,R263 ,24366.54,1.42,69243,9,10,A -188,R200 ,R248 ,11887.53,0.69,71593,9,10,A -189,R200 ,R263 ,15584.92,0.91,59354,9,10,A -190,R200 ,R263 ,24461.04,1.43,75264,9,10,A -192,R200 ,R222 ,13160.46,0.77,76558,9,10,A -193,R200 ,R222 ,14146.35,0.83,68708,9,10,A -195,R200 ,R207 ,23764.51,1.39,72859,9,10,A -198,R200 ,R239 ,23030.22,1.34,73725,9,10,A -199,R200 ,R239 ,26726.84,1.56,75022,9,10,A -200,R200 ,R239 ,21217.78,1.24,74377,9,10,A -201,R200 ,R201 ,25958.87,1.51,73626,9,10,A -203,R200 ,R201 ,16166.95,0.94,77253,9,10,A -205,R200 ,R231 ,16046.88,0.94,59508,9,10,A -212,R200 ,R232 ,14804.74,0.86,74467,9,10,A -215,R100 ,R114 ,21632.8,1.26,81513,5,10,A -217,R100 ,R107 ,18711.11,1.09,65702,7,10,A -219,R300 ,R342 ,10912.68,0.64,63415,6,10,A -220,R100 ,R101 ,19106.85,1.11,86457,5,10,A -221,R300 ,R352 ,10463.51,0.61,72153,6,10,A -222,R200 ,R217 ,12018.7,0.7,77076,9,10,A -223,R100 ,R110 ,13154.64,0.77,73069,5,10,A -224,R100 ,R176 ,14574.35,0.85,64499,8,10,A -226,R200 ,R206 ,10126.04,0.59,78081,9,10,A -227,R200 ,R217 ,15610.25,0.91,75351,9,10,A -228,R200 ,R209 ,14994.32,0.87,65908,9,10,A -229,R200 ,R222 ,19104.43,1.11,71296,9,10,A -230,R200 ,R244 ,14022.91,0.82,75821,9,10,A -233,R300 ,R377 ,11728.62,0.68,77536,9,10,A -238,R100 ,R128 ,13388.86,0.78,65788,5,10,A -239,R100 ,R118 ,16367.14,0.95,66234,7,10,A -245,R200 ,R219 ,15621.46,0.91,66047,9,10,A -246,R200 ,R209 ,15074.4,0.88,75764,9,10,A -249,R200 ,R202 ,18977.52,1.11,65847,9,10,A -250,R200 ,R202 ,15300.04,0.89,66600,9,10,A -251,R300 ,R379 ,12822.92,0.75,73509,9,10,A -253,R100 ,R161 ,15975.28,0.93,49740,8,10,A -254,R300 ,R342 ,11721.89,0.68,49242,6,10,A -255,R300 ,R352 ,8613.77,0.5,65457,6,10,A -256,R100 ,R175 ,26823.57,1.56,72029,8,10,A -257,R200 ,R219 ,16386,0.96,75789,9,10,A -258,R200 ,R206 ,11366.3,0.66,66623,9,10,A -259,R200 ,R261 ,18550.29,1.08,80244,9,10,A -260,R100 ,R101 ,16117.45,0.94,63467,5,10,A -264,R300 ,R373 ,12624.49,0.74,61072,9,10,A -265,R300 ,R380 ,11977.66,0.7,81141,9,10,A -267,R200 ,R220 ,17884.67,1.04,81103,9,10,A -271,R100 ,R179 ,16025.48,0.93,76348,8,10,A -273,R200 ,R218 ,16760.95,0.98,76899,9,10,A -274,R200 ,R231 ,15577.34,0.91,71978,9,10,A -275,R200 ,R213 ,12949.36,0.76,66256,9,10,A -278,R100 ,R134 ,14748.05,0.86,75968,5,10,A -279,R100 ,R137 ,11085.89,0.65,77477,5,10,A -280,R100 ,R148 ,11631.64,0.68,76161,5,10,A -281,R100 ,R148 ,9908.12,0.58,78235,5,10,A -282,R100 ,R135 ,15323.94,0.89,73581,5,10,A -286,R200 ,R222 ,14255.01,0.83,61242,9,10,A -288,R200 ,R209 ,22006.37,1.28,81474,9,10,A -289,R200 ,R222 ,14292.38,0.83,61433,9,10,A -290,R200 ,R239 ,18461.78,1.08,86772,9,10,A -291,R200 ,R232 ,13020.93,0.76,60322,9,10,A -293,R200 ,R244 ,13748.59,0.8,62694,9,10,A -294,R200 ,R219 ,21871.31,1.28,80926,9,10,A -296,R200 ,R231 ,14391.37,0.84,67705,9,10,A -298,R200 ,R240 ,16823.13,0.98,80350,9,10,A -299,R200 ,R209 ,13201.29,0.77,65771,9,10,A -300,R200 ,R261 ,12684.69,0.74,63788,9,10,A -301,R200 ,R206 ,3620001.02,211.14,83815,9,10,A -302,R200 ,R263 ,14625.95,0.85,63132,9,10,A -303,R200 ,R261 ,14815.02,0.86,64181,9,10,A -304,R200 ,R231 ,13578.56,0.79,64076,9,10,A -305,R200 ,R231 ,15078.17,0.88,66946,9,10,A -307,R200 ,R205 ,12927.6,0.75,76103,9,10,A -309,R200 ,R240 ,13776.63,0.8,64878,9,10,A -310,R200 ,R246 ,14322.45,0.84,67605,9,10,A -311,R200 ,R220 ,18370.87,1.07,60950,9,10,A -312,R200 ,R220 ,17400.32,1.01,74884,9,10,A -313,R200 ,R246 ,22900.55,1.34,72559,9,10,A -314,R200 ,R213 ,13669.59,0.8,62438,9,10,A -317,R200 ,R208 ,23051.67,1.34,64525,9,10,A -318,R200 ,R208 ,18353.7,1.07,78674,9,10,A -319,R300 ,R379 ,13809.68,0.81,72008,9,10,A -320,R200 ,R210 ,27109.95,1.58,86991,9,10,A -321,R200 ,R210 ,16997.32,0.99,73450,9,10,A -322,R200 ,R210 ,17208.92,1,64752,9,10,A -323,R200 ,R233 ,15363.32,0.9,80548,9,10,A -324,R200 ,R233 ,21284.51,1.24,86940,9,10,A -328,R200 ,R237 ,43726.31,2.55,70781,9,10,A -330,R200 ,R247 ,12027.58,0.7,68082,9,10,A -331,R200 ,R247 ,17419.86,1.02,66921,9,10,A -332,R200 ,R247 ,12368.4,0.72,65852,9,10,A -335,R300 ,R305 ,11422.19,0.67,66727,6,10,A -336,R200 ,R202 ,21101.16,1.23,71527,9,10,A -337,R200 ,R264 ,14635.59,0.85,66550,10,10,A -338,R200 ,R264 ,16602.57,0.97,76473,10,10,A -339,R200 ,R265 ,16888.18,0.99,58755,10,10,A -341,R200 ,R259 ,22173.45,1.29,76337,10,10,A -342,R200 ,R259 ,15013.57,0.88,71806,10,10,A -343,R200 ,R258 ,13540.57,0.79,75090,10,10,A -344,R200 ,R258 ,19060.47,1.11,74577,10,10,A -345,R200 ,R258 ,19543.35,1.14,76378,10,10,A -346,R200 ,R260 ,22555.49,1.32,82049,10,10,A -347,R100 ,R135 ,11678.05,0.68,65415,5,10,A -348,R200 ,R264 ,16714.12,0.97,65578,10,10,A -349,R200 ,R262 ,14038.88,0.82,66290,10,10,A -350,R100 ,R135 ,12169.44,0.71,65379,5,10,A -351,R100 ,R134 ,12084.35,0.7,66018,5,10,A -353,R100 ,R137 ,12788.3,0.75,62972,5,10,A -354,R100 ,R148 ,13587.71,0.79,76345,5,10,A -355,R100 ,R144 ,11952.45,0.7,66017,7,10,A -356,R300 ,R378 ,16005.66,0.93,69067,6,10,A -357,R300 ,R378 ,16083.17,0.94,82732,6,10,A -358,R200 ,R213 ,15717.28,0.92,67402,9,10,A -359,R200 ,R205 ,22621.42,1.32,67096,9,10,A -360,R100 ,R163 ,13269.87,0.77,74426,5,10,A -361,R100 ,R137 ,10869.13,0.63,61750,5,10,A -362,R200 ,R258 ,11993.62,0.7,66740,10,10,A -363,R300 ,R377 ,17075.5,1,66706,9,10,A -364,R100 ,R146 ,15159.91,0.88,66271,5,10,A -365,R100 ,R137 ,13262.49,0.77,66062,5,10,A -366,R100 ,R168 ,17256.12,1.01,65990,4,10,A -373,R300 ,R334 ,14656.24,0.85,80648,4,10,A -397,R100 ,R136 ,12922.53,0.75,67248,5,10,A -530,R100 ,R107 ,19923.38,1.16,103457,7,10,A -531,R100 ,R144 ,16151.47,0.94,84704,7,10,A -532,R100 ,R107 ,17833.54,1.04,98036,7,10,A -533,R100 ,R127 ,34191.9,1.99,89039,7,10,A -604,R100 ,R136 ,14096.32,0.82,67111,5,10,A -606,R200 ,R262 ,17183.87,1,66151,10,10,A -607,R200 ,R262 ,14899.87,0.87,66057,10,10,A -608,R200 ,R260 ,15644.36,0.91,66405,10,10,A -609,R200 ,R260 ,11360.22,0.66,60279,10,10,A -610,R100 ,R136 ,11809.55,0.69,66444,5,10,A -611,R100 ,R137 ,11098.5,0.65,65653,5,10,A -612,R200 ,R260 ,16885.54,0.98,74348,10,10,A -613,R200 ,R260 ,12190.76,0.71,66333,10,10,A -614,R200 ,R250 ,12850.16,0.75,66231,9,10,A -615,R200 ,R208 ,13925.71,0.81,66575,9,10,A -616,R100 ,R137 ,10833.78,0.63,66576,5,10,A -617,R100 ,R161 ,20871.26,1.22,66088,10,10,A -618,R100 ,R177 ,12361,0.72,50149,8,10,A -619,R100 ,R126 ,19079.03,1.11,98794,5,10,A -620,R100 ,R111 ,14951.87,0.87,67544,5,10,A -622,R100 ,R148 ,11238.4,0.66,65458,5,10,A -623,R100 ,R148 ,14675.69,0.86,66573,5,10,A -624,R100 ,R148 ,11932.04,0.7,65750,5,10,A -625,R300 ,R378 ,15289.87,0.89,75376,6,10,A -626,R200 ,R237 ,13135.78,0.77,68252,9,10,A -627,R200 ,R259 ,14874.91,0.87,66207,10,10,A -628,R200 ,R262 ,18734.17,1.09,50594,10,10,A -632,R100 ,R134 ,11463.05,0.67,66097,5,10,A -634,R100 ,R148 ,15091.59,0.88,66189,5,10,A -636,R100 ,R161 ,16625.41,0.97,66748,10,10,A -637,R200 ,R259 ,13760.15,0.8,61785,10,10,A -638,R300 ,R318 ,12475.7,0.73,66168,4,10,A -639,R300 ,R374 ,12022.38,0.7,75334,9,10,A -641,R200 ,R213 ,15340.49,0.89,75407,9,10,A -642,R300 ,R310 ,16165.36,0.94,66799,4,10,A -643,R100 ,R163 ,19057.3,1.11,92458,5,10,A -645,R300 ,R315 ,11095.3,0.65,79182,4,10,A -647,R300 ,R313 ,13955.94,0.81,75669,4,10,A -649,R300 ,R324 ,15011.35,0.88,70602,4,10,A -650,R300 ,R365 ,10206.04,0.6,66253,4,10,A -652,R300 ,R314 ,13283.59,0.77,66845,4,10,A -654,R300 ,R354 ,15300.77,0.89,76687,4,10,A -655,R300 ,R314 ,13824.79,0.81,74609,4,10,A -656,R300 ,R314 ,11401.5,0.66,73212,4,10,A -657,R100 ,R114 ,16250.62,0.95,72026,5,10,A -658,R100 ,R143 ,13334.06,0.78,56072,5,10,A -659,R100 ,R114 ,14857.14,0.87,73784,5,10,A -660,R200 ,R248 ,18044.54,1.05,82029,9,10,A -661,R100 ,R131 ,11975.33,0.7,55260,5,10,A -662,R100 ,R102 ,12920.75,0.75,73838,5,10,A -663,R100 ,R111 ,14683.45,0.86,75436,5,10,A -664,R100 ,R131 ,28491.6,1.66,90014,5,10,A -665,R300 ,R354 ,12082.51,0.7,75447,4,10,A -666,R100 ,R173 ,18710.74,1.09,85468,5,10,A -669,R300 ,R315 ,13741.96,0.8,76207,4,10,A -670,R100 ,R147 ,17538.55,1.02,85753,5,10,A -671,R100 ,R136 ,15063.66,0.88,77104,5,10,A -672,R100 ,R135 ,9472.64,0.55,56980,5,10,A -673,R100 ,R148 ,12272.15,0.72,74994,5,10,A -674,R100 ,R117 ,11906.48,0.69,74825,5,10,A -675,R200 ,R247 ,12611.32,0.74,66790,9,10,A -676,R200 ,R245 ,12996.93,0.76,76516,9,10,A -677,R200 ,R244 ,15104.15,0.88,74961,9,10,A -679,R100 ,R161 ,13577.39,0.79,56269,10,10,A -680,R300 ,R380 ,12815.67,0.75,66975,9,10,A -681,R200 ,R259 ,14110.54,0.82,75520,10,10,A -682,R300 ,R332 ,14346.29,0.84,85748,4,10,A -684,R300 ,R304 ,14466.89,0.84,74003,6,10,A -685,R200 ,R219 ,14253.86,0.83,74776,9,10,A -686,R300 ,R359 ,13970.9,0.81,74939,4,10,A -687,R300 ,R324 ,22537.92,1.31,73964,4,10,A -688,R300 ,R313 ,13191.38,0.77,74889,4,10,A -689,R300 ,R360 ,11874.18,0.69,79256,4,10,A -690,R300 ,R320 ,12607.31,0.74,75475,4,10,A -692,R200 ,R212 ,16675.5,0.97,74657,9,10,A -693,R100 ,R131 ,14323.35,0.84,75068,5,10,A -694,R100 ,R102 ,19843.7,1.16,79452,5,10,A -695,R300 ,R369 ,18813.73,1.1,79827,4,10,A -696,R200 ,R264 ,11071.47,0.65,56332,10,10,A -699,R100 ,R178 ,15547.59,0.91,75653,10,10,A -700,R300 ,R376 ,13718.33,0.8,79122,9,10,A -731,R100 ,R133 ,14704.79,0.86,80185,5,10,A -732,R100 ,R121 ,16922.39,0.99,79893,5,10,A -733,R100 ,R147 ,11778.71,0.69,56463,5,10,A -734,R300 ,R348 ,13176.85,0.77,57593,4,10,A -735,R300 ,R376 ,9886.67,0.58,65587,9,10,A -736,R200 ,R232 ,14899.71,0.87,79654,9,10,A -737,R200 ,R211 ,11658.33,0.68,79226,9,10,A -738,R200 ,R218 ,12452.37,0.73,69457,9,10,A -739,R100 ,R177 ,15816.5,0.92,74947,8,10,A -740,R300 ,R348 ,13188.93,0.77,68100,4,10,A -746,R300 ,R349 ,17283.73,1.01,82780,4,10,A -747,R300 ,R346 ,12341.8,0.72,74525,4,10,A -749,R300 ,R335 ,10602.2,0.62,83248,4,10,A -750,R300 ,R348 ,16034.87,0.94,56541,4,10,A -751,R100 ,R126 ,12347.29,0.72,75151,5,10,A -752,R100 ,R118 ,12834.54,0.75,72085,7,10,A -753,R100 ,R112 ,14159.83,0.83,75137,5,10,A -754,R300 ,R331 ,13030.96,0.76,75437,4,10,A -755,R300 ,R371 ,17954.69,1.05,81291,4,10,A -756,R300 ,R351 ,12277.07,0.72,56090,4,10,A -757,R100 ,R140 ,11394.52,0.66,71676,4,10,A -758,R300 ,R321 ,9805.5,0.57,75314,6,10,A -759,R400 ,R466 ,13812.66,0.81,82346,3,10,A -760,R200 ,R265 ,12263.55,0.72,75243,10,10,A -761,R200 ,R205 ,12517.46,0.73,79627,9,10,A -762,R300 ,R355 ,13260.1,0.77,75079,4,10,A -766,R200 ,R258 ,15063.67,0.88,57588,10,10,A -767,R200 ,R206 ,11838.62,0.69,79816,9,10,A -768,R100 ,R178 ,14300.03,0.83,79041,8,10,A -769,R300 ,R374 ,12764.85,0.74,57193,6,10,A -770,R300 ,R321 ,33605.62,1.96,75023,6,10,A -771,R300 ,R327 ,12210.47,0.71,77443,6,10,A -772,R400 ,R466 ,14169.17,0.83,79977,3,10,A -773,R100 ,R140 ,10690.24,0.62,74470,5,10,A -774,R100 ,R167 ,13946.17,0.81,70113,7,10,A -775,R300 ,R302 ,11675,0.68,81270,6,10,A -778,R300 ,R336 ,11251.62,0.66,83741,4,10,A -779,R100 ,R168 ,10057.59,0.59,55763,4,10,A -780,R100 ,R168 ,14748.17,0.86,75680,4,10,A -792,R100 ,R174 ,12913.43,0.75,83730,5,10,A -793,R100 ,R171 ,12900.57,0.75,82156,5,10,A -794,R100 ,R171 ,18977.98,1.11,80586,5,10,A -795,R300 ,R351 ,12827.42,0.75,74892,4,10,A -796,R300 ,R335 ,12221.83,0.71,62396,4,10,A -797,R300 ,R359 ,11817.54,0.69,75447,4,10,A -798,R300 ,R314 ,11531.76,0.67,83273,4,10,A -799,R300 ,R354 ,14277.17,0.83,80716,4,10,A -800,R300 ,R304 ,15227.79,0.89,75364,6,10,A -801,R300 ,R305 ,12687.79,0.74,74903,6,10,A -802,R300 ,R305 ,10382.85,0.61,81104,6,10,A -803,R100 ,R105 ,12177.95,0.71,73609,7,10,A -804,R100 ,R111 ,14030.28,0.82,95593,7,10,A -805,R100 ,R146 ,11351.29,0.66,55502,5,10,A -806,R100 ,R146 ,11181.7,0.65,55848,5,10,A -807,R100 ,R128 ,14802.49,0.86,75358,5,10,A -808,R100 ,R128 ,14435.58,0.84,76023,5,10,A -809,R100 ,R146 ,14463.27,0.84,75443,5,10,A -810,R100 ,R150 ,18293.01,1.07,79359,5,10,A -811,R300 ,R348 ,11270.38,0.66,74535,4,10,A -812,R300 ,R354 ,13458.47,0.78,76779,4,10,A -813,R300 ,R320 ,12430.83,0.73,83627,4,10,A -815,R300 ,R318 ,18275.95,1.07,93937,4,10,A -816,R300 ,R360 ,16732.91,0.98,83497,4,10,A -817,R300 ,R354 ,12219.45,0.71,74986,4,10,A -818,R300 ,R320 ,16331.83,0.95,95399,4,10,A -819,R100 ,R134 ,14761.37,0.86,75749,5,10,A -820,R100 ,R124 ,13094,0.76,74449,5,10,A -821,R100 ,R114 ,13080.87,0.76,55736,5,10,A -822,R300 ,R374 ,13598.9,0.79,73133,6,10,A -823,R300 ,R374 ,10773.36,0.63,73354,6,10,A -824,R300 ,R305 ,16570.77,0.97,73531,6,10,A -825,R300 ,R375 ,21786.15,1.27,82399,9,10,A -826,R300 ,R373 ,14130.02,0.82,77967,9,10,A -827,R200 ,R247 ,14627.47,0.85,77096,9,10,A -828,R200 ,R237 ,14267.82,0.83,79853,9,10,A -830,R200 ,R265 ,14285.9,0.83,75195,10,10,A -831,R100 ,R176 ,9757.66,0.57,54546,7,10,A -832,R300 ,R378 ,10729.06,0.63,54430,6,10,A -833,R100 ,R112 ,21095.08,1.23,94531,5,10,A -834,R100 ,R122 ,10162.99,0.59,74093,5,10,A -835,R100 ,R122 ,17435.22,1.02,95756,5,10,A -836,R100 ,R122 ,18008.8,1.05,94990,5,10,A -837,R100 ,R141 ,18986.37,1.11,74725,5,10,A -838,R100 ,R115 ,16768.37,0.98,77118,5,10,A -839,R100 ,R115 ,16029.09,0.93,81683,5,10,A -840,R100 ,R115 ,18403.36,1.07,94895,5,10,A -841,R100 ,R145 ,14517.66,0.85,73806,5,10,A -842,R100 ,R121 ,13751.94,0.8,81006,5,10,A -843,R100 ,R121 ,19472.96,1.14,73299,5,10,A -844,R300 ,R348 ,18103.13,1.06,79801,4,10,A -845,R300 ,R313 ,12493.38,0.73,75701,4,10,A -847,R100 ,R114 ,17040.68,0.99,82758,5,10,A -848,R100 ,R143 ,11848.11,0.69,56972,8,10,A -849,R300 ,R374 ,15576.15,0.91,73085,6,10,A -850,R300 ,R373 ,12381.32,0.72,75112,9,10,A -851,R300 ,R375 ,10456.67,0.61,79594,9,10,A -852,R200 ,R212 ,13930.61,0.81,75152,9,10,A -853,R200 ,R246 ,14804.51,0.86,80007,9,10,A -854,R300 ,R376 ,12662.51,0.74,79382,9,10,A -855,R300 ,R376 ,12077.75,0.7,75102,9,10,A -856,R100 ,R107 ,11568.85,0.67,56822,7,10,A -857,R100 ,R107 ,12676.07,0.74,72247,7,10,A -858,R300 ,R364 ,12123.38,0.71,81664,6,10,A -859,R100 ,R143 ,11344.36,0.66,56053,8,10,A -860,R100 ,R127 ,10387.94,0.61,57143,7,10,A -861,R100 ,R131 ,14089.19,0.82,69349,5,10,A -862,R100 ,R101 ,17025.68,0.99,75690,5,10,A -863,R100 ,R128 ,16827.45,0.98,75267,5,10,A -864,R100 ,R110 ,13243.49,0.77,57323,5,10,A -865,R100 ,R150 ,16207.49,0.95,74598,5,10,A -866,R100 ,R121 ,17452.99,1.02,74472,5,10,A -867,R100 ,R115 ,15276.27,0.89,78734,5,10,A -868,R100 ,R145 ,13700.88,0.8,72395,5,10,A -870,R100 ,R133 ,14944.44,0.87,73340,5,10,A -871,R100 ,R147 ,14713.99,0.86,75927,5,10,A -872,R100 ,R137 ,19656.7,1.15,83744,5,10,A -873,R300 ,R324 ,14953.98,0.87,82790,4,10,A -874,R300 ,R313 ,11707.98,0.68,78991,4,10,A -875,R300 ,R352 ,8397.58,0.49,80019,6,10,A -876,R300 ,R321 ,7788.55,0.45,75175,6,10,A -877,R300 ,R367 ,15207.69,0.89,79749,4,10,A -878,R100 ,R105 ,12148.5,0.71,70402,7,10,A -879,R100 ,R107 ,10502.31,0.61,57554,7,10,A -880,R100 ,R122 ,14841.71,0.87,81730,5,10,A -881,R100 ,R138 ,10260.59,0.6,75977,5,10,A -882,R300 ,R303 ,13883.89,0.81,75518,6,10,A -883,R200 ,R236 ,25053.52,1.46,80938,9,10,A -884,R300 ,R377 ,12522.09,0.73,56068,9,10,A -885,R100 ,R161 ,22473.63,1.31,83090,8,10,A -887,R300 ,R303 ,11557.09,0.67,57918,6,10,A -888,R300 ,R311 ,11238.45,0.66,70353,6,10,A -891,R100 ,R127 ,10641.29,0.62,56494,5,10,A -893,R100 ,R122 ,9777.19,0.57,75476,5,10,A -894,R100 ,R121 ,12858.27,0.75,75096,5,10,A -895,R100 ,R147 ,14090.52,0.82,68150,5,10,A -896,R100 ,R135 ,15066.37,0.88,75471,5,10,A -897,R300 ,R313 ,15443.46,0.9,79188,4,10,A -898,R300 ,R313 ,11953.84,0.7,79408,4,10,A -899,R300 ,R320 ,15640.01,0.91,79414,4,10,A -901,R100 ,R136 ,13281.67,0.77,83241,5,10,A -904,R100 ,R114 ,15871.84,0.93,83109,5,10,A -905,R100 ,R129 ,11363.9,0.66,56016,7,10,A -906,R100 ,R129 ,9824.93,0.57,56320,7,10,A -907,R300 ,R364 ,12520.79,0.73,75033,6,10,A -909,R300 ,R379 ,20735.77,1.21,78678,9,10,A -910,R200 ,R258 ,17719.57,1.03,74972,10,10,A -911,R200 ,R213 ,14027.57,0.82,83015,9,10,A -912,R200 ,R206 ,12509.72,0.73,79722,9,10,A -913,R200 ,R261 ,21092.98,1.23,80793,9,10,A -914,R200 ,R261 ,17387.01,1.01,84371,9,10,A -915,R100 ,R161 ,12881.37,0.75,57131,10,10,A -917,R300 ,R346 ,16139.13,0.94,79750,4,10,A -918,R300 ,R355 ,16759.65,0.98,79977,4,10,A -919,R300 ,R314 ,10185.33,0.59,68358,4,10,A -920,R300 ,R367 ,13588.43,0.79,79375,4,10,A -921,R300 ,R332 ,15469.82,0.9,58807,4,10,A -922,R100 ,R137 ,14012.34,0.82,77171,5,10,A -923,R100 ,R148 ,14182.56,0.83,70222,5,10,A -924,R100 ,R136 ,10767.7,0.63,56887,5,10,A -926,R100 ,R127 ,13836.29,0.81,65842,5,10,A -927,R100 ,R141 ,15681.73,0.91,83590,5,10,A -928,R100 ,R141 ,15850.61,0.92,87622,5,10,A -929,R100 ,R147 ,15001.34,0.87,70197,5,10,A -930,R100 ,R114 ,14711.92,0.86,67846,5,10,A -931,R100 ,R102 ,15310.65,0.89,75660,5,10,A -935,R300 ,R377 ,17339.27,1.01,64122,9,10,A -936,R300 ,R377 ,16544.2,0.96,79521,9,10,A -937,R200 ,R212 ,20063.99,1.17,85010,9,10,A -938,R200 ,R218 ,13301.26,0.78,80066,9,10,A -939,R200 ,R248 ,16711.96,0.97,80185,9,10,A -940,R200 ,R205 ,16258.42,0.95,79973,9,10,A -941,R200 ,R245 ,16124.66,0.94,67592,9,10,A -942,R100 ,R116 ,38219.99,2.23,96940,5,10,A -943,R100 ,R147 ,18371.27,1.07,75469,5,10,A -945,R100 ,R134 ,11838.7,0.69,59155,5,10,A -947,R300 ,R352 ,8226.42,0.48,79824,6,10,A -949,R200 ,R237 ,17603.78,1.03,85097,9,10,A -950,R300 ,R379 ,13406.43,0.78,80012,9,10,A -952,R300 ,R378 ,11938.23,0.7,66270,6,10,A -953,R300 ,R304 ,10603.24,0.62,56116,6,10,A -955,R300 ,R311 ,19753.34,1.15,74365,6,10,A -957,R100 ,R115 ,11458.47,0.67,73816,5,10,A -958,R300 ,R333 ,10952.48,0.64,56754,4,10,A -959,R300 ,R333 ,9755.63,0.57,56667,4,10,A -961,R300 ,R372 ,17747.27,1.04,81510,4,10,A -962,R300 ,R371 ,11205.51,0.65,70079,4,10,A -963,R300 ,R350 ,11458.97,0.67,58489,4,10,A -964,R300 ,R371 ,11376.51,0.66,70045,4,10,A -966,R300 ,R362 ,9217.09,0.54,62214,4,10,A -967,R300 ,R315 ,14439.93,0.84,70385,4,10,A -968,R300 ,R349 ,20125.68,1.17,83082,4,10,A -969,R300 ,R334 ,9875.95,0.58,57011,4,10,A -970,R300 ,R335 ,14499.95,0.85,75908,4,10,A -981,R300 ,R334 ,13241.83,0.77,79540,4,10,A -982,R300 ,R335 ,11540.62,0.67,74821,4,10,A -984,R100 ,R171 ,14974.6,0.87,68595,5,10,A -985,R100 ,R174 ,14832.65,0.87,75672,5,10,A -986,R100 ,R171 ,11025.8,0.64,57584,5,10,A -988,R100 ,R170 ,12355.24,0.72,63054,5,10,A -989,R100 ,R169 ,11680.45,0.68,58275,5,10,A -990,R100 ,R169 ,10210.04,0.6,57146,5,10,A -992,R100 ,R117 ,14328.27,0.84,65440,7,10,A -993,R300 ,R364 ,13744.05,0.8,74276,6,10,A -995,R200 ,R264 ,20885.95,1.22,82546,10,10,A -996,R200 ,R265 ,16589.49,0.97,75233,10,10,A -997,R200 ,R201 ,15421.41,0.9,84558,9,10,A -1000,R400 ,R411 ,14057.39,0.82,74789,3,10,A -1001,R400 ,R411 ,13268.69,0.77,87398,3,10,A -1002,R400 ,R411 ,16054.98,0.94,84630,3,10,A -1003,R400 ,R415 ,14109.36,0.82,82540,3,10,A -1004,R400 ,R415 ,11784.21,0.69,79136,3,10,A -1005,R400 ,R466 ,12042.22,0.7,68204,3,10,A -1006,R400 ,R412 ,17199.14,1,82372,3,10,A -1007,R400 ,R448 ,14373.35,0.84,82088,3,10,A -1008,R400 ,R415 ,13985.06,0.82,83379,3,10,A -1009,R400 ,R441 ,14171.18,0.83,74705,3,10,A -1010,R400 ,R416 ,14718.4,0.86,82060,2,10,A -1011,R400 ,R416 ,12925.4,0.75,75375,2,10,A -1012,R400 ,R416 ,11941.58,0.7,74898,2,10,A -1013,R400 ,R416 ,13957.03,0.81,74932,2,10,A -1014,R400 ,R416 ,11156.08,0.65,75024,2,10,A -1015,R300 ,R371 ,15384.24,0.9,71263,4,10,A -1016,R400 ,R417 ,13455.75,0.78,75665,3,10,A -1017,R400 ,R417 ,12332.08,0.72,69990,3,10,A -1018,R400 ,R417 ,20712.37,1.21,82804,3,10,A -1019,R400 ,R417 ,11427,0.67,83081,3,10,A -1021,R300 ,R370 ,14852.7,0.87,76304,3,10,A -1022,R300 ,R371 ,13437.58,0.78,57277,4,10,A -1023,R300 ,R354 ,15593.41,0.91,85795,4,10,A -1024,R100 ,R115 ,21665.05,1.26,84615,5,10,A -1025,R200 ,R246 ,13903.17,0.81,81194,9,10,A -1026,R200 ,R247 ,12856.44,0.75,75357,9,10,A -1027,R200 ,R240 ,21268.54,1.24,81889,9,10,A -1028,R200 ,R217 ,15093.6,0.88,83790,9,10,A -1029,R200 ,R231 ,23800.31,1.39,87063,9,10,A -1030,R300 ,R332 ,15032.77,0.88,82969,4,10,A -1031,R100 ,R167 ,21315.47,1.24,83823,7,10,A -1032,R300 ,R352 ,9621.68,0.56,79793,6,10,A -1033,R200 ,R263 ,13752.57,0.8,74564,9,10,A -1034,R300 ,R378 ,15048.36,0.88,80008,6,10,A -1035,R100 ,R118 ,16421.83,0.96,79010,7,10,A -1036,R100 ,R150 ,15931.75,0.93,75424,5,10,A -1037,R100 ,R172 ,13312.31,0.78,72938,5,10,A -1038,R300 ,R367 ,20952.9,1.22,82276,4,10,A -1039,R300 ,R349 ,21585.09,1.26,75780,4,10,A -1040,R200 ,R261 ,17256.26,1.01,82212,9,10,A -1041,R400 ,R417 ,13848.16,0.81,83308,3,10,A -1042,R400 ,R448 ,22541.27,1.31,74488,3,10,A -1043,R400 ,R411 ,9674.19,0.56,57629,3,10,A -1044,R400 ,R448 ,18648.55,1.09,74381,3,10,A -1045,R400 ,R411 ,12697.34,0.74,57680,3,10,A -1046,R400 ,R448 ,15008.95,0.88,74546,3,10,A -1047,R300 ,R370 ,17068.33,1,84460,3,10,A -1048,R300 ,R370 ,12571.53,0.73,89661,3,10,A -1049,R400 ,R417 ,19411.15,1.13,83480,3,10,A -1050,R300 ,R360 ,13629.29,0.79,78543,4,10,A -1051,R300 ,R354 ,14358.95,0.84,57784,4,10,A -1052,R100 ,R136 ,13649.62,0.8,83128,5,10,A -1053,R300 ,R360 ,10981.1,0.64,81251,4,10,A -1054,R200 ,R210 ,16034.08,0.94,79288,9,10,A -1055,R400 ,R419 ,15761.67,0.92,74162,2,10,A -1056,R400 ,R467 ,19275.98,1.12,81604,2,10,A -1057,R400 ,R416 ,19422.2,1.13,85123,2,10,A -1058,R100 ,R169 ,26827.81,1.56,77525,5,10,A -1059,R300 ,R333 ,11100.21,0.65,76026,4,10,A -1060,R100 ,R146 ,18741.09,1.09,85682,5,10,A -1061,R300 ,R322 ,27634.12,1.61,77934,6,10,A -1062,R200 ,R245 ,19180.99,1.12,84643,9,10,A -1063,R100 ,R138 ,15725.63,0.92,75663,5,10,A -1064,R200 ,R265 ,11304.91,0.66,56919,10,10,A -1065,R300 ,R302 ,8036.52,0.47,78622,6,10,A -1066,R300 ,R341 ,10094.74,0.59,82977,6,10,A -1068,R100 ,R111 ,11222.77,0.65,54672,5,10,A -1069,R100 ,R146 ,13950.53,0.81,85092,5,10,A -1070,R100 ,R150 ,11085.66,0.65,58193,5,10,A -1071,R100 ,R168 ,14238.13,0.83,79308,4,10,A -1072,R100 ,R169 ,20588.88,1.2,84598,5,10,A -1073,R300 ,R336 ,10449.04,0.61,55976,4,10,A -1074,R300 ,R367 ,15783.12,0.92,75181,4,10,A -1075,R300 ,R349 ,11196.88,0.65,74087,4,10,A -1076,R400 ,R412 ,22054.33,1.29,79882,3,10,A -1077,R300 ,R358 ,12022.74,0.7,75830,4,10,A -1078,R300 ,R358 ,12216.56,0.71,80443,4,10,A -1079,R300 ,R358 ,10462.42,0.61,57122,4,10,A -1080,R300 ,R372 ,12041.19,0.7,79206,4,10,A -1081,R300 ,R362 ,10805.16,0.63,78940,4,10,A -1082,R100 ,R178 ,13987.89,0.82,56530,10,10,A -1083,R400 ,R451 ,10262.03,0.6,78939,2,10,A -1084,R400 ,R419 ,14913.21,0.87,73647,2,10,A -1085,R400 ,R422 ,17797.87,1.04,76086,2,10,A -1086,R300 ,R358 ,14044.87,0.82,79541,4,10,A -1087,R300 ,R355 ,14673.58,0.86,80952,4,10,A -1088,R400 ,R441 ,18484.7,1.08,81178,3,10,A -1090,R300 ,R337 ,15288.34,0.89,84845,4,10,A -1091,R100 ,R172 ,14574.08,0.85,81192,5,10,A -1092,R100 ,R172 ,16969.16,0.99,83984,5,10,A -1094,R100 ,R168 ,13793.7,0.8,78733,4,10,A -1095,R100 ,R126 ,14865.29,0.87,82374,5,10,A -1096,R100 ,R111 ,12782.47,0.75,66120,5,10,A -1097,R200 ,R208 ,14637.24,0.85,67586,9,10,A -1098,R200 ,R220 ,13887.15,0.81,83914,9,10,A -1100,R200 ,R240 ,21448.34,1.25,83303,9,10,A -1101,R100 ,R117 ,14793.07,0.86,78536,7,10,A -1102,R100 ,R118 ,23101.55,1.35,87697,7,10,A -1103,R300 ,R370 ,25616.65,1.49,84246,3,10,A -1104,R300 ,R371 ,11324.7,0.66,78459,4,10,A -1105,R300 ,R370 ,12581.38,0.73,79341,3,10,A -1106,R300 ,R334 ,11322.44,0.66,78249,4,10,A -1107,R300 ,R371 ,14886.03,0.87,79096,4,10,A -1108,R400 ,R424 ,11003.09,0.64,73761,2,10,A -1109,R400 ,R450 ,14145,0.83,79394,2,10,A -1110,R300 ,R310 ,12190.37,0.71,78641,4,10,A -1112,R100 ,R170 ,14990.05,0.87,77496,5,10,A -1113,R100 ,R127 ,20601.29,1.2,78812,7,10,A -1114,R100 ,R167 ,13789.7,0.8,83990,6,10,A -1115,R300 ,R304 ,12955.25,0.76,78319,6,10,A -1116,R300 ,R306 ,10543.9,0.61,79008,6,10,A -1117,R300 ,R378 ,13617.13,0.79,78255,6,10,A -1118,R200 ,R264 ,22466.87,1.31,79799,10,10,A -1120,R200 ,R240 ,13126.34,0.77,70788,9,10,A -1121,R200 ,R220 ,22210.7,1.3,83934,9,10,A -1122,R200 ,R210 ,18475.35,1.08,81029,9,10,A -1124,R300 ,R364 ,12002.15,0.7,79023,6,10,A -1125,R100 ,R112 ,12638.07,0.74,62204,5,10,A -1126,R300 ,R333 ,13139.84,0.77,78886,4,10,A -1128,R100 ,R173 ,14548.73,0.85,80305,5,10,A -1129,R100 ,R173 ,13539.23,0.79,79721,5,10,A -1131,R300 ,R354 ,14374.63,0.84,78799,4,10,A -1132,R400 ,R422 ,14373.61,0.84,84626,2,10,A -1133,R400 ,R422 ,14022.38,0.82,79655,2,10,A -1134,R400 ,R453 ,15159.2,0.88,78859,3,10,A -1135,R400 ,R462 ,19665.56,1.15,85269,3,10,A -1136,R400 ,R453 ,13097.71,0.76,78977,3,10,A -1137,R400 ,R448 ,15243.67,0.89,78353,3,10,A -1138,R400 ,R448 ,17921.49,1.05,85901,3,10,A -1139,R400 ,R455 ,27999.72,1.63,89058,2,10,A -1140,R200 ,R201 ,16988.81,0.99,80860,9,10,A -1141,R300 ,R377 ,12812.43,0.75,79106,9,10,A -1142,R400 ,R411 ,15035.9,0.88,82658,3,10,A -1143,R200 ,R245 ,12793.1,0.75,79506,9,10,A -1144,R100 ,R124 ,21673.35,1.26,81623,5,10,A -1146,R400 ,R453 ,33031.59,1.93,80804,3,10,A -1147,R400 ,R455 ,14760.76,0.86,79867,2,10,A -1148,R400 ,R424 ,13470.5,0.79,81984,2,10,A -1150,R400 ,R469 ,25788.59,1.5,83349,2,10,A -1151,R400 ,R450 ,15274.37,0.89,79397,2,10,A -1152,R400 ,R419 ,13937.29,0.81,79011,2,10,A -1153,R400 ,R450 ,23008.64,1.34,84564,2,10,A -1154,R400 ,R450 ,16797.18,0.98,78819,2,10,A -1155,R400 ,R419 ,13177.32,0.77,80978,2,10,A -1156,R400 ,R467 ,17689.87,1.03,79459,2,10,A -1157,R400 ,R416 ,13734.36,0.8,79557,2,10,A -1158,R400 ,R422 ,13956.47,0.81,79348,2,10,A -1159,R400 ,R421 ,18608.6,1.09,82152,3,10,A -1160,R400 ,R430 ,11125.02,0.65,62480,3,10,A -1161,R300 ,R370 ,13171.81,0.77,79065,3,10,A -1162,R400 ,R457 ,14130.48,0.82,79301,3,10,A -1163,R300 ,R318 ,18493.36,1.08,84345,4,10,A -1164,R300 ,R336 ,10590.98,0.62,78743,4,10,A -1165,R300 ,R334 ,12077.48,0.7,79712,4,10,A -1166,R100 ,R150 ,14064.14,0.82,78521,5,10,A -1167,R100 ,R112 ,17379.38,1.01,80765,5,10,A -1168,R100 ,R112 ,18790.14,1.1,81642,5,10,A -1169,R300 ,R332 ,11280.83,0.66,78478,4,10,A -1170,R100 ,R105 ,15595.7,0.91,78914,7,10,A -1171,R300 ,R380 ,17415.95,1.02,82328,9,10,A -1172,R300 ,R336 ,9759.44,0.57,62950,4,10,A -1175,R400 ,R446 ,18480.61,1.08,76110,2,10,A -1176,R100 ,R112 ,17171.21,1,77791,5,10,A -1177,R100 ,R123 ,15118.3,0.88,79774,7,10,A -1178,R100 ,R176 ,12340.5,0.72,78861,8,10,A -1179,R300 ,R340 ,15139.54,0.88,78851,4,10,A -1180,R300 ,R358 ,13044.07,0.76,79698,4,10,A -1181,R300 ,R362 ,10450.84,0.61,79400,4,10,A -1182,R300 ,R337 ,16836.04,0.98,79479,4,10,A -1183,R400 ,R462 ,13107.52,0.76,79279,3,10,A -1184,R400 ,R450 ,9849.95,0.57,80286,2,10,A -1185,R100 ,R126 ,17363.88,1.01,81612,5,10,A -1186,R400 ,R452 ,15409.89,0.9,74371,1,10,A -1187,R400 ,R452 ,20348.66,1.19,77961,1,10,A -1188,R400 ,R428 ,13428.24,0.78,79648,1,10,A -1189,R400 ,R428 ,14250.59,0.83,79736,1,10,A -1190,R400 ,R470 ,12793.33,0.75,79611,1,10,A -1191,R400 ,R424 ,12364.48,0.72,80719,2,10,A -1192,R400 ,R450 ,14769.51,0.86,74289,2,10,A -1193,R400 ,R448 ,19389.97,1.13,85733,3,10,A -1194,R400 ,R416 ,13524.5,0.79,80037,2,10,A -1195,R400 ,R467 ,14231.23,0.83,80267,2,10,A -1196,R400 ,R421 ,15065.12,0.88,80017,3,10,A -1197,R300 ,R335 ,21077.27,1.23,80742,4,10,A -1198,R300 ,R337 ,13790.65,0.8,79458,4,10,A -1199,R300 ,R337 ,12523.74,0.73,79304,4,10,A -1200,R100 ,R172 ,13295.01,0.78,79646,4,10,A -1201,R100 ,R123 ,13544,0.79,81430,7,10,A -1204,R300 ,R327 ,11405.33,0.67,79878,6,10,A -1205,R200 ,R262 ,14477.44,0.84,80534,10,10,A -1206,R300 ,R346 ,14214.46,0.83,80243,4,10,A -1207,R300 ,R373 ,20865.33,1.22,82256,9,10,A -1208,R200 ,R211 ,22029.06,1.28,82114,9,10,A -1209,R300 ,R379 ,14094.86,0.82,80224,9,10,A -1210,R100 ,R131 ,10714.23,0.62,79360,5,10,A -1211,R100 ,R111 ,14078.84,0.82,80387,5,10,A -1212,R100 ,R128 ,14011.98,0.82,63259,5,10,A -1213,R100 ,R121 ,12974.21,0.76,79146,5,10,A -1214,R100 ,R140 ,8109.67,0.47,79013,5,10,A -1215,R100 ,R174 ,10601.42,0.62,79046,5,10,A -1216,R400 ,R454 ,14410.69,0.84,79294,3,10,A -1217,R400 ,R430 ,16143.12,0.94,80165,3,10,A -1218,R400 ,R430 ,11138.91,0.65,79979,3,10,A -1219,R400 ,R454 ,15455.74,0.9,79945,3,10,A -1220,R400 ,R454 ,12999.54,0.76,79354,3,10,A -1221,R400 ,R431 ,13904,0.81,79928,3,10,A -1222,R400 ,R431 ,16531.44,0.96,80225,3,10,A -1223,R300 ,R336 ,14408.13,0.84,80433,4,10,A -1224,R400 ,R419 ,10164.62,0.59,81838,2,10,A -1225,R400 ,R417 ,13041.87,0.76,80551,3,10,A -1226,R300 ,R371 ,11064.58,0.65,63020,4,10,A -1227,R400 ,R447 ,11871.08,0.69,79768,1,10,A -1228,R400 ,R468 ,17561.85,1.02,80552,1,10,A -1229,R400 ,R452 ,18859.41,1.1,83211,1,10,A -1230,R100 ,R161 ,19998.5,1.17,79519,10,10,A -1231,R300 ,R302 ,9206.64,0.54,79375,6,10,A -1232,R400 ,R439 ,14797.27,0.86,87986,1,10,A -1233,R400 ,R415 ,11725.46,0.68,62042,3,10,A -1234,R400 ,R457 ,13125.97,0.77,79367,3,10,A -1235,R100 ,R102 ,14789.14,0.86,78414,5,10,A -1236,R100 ,R173 ,16660.4,0.97,81797,5,10,A -1237,R100 ,R161 ,24438.29,1.43,78241,8,10,A -1238,R200 ,R202 ,18677.19,1.09,79905,9,10,A -1239,R200 ,R220 ,11286.18,0.66,79193,9,10,A -1241,R100 ,R118 ,14363.32,0.84,79052,7,10,A -1242,R300 ,R375 ,14528.31,0.85,81165,9,10,A -1244,R100 ,R124 ,13415.1,0.78,81303,5,10,A -1246,R100 ,R128 ,10999.6,0.64,63183,5,10,A -1247,R100 ,R128 ,16005.53,0.93,83242,5,10,A -1248,R100 ,R128 ,15318.3,0.89,79830,5,10,A -1249,R400 ,R439 ,14685.61,0.86,81453,1,10,A -1250,R300 ,R351 ,12324.57,0.72,80155,4,10,A -1251,R100 ,R134 ,14639.79,0.85,81741,5,10,A -1252,R100 ,R173 ,14030.26,0.82,81000,5,10,A -1253,R400 ,R454 ,14300.85,0.83,81697,3,10,A -1254,R400 ,R431 ,15113.43,0.88,80391,3,10,A -1255,R400 ,R439 ,16585.27,0.97,81167,1,10,A -1256,R400 ,R421 ,14669.22,0.86,82210,3,10,A -1257,R400 ,R448 ,13004.29,0.76,63664,3,10,A -1258,R400 ,R415 ,14006.86,0.82,80424,3,10,A -1259,R400 ,R430 ,14837.91,0.87,80493,3,10,A -1260,R400 ,R461 ,14254.66,0.83,79752,3,10,A -1261,R100 ,R169 ,17535.15,1.02,80978,3,10,A -1263,R400 ,R446 ,11517.84,0.67,71425,2,10,A -1264,R400 ,R455 ,17426.34,1.02,82748,2,10,A -1265,R400 ,R411 ,13676.07,0.8,80181,3,10,A -1266,R400 ,R452 ,17968.16,1.05,83686,1,10,A -1267,R400 ,R439 ,14506.19,0.85,80481,1,10,A -1268,R400 ,R438 ,16958.27,0.99,79959,2,10,A -1269,R400 ,R421 ,18921.78,1.1,82963,3,10,A -1270,R400 ,R454 ,13033.07,0.76,78340,3,10,A -1271,R400 ,R438 ,17143.28,1,80121,2,10,A -1272,R100 ,R101 ,15188.72,0.89,80758,5,10,A -1273,R300 ,R359 ,13815.79,0.81,79850,4,10,A -1274,R300 ,R359 ,12682.06,0.74,78868,4,10,A -1275,R400 ,R457 ,15737.15,0.92,80027,3,10,A -1278,R100 ,R117 ,13831.31,0.81,79474,7,10,A -1279,R100 ,R117 ,14764.1,0.86,81064,7,10,A -1280,R100 ,R118 ,16188.82,0.94,80452,7,10,A -1281,R400 ,R468 ,12969.39,0.76,81367,1,10,A -1282,R100 ,R161 ,12354.55,0.72,56298,8,10,A -1283,R200 ,R205 ,15097.95,0.88,79886,9,10,A -1284,R200 ,R264 ,25793.89,1.5,82810,10,10,A -1285,R100 ,R148 ,14530.65,0.85,80626,5,10,A -1286,R100 ,R133 ,15769.99,0.92,80906,5,10,A -1287,R100 ,R170 ,13921.28,0.81,81542,3,10,A -1288,R400 ,R430 ,15454.86,0.9,80472,3,10,A -1289,R400 ,R439 ,19364.94,1.13,81467,1,10,A -1290,R400 ,R452 ,11960.35,0.7,63834,1,10,A -1291,R400 ,R421 ,12250.01,0.71,80365,3,10,A -1292,R400 ,R457 ,16208.91,0.95,79934,3,10,A -1293,R200 ,R202 ,22852.88,1.33,85522,9,10,A -1294,R300 ,R313 ,17682.77,1.03,79679,4,10,A -1295,R400 ,R412 ,13334.85,0.78,79468,3,10,A -1296,R400 ,R451 ,16585.17,0.97,79249,2,10,A -1298,R300 ,R350 ,14447.75,0.84,79876,4,10,A -1299,R300 ,R314 ,15354.12,0.9,79715,4,10,A -1300,R300 ,R315 ,15217.94,0.89,80226,4,10,A -1301,R100 ,R171 ,14515.28,0.85,80208,5,10,A -1302,R300 ,R333 ,23175.96,1.35,79567,4,10,A -1303,R100 ,R124 ,13451.41,0.78,81107,5,10,A -1304,R200 ,R218 ,16774.45,0.98,81102,9,10,A -1305,R200 ,R222 ,20472.84,1.19,86040,9,10,A -1306,R200 ,R204 ,32559.93,1.9,91970,9,10,A -1307,R200 ,R209 ,21987.41,1.28,83980,9,10,A -1308,R400 ,R470 ,18482.67,1.08,83345,1,10,A -1309,R200 ,R209 ,15277.8,0.89,81646,9,10,A -1310,R300 ,R337 ,11012.4,0.64,79479,4,10,A -1311,R100 ,R110 ,14029.58,0.82,82227,5,10,A -1312,R400 ,R453 ,14622.92,0.85,80088,3,10,A -1313,R100 ,R135 ,23476.69,1.37,86317,5,10,A -1314,R100 ,R117 ,14457.01,0.84,80920,7,10,A -1315,R400 ,R419 ,11562.07,0.67,80625,2,10,A -1316,R300 ,R376 ,13610.25,0.79,80978,9,10,A -1317,R100 ,R148 ,12925.82,0.75,81033,5,10,A -1318,R400 ,R451 ,16736.78,0.98,78508,2,10,A -1319,R300 ,R337 ,12855.22,0.75,80331,4,10,A -1322,R300 ,R369 ,13086.18,0.76,79663,4,10,A -1323,R100 ,R122 ,14305.24,0.83,95195,5,10,A -1324,R100 ,R170 ,13496.36,0.79,81663,5,10,A -1325,R100 ,R174 ,14430.11,0.84,81330,5,10,A -1326,R100 ,R177 ,15237.48,0.89,79425,8,10,A -1327,R300 ,R377 ,12630.56,0.74,80721,9,10,A -1328,R200 ,R222 ,23358.4,1.36,81521,9,10,A -1329,R200 ,R239 ,17148.27,1,82561,9,10,A -1330,R400 ,R446 ,15806.71,0.92,80652,2,10,A -1331,R200 ,R264 ,14018.96,0.82,81655,10,10,A -1332,R200 ,R236 ,21445.53,1.25,82277,9,10,A -1333,R100 ,R161 ,16263.73,0.95,79126,8,10,A -1334,R100 ,R128 ,17864.74,1.04,80908,5,10,A -1335,R300 ,R375 ,15171.29,0.88,80519,9,10,A -1336,R300 ,R311 ,24842.32,1.45,95996,6,10,A -1337,R300 ,R318 ,12336.16,0.72,85393,4,10,A -1338,R400 ,R447 ,17778.52,1.04,80001,1,10,A -1339,R300 ,R306 ,21062.07,1.23,93983,6,10,A -1340,R200 ,R217 ,16611.88,0.97,84922,9,10,A -1341,R400 ,R466 ,18120.18,1.06,81178,3,10,A -1342,R100 ,R141 ,15531.83,0.91,81296,5,10,A -1344,R400 ,R469 ,22846.31,1.33,82594,2,10,A -1345,R400 ,R450 ,13408.56,0.78,80360,2,10,A -1346,R300 ,R369 ,14549.77,0.85,94357,4,10,A -1347,R300 ,R353 ,12193.9,0.71,94361,6,10,A -1348,R400 ,R468 ,15041.11,0.88,80072,1,10,A -1349,R300 ,R337 ,13841.34,0.81,79596,4,10,A -1350,R100 ,R138 ,30718.17,1.79,95521,5,10,A -1351,R100 ,R111 ,24733.96,1.44,100835,5,10,A -1352,R100 ,R101 ,19718.35,1.15,94257,5,10,A -1353,R100 ,R118 ,15134.69,0.88,84225,7,10,A -1354,R300 ,R327 ,17198.42,1,94215,6,10,A -1355,R200 ,R262 ,15925.03,0.93,80115,10,10,A -1356,R100 ,R101 ,21051.73,1.23,103397,5,10,A -1357,R300 ,R373 ,13590.44,0.79,79802,8,10,A -1358,R400 ,R459 ,10900.3,0.64,77528,2,10,A -1359,R300 ,R311 ,14125.21,0.82,95097,6,10,A -1360,R300 ,R377 ,18079.46,1.05,85527,9,10,A -1361,R300 ,R375 ,13041.25,0.76,82293,9,10,A -1362,R200 ,R236 ,31221.44,1.82,85097,9,10,A -1363,R200 ,R220 ,16885.45,0.98,85327,9,10,A -1364,R100 ,R140 ,15796.29,0.92,95279,5,10,A -1365,R400 ,R422 ,16904.97,0.99,79025,2,10,A -1366,R100 ,R138 ,19422.64,1.13,95278,5,10,A -1367,R300 ,R369 ,21935.64,1.28,95279,4,10,A -1368,R300 ,R321 ,15959.63,0.93,95107,6,10,A -1369,R300 ,R353 ,20938.86,1.22,97765,6,10,A -1370,R300 ,R351 ,21402.18,1.25,94830,4,10,A -1371,R300 ,R355 ,18402.2,1.07,78748,4,10,A -1372,R100 ,R175 ,18704.56,1.09,98021,8,10,A -1373,R400 ,R460 ,12884.8,0.75,80056,1,10,A -1374,R400 ,R428 ,15221.4,0.89,80795,1,10,A -1375,R100 ,R126 ,18618.96,1.09,83566,5,10,A -1376,R300 ,R359 ,17153.75,1,94993,4,10,A -1377,R300 ,R303 ,14410.68,0.84,95711,6,10,A -1378,R400 ,R450 ,19715.08,1.15,85219,2,10,A -1380,R300 ,R346 ,47074.8,2.75,79595,4,10,A -1381,R100 ,R171 ,12612.89,0.74,80521,5,10,A -1382,R300 ,R314 ,34903.38,2.04,94993,4,10,A -1383,R200 ,R244 ,15240.51,0.89,85622,9,10,A -1384,R200 ,R250 ,34506.5,2.01,85650,9,10,A -1385,R100 ,R112 ,15226.12,0.89,80772,5,10,A -1386,R300 ,R374 ,14175.13,0.83,80878,9,10,A -1388,R100 ,R123 ,13260.85,0.77,80152,7,10,A -1389,R400 ,R422 ,13918.33,0.81,81639,2,10,A -1390,R300 ,R346 ,15809.78,0.92,79934,4,10,A -1391,R300 ,R350 ,15032.69,0.88,79377,4,10,A -1392,R100 ,R123 ,31337.39,1.83,95000,7,10,A -1393,R100 ,R172 ,13678.93,0.8,79856,5,10,A -1394,R300 ,R335 ,14994.85,0.87,95605,4,10,A -1395,R300 ,R326 ,13013.86,0.76,95743,6,10,A -1396,R300 ,R303 ,17825.5,1.04,95078,6,10,A -1397,R300 ,R301 ,15724.42,0.92,94846,6,10,A -1398,R300 ,R301 ,24879.51,1.45,94864,6,10,A -1399,R300 ,R353 ,14691.16,0.86,79472,6,10,A -1400,R300 ,R336 ,13578.61,0.79,95628,4,10,A -1401,R400 ,R469 ,17203.32,1,84844,2,10,A -1402,R100 ,R115 ,13736.85,0.8,79895,5,10,A -1403,R100 ,R115 ,13620.81,0.79,84794,5,10,A -1404,R400 ,R428 ,13940.57,0.81,79683,1,10,A -1405,R200 ,R260 ,13101.65,0.76,79864,10,10,A -1406,R200 ,R260 ,15898.42,0.93,78002,10,10,A -1407,R200 ,R210 ,20547.2,1.2,76106,9,10,A -1408,R200 ,R236 ,27562.74,1.61,77741,9,10,A -1409,R200 ,R207 ,27878.23,1.63,84687,9,10,A -1410,R200 ,R201 ,32452.36,1.89,88936,9,10,A -1411,R200 ,R263 ,16017.4,0.93,79155,9,10,A -1413,R100 ,R175 ,15207.33,0.89,85438,8,10,A -1414,R400 ,R430 ,13957.06,0.81,77501,3,10,A -1415,R400 ,R448 ,18922.65,1.1,82904,3,10,A -1416,R400 ,R441 ,14708.29,0.86,80098,3,10,A -1417,R200 ,R213 ,15727.61,0.92,81041,9,10,A -1418,R200 ,R244 ,16708.99,0.97,78174,9,10,A -1419,R200 ,R260 ,18432.1,1.08,81868,10,10,A -1420,R300 ,R370 ,11546.59,0.67,62802,3,10,A -1421,R200 ,R260 ,17185.44,1,79427,9,10,A -1422,R200 ,R237 ,20517.5,1.2,78465,9,10,A -1423,R200 ,R206 ,13769.65,0.8,77332,9,10,A -1424,R200 ,R217 ,19904.37,1.16,80465,9,10,A -1425,R200 ,R263 ,20894.31,1.22,78662,9,10,A -1426,R200 ,R237 ,18938.16,1.1,79716,9,10,A -1427,R200 ,R233 ,20566.2,1.2,88324,9,10,A -1428,R200 ,R211 ,19987.72,1.17,78509,9,10,A -1429,R300 ,R379 ,12286.66,0.72,80337,9,10,A -1430,R300 ,R326 ,12633.06,0.74,94626,6,10,A -1431,R400 ,R441 ,26944.05,1.57,90013,3,10,A -1432,R300 ,R377 ,13568.45,0.79,79816,9,10,A -1435,R300 ,R364 ,15195.82,0.89,81361,6,10,A -1436,R100 ,R144 ,22996.24,1.34,78564,7,10,A -1437,R100 ,R141 ,20784.42,1.21,92520,5,10,A -1438,R200 ,R247 ,11378.66,0.66,59126,9,10,A -1439,R300 ,R376 ,16151.14,0.94,79653,9,10,A -1441,R400 ,R429 ,11597.57,0.68,60789,1,10,A -1442,R400 ,R429 ,31402.58,1.83,90993,1,10,A -1443,R400 ,R462 ,19582.85,1.14,73075,3,10,A -1444,R200 ,R258 ,41456.43,2.42,79606,10,10,A -1445,R100 ,R133 ,21046.09,1.23,94300,5,10,A -1446,R100 ,R133 ,12958.75,0.76,77910,5,10,A -1447,R100 ,R172 ,13750.87,0.8,79846,5,10,A -1448,R100 ,R124 ,20413.45,1.19,94866,5,10,A -1449,R300 ,R331 ,19998.13,1.17,82829,6,10,A -1450,R300 ,R331 ,15567.47,0.91,79546,6,10,A -1451,R300 ,R331 ,13618.26,0.79,79783,6,10,A -1452,R300 ,R337 ,13203.65,0.77,80883,4,10,A -1453,R300 ,R346 ,16843.49,0.98,80290,4,10,A -1454,R300 ,R320 ,15849.37,0.92,80019,4,10,A -1455,R100 ,R123 ,19161.4,1.12,94722,7,10,A -1456,R100 ,R124 ,17681.74,1.03,94306,5,10,A -1457,R300 ,R304 ,11364.39,0.66,94628,6,10,A -1458,R300 ,R304 ,17584.32,1.03,94658,6,10,A -1459,R300 ,R303 ,18111.48,1.06,94434,6,10,A -1460,R100 ,R145 ,11495.93,0.67,79898,5,10,A -1461,R300 ,R346 ,14904.54,0.87,94871,4,10,A -1462,R300 ,R373 ,14882.73,0.87,83934,9,10,A -1463,R100 ,R171 ,15408.63,0.9,80236,5,10,A -1464,R400 ,R461 ,11662.73,0.68,80767,2,10,A -1465,R100 ,R137 ,16060.82,0.94,80600,5,10,A -1466,R100 ,R134 ,15546.77,0.91,80184,5,10,A -1467,R400 ,R419 ,15155.51,0.88,80047,2,10,A -1468,R300 ,R348 ,18186.62,1.06,82108,4,10,A -1469,R300 ,R353 ,61312.57,3.58,80610,6,10,A -1470,R100 ,R167 ,16364.57,0.95,79786,6,10,A -1471,R100 ,R175 ,15954.86,0.93,95756,8,10,A -1472,R200 ,R211 ,13471.26,0.79,77852,9,10,A -1473,R300 ,R353 ,19010.14,1.11,95348,6,10,A -1474,R400 ,R461 ,15159.92,0.88,79873,3,10,A -1475,R400 ,R467 ,13767,0.8,80833,2,10,A -1476,R400 ,R467 ,14527.01,0.85,79280,2,10,A -1477,R400 ,R438 ,15080.73,0.88,79713,2,10,A -1478,R100 ,R169 ,13882.8,0.81,79796,3,10,A -1479,R100 ,R168 ,12891.86,0.75,79728,4,10,A -1480,R300 ,R367 ,13070.76,0.76,80034,4,10,A -1481,R100 ,R140 ,19755.47,1.15,84260,5,10,A -1482,R100 ,R136 ,14472.82,0.84,80809,5,10,A -1483,R100 ,R128 ,14561.18,0.85,79837,5,10,A -1484,R100 ,R163 ,18753.39,1.09,94822,5,10,A -1485,R200 ,R231 ,18068.32,1.05,80187,9,10,A -1486,R300 ,R335 ,18023.41,1.05,84388,4,10,A -1487,R100 ,R144 ,20972.67,1.22,84348,7,10,A -1489,R300 ,R302 ,12780.93,0.75,94372,6,10,A -1490,R300 ,R305 ,13568.24,0.79,79570,6,10,A -1491,R400 ,R446 ,16934.42,0.99,79942,2,10,A -1492,R400 ,R467 ,14625.56,0.85,79907,2,10,A -1493,R300 ,R350 ,16529.17,0.96,81017,4,10,A -1495,R400 ,R428 ,14986.81,0.87,79343,1,10,A -1496,R400 ,R468 ,13230.69,0.77,78045,1,10,A -1497,R300 ,R315 ,11006.6,0.64,79928,4,10,A -1499,R300 ,R340 ,14006.27,0.82,80166,4,10,A -1500,R100 ,R179 ,20110.3,1.17,94844,8,10,A -1501,R100 ,R177 ,20363.69,1.19,94939,8,10,A -1502,R200 ,R208 ,21349.7,1.25,85173,9,10,A -1504,R300 ,R372 ,19012.51,1.11,94142,4,10,A -1505,R300 ,R362 ,20788.14,1.21,94433,4,10,A -1506,R300 ,R321 ,28557.96,1.67,79612,6,10,A -1507,R200 ,R211 ,10823.89,0.63,82990,9,10,A -1508,R400 ,R467 ,17396.41,1.01,79605,2,10,A -1509,R100 ,R117 ,18392.96,1.07,79962,7,10,A -1510,R400 ,R461 ,11503.86,0.67,85690,3,10,A -1511,R300 ,R333 ,18266.55,1.07,80047,4,10,A -1512,R300 ,R367 ,18369.17,1.07,94925,4,10,A -1513,R100 ,R168 ,12302.6,0.72,79288,4,10,A -1514,R300 ,R321 ,11305.94,0.66,94433,6,10,A -1515,R100 ,R117 ,17495.95,1.02,82714,7,10,A -1516,R400 ,R468 ,10656.16,0.62,79472,1,10,A -1517,R300 ,R321 ,13371.28,0.78,94433,6,10,A -1518,R300 ,R365 ,17623.12,1.03,91271,4,10,A -1519,R300 ,R324 ,16814.27,0.98,94293,4,10,A -1520,R400 ,R447 ,13936.58,0.81,79488,1,10,A -1521,R400 ,R438 ,13481.91,0.79,79709,2,10,A -1522,R100 ,R111 ,12006.22,0.7,79527,5,10,A -1523,R300 ,R327 ,14753.24,0.86,94693,6,10,A -1524,R300 ,R380 ,18225.45,1.06,84745,9,10,A -1525,R100 ,R179 ,17651.41,1.03,79686,8,10,A -1526,R200 ,R218 ,15836.53,0.92,79652,9,10,A -1527,R200 ,R246 ,13418.91,0.78,79960,9,10,A -1528,R400 ,R459 ,12496,0.73,79482,1,10,A -1529,R300 ,R350 ,13856.34,0.81,79914,4,10,A -1530,R100 ,R138 ,14005.68,0.82,78964,5,10,A -1531,R300 ,R306 ,12549.21,0.73,85562,6,10,A -1532,R400 ,R468 ,14153.75,0.83,79596,1,10,A -1533,R400 ,R441 ,13093.09,0.76,79856,3,10,A -1534,R100 ,R172 ,14811.02,0.86,81127,5,10,A -1535,R300 ,R303 ,11991.54,0.7,79278,6,10,A -1536,R300 ,R306 ,13411.79,0.78,94415,6,10,A -1537,R100 ,R107 ,13158.31,0.77,79801,7,10,A -1538,R100 ,R123 ,13557.97,0.79,79756,7,10,A -1539,R100 ,R117 ,17090.09,1,79948,5,10,A -1540,R100 ,R161 ,20973.79,1.22,78853,8,10,A -1541,R400 ,R411 ,12628.49,0.74,80594,3,10,A -1542,R300 ,R341 ,11343.29,0.66,78324,6,10,A -1543,R100 ,R144 ,11447.45,0.67,79848,7,10,A -1544,R400 ,R459 ,18982.28,1.11,86453,1,10,A -1545,R100 ,R172 ,13674.89,0.8,80832,5,10,A -1546,R300 ,R336 ,13927.83,0.81,81677,4,10,A -1547,R200 ,R240 ,16454.87,0.96,79638,9,10,A -1548,R200 ,R232 ,14052.03,0.82,80193,9,10,A -1750,R100 ,R178 ,16773.24,0.98,86701,8,10,A -1751,R100 ,R178 ,25765.46,1.5,96518,8,10,A -1752,R100 ,R178 ,23523.94,1.37,90711,8,10,A -1753,R100 ,R178 ,17863.16,1.04,86804,8,10,A -1754,R100 ,R178 ,30769.6,1.79,95329,8,10,A -1755,R100 ,R178 ,19087.56,1.11,93951,8,10,A -1756,R100 ,R144 ,22257.67,1.3,94759,7,10,A -1757,R100 ,R144 ,18282.25,1.07,99554,7,10,A -1759,R100 ,R144 ,14250.34,0.83,105819,7,10,A -1760,R300 ,R365 ,22732.47,1.33,95022,4,10,A -1761,R300 ,R334 ,15610.46,0.91,114596,4,10,A -1762,R100 ,R138 ,17159.27,1,115418,5,10,A -1763,R300 ,R326 ,13275.82,0.77,114551,6,10,A -1764,R300 ,R326 ,17831.69,1.04,95616,6,10,A -1765,R300 ,R342 ,15134.86,0.88,95689,6,10,A -1766,R300 ,R321 ,10585.66,0.62,97674,6,10,A -1767,R100 ,R105 ,19927.12,1.16,114575,7,10,A -1768,R100 ,R127 ,21937.37,1.28,94945,7,10,A -1769,R100 ,R176 ,19421.32,1.13,95171,8,10,A -1770,R300 ,R342 ,14799.48,0.86,96337,6,10,A -1771,R100 ,R127 ,15920.12,0.93,90966,7,10,A -1772,R300 ,R340 ,19001.11,1.11,93637,4,10,A -1773,R300 ,R340 ,15456.68,0.9,93900,4,10,A -1774,R100 ,R111 ,18948.96,1.11,91645,5,10,A -1775,R300 ,R326 ,12125.78,0.71,94203,6,10,A -1776,R100 ,R179 ,24149.73,1.41,104154,8,10,A -1777,R100 ,R107 ,20862.76,1.22,106299,7,10,A -1780,R300 ,R334 ,14634.57,0.85,105923,4,10,A -1782,R100 ,R129 ,17875.93,1.04,94771,6,10,A -1783,R100 ,R143 ,28589.57,1.67,96198,8,10,A -1784,R300 ,R352 ,17720.69,1.03,99779,6,10,A -1785,R300 ,R327 ,12582.66,0.73,106014,6,10,A -1786,R300 ,R311 ,17185.12,1,106365,6,10,A -1787,R300 ,R340 ,23508.66,1.37,95013,4,10,A -1788,R100 ,R140 ,15308.04,0.89,94299,5,10,A -1789,R100 ,R140 ,15136.51,0.88,94300,5,10,A -1790,R300 ,R365 ,12762.2,0.74,95242,4,10,A -1791,R100 ,R105 ,22070.27,1.29,94718,7,10,A -1792,R100 ,R127 ,15316.64,0.89,93817,7,10,A -1793,R300 ,R355 ,17968.3,1.05,79483,4,10,A -1794,R300 ,R372 ,12133.4,0.71,83246,4,10,A -1795,R300 ,R313 ,15159.33,0.88,94246,4,10,A -1796,R400 ,R438 ,14209.43,0.83,81114,2,10,A -1797,R300 ,R341 ,11456.25,0.67,94441,6,10,A -1798,R400 ,R459 ,19742.26,1.15,83870,2,10,A -1799,R100 ,R150 ,14874.78,0.87,81010,5,10,A -1800,R100 ,R143 ,20985.04,1.22,84973,7,10,A -1801,R100 ,R150 ,20024.08,1.17,94203,5,10,A -1802,R400 ,R439 ,12412.8,0.72,81304,1,10,A -1803,R400 ,R452 ,9338.3,0.54,60555,1,10,A -1804,R100 ,R170 ,17151.46,1,85860,5,10,A -1805,R200 ,R250 ,18451.28,1.08,84906,9,10,A -1806,R100 ,R175 ,41996.76,2.45,100176,8,10,A -1807,R300 ,R362 ,13394.1,0.78,79707,4,10,A -1808,R400 ,R451 ,20509.07,1.2,77582,2,10,A -1809,R400 ,R462 ,13882.08,0.81,84651,3,10,A -1811,R300 ,R302 ,11217.03,0.65,79484,6,10,A -1812,R300 ,R322 ,12568.03,0.73,79062,6,10,A -1813,R100 ,R176 ,14444.1,0.84,80168,8,10,A -1814,R100 ,R178 ,20852.4,1.22,79720,8,10,A -1815,R200 ,R201 ,14787.12,0.86,79263,9,10,A -1816,R200 ,R201 ,12240.58,0.71,79941,9,10,A -1818,R400 ,R424 ,10957.5,0.64,79808,2,10,A -1819,R200 ,R247 ,16986.94,0.99,84587,9,10,A -1820,R300 ,R314 ,20989.38,1.22,94933,4,10,A -1821,R100 ,R144 ,16587.3,0.97,80224,7,10,A -1822,R400 ,R446 ,19931.96,1.16,82510,2,10,A -1823,R400 ,R450 ,14976.72,0.87,79982,2,10,A -1824,R300 ,R371 ,12920.74,0.75,80565,4,10,A -1825,R300 ,R340 ,13347.57,0.78,79593,4,10,A -1826,R300 ,R372 ,15716.27,0.92,94925,4,10,A -1827,R400 ,R441 ,13591.57,0.79,84993,3,10,A -1828,R400 ,R454 ,12540.36,0.73,79270,3,10,A -1829,R300 ,R350 ,13630.58,0.8,80245,4,10,A -1830,R400 ,R438 ,12367.52,0.72,80374,2,10,A -1831,R100 ,R124 ,21141.71,1.23,95562,5,10,A -1832,R100 ,R124 ,23621.85,1.38,96302,5,10,A -1833,R100 ,R101 ,19920.1,1.16,95199,5,10,A -1834,R200 ,R206 ,18203.97,1.06,79823,9,10,A -1835,R400 ,R468 ,16198.49,0.94,79307,1,10,A -1836,R300 ,R306 ,13824.79,0.81,94702,6,10,A -1837,R300 ,R303 ,22022.48,1.28,94604,6,10,A -1838,R300 ,R379 ,15196.1,0.89,84238,9,10,A -1839,R400 ,R439 ,17488.48,1.02,77649,1,10,A -1840,R100 ,R123 ,14105.68,0.82,94868,7,10,A -1841,R100 ,R170 ,14982.58,0.87,80132,5,10,A -1842,R100 ,R144 ,13679.32,0.8,80824,7,10,A -1843,R200 ,R232 ,13696.45,0.8,80081,9,10,A -1845,R400 ,R461 ,14200.1,0.83,79798,3,10,A -1846,R200 ,R201 ,15056.43,0.88,79264,9,10,A -1847,R200 ,R260 ,15996.21,0.93,79961,10,10,A -1848,R100 ,R138 ,14031.96,0.82,79899,5,10,A -1849,R400 ,R423 ,27990.17,1.63,83772,2,10,A -1850,R300 ,R326 ,11244.58,0.66,79175,6,10,A -1851,R200 ,R245 ,10151.56,0.59,79793,9,10,A -1852,R300 ,R327 ,9960.07,0.58,68749,6,10,A -1853,R300 ,R315 ,14860.54,0.87,94787,4,10,A -1854,R400 ,R448 ,19617.32,1.14,84253,3,10,A -1855,R400 ,R447 ,13971.34,0.81,79714,1,10,A -1856,R400 ,R451 ,14806.54,0.86,77462,2,10,A -1857,R400 ,R466 ,12368.36,0.72,79735,3,10,A -1858,R400 ,R457 ,17193.94,1,84751,3,10,A -1859,R300 ,R314 ,15253.33,0.89,79869,4,10,A -1860,R300 ,R301 ,13214.67,0.77,72279,6,10,A -1861,R300 ,R302 ,9311.67,0.54,79778,6,10,A -1862,R200 ,R246 ,11821.07,0.69,79669,9,10,A -1863,R300 ,R376 ,13649.29,0.8,85204,9,10,A -1864,R400 ,R461 ,17747.76,1.04,85456,2,10,A -1865,R400 ,R446 ,11907.42,0.69,77515,2,10,A -1866,R400 ,R424 ,10758.13,0.63,79831,2,10,A -1867,R200 ,R205 ,31419.28,1.83,79816,9,10,A -1868,R200 ,R258 ,14414.18,0.84,79799,10,10,A -1869,R200 ,R248 ,45817.24,2.67,80760,9,10,A -1870,R300 ,R337 ,18913.16,1.1,79925,4,10,A -1871,R400 ,R411 ,12212.86,0.71,85340,3,10,A -1872,R300 ,R372 ,19657.74,1.15,94874,4,10,A -1873,R400 ,R466 ,15246.9,0.89,94627,3,10,A -1874,R400 ,R441 ,24903.13,1.45,94237,3,10,A -1875,R400 ,R431 ,16289.11,0.95,79478,3,10,A -1876,R300 ,R331 ,13350.36,0.78,80856,6,10,A -1877,R300 ,R303 ,11647.39,0.68,80199,6,10,A -1878,R100 ,R140 ,16216.42,0.95,80705,5,10,A -1879,R100 ,R145 ,15869.97,0.93,79855,5,10,A -1880,R100 ,R128 ,12781.86,0.75,67129,5,10,A -1881,R100 ,R121 ,15113.88,0.88,80071,5,10,A -1882,R100 ,R121 ,19062.39,1.11,79353,5,10,A -1883,R200 ,R258 ,14822.47,0.86,80070,10,10,A -1884,R200 ,R204 ,26238.15,1.53,78984,9,10,A -1885,R400 ,R455 ,19118.93,1.12,82904,2,10,A -1886,R400 ,R446 ,31838.76,1.86,86008,2,10,A -1887,R400 ,R459 ,12041.74,0.7,81088,2,10,A -1888,R100 ,R141 ,19317.01,1.13,82762,5,10,A -1889,R100 ,R116 ,19939.43,1.16,82383,5,10,A -1890,R400 ,R412 ,17656.4,1.03,80944,3,10,A -1891,R100 ,R167 ,12439.11,0.73,79208,6,10,A -1892,R300 ,R372 ,25971.98,1.51,82176,4,10,A -1893,R400 ,R412 ,20082.28,1.17,87646,3,10,A -1894,R300 ,R364 ,12266.28,0.72,79414,6,10,A -1895,R100 ,R110 ,16457.66,0.96,80015,5,10,A -1896,R100 ,R122 ,20302.75,1.18,96907,5,10,A -1897,R400 ,R412 ,15691.74,0.92,79834,3,10,A -1898,R400 ,R429 ,20319.46,1.19,88165,1,10,A -1901,R100 ,R105 ,21258.65,1.24,96988,7,10,A -1902,R100 ,R133 ,13075.84,0.76,80221,5,10,A -1903,R100 ,R115 ,19720.66,1.15,96988,5,10,A -1904,R300 ,R364 ,11880.47,0.69,79922,6,10,A -1905,R300 ,R379 ,13713.69,0.8,79842,9,10,A -1906,R200 ,R250 ,12129.36,0.71,79837,9,10,A -1907,R300 ,R332 ,11750.72,0.69,79740,4,10,A -1908,R300 ,R364 ,21818.37,1.27,96878,6,10,A -1910,R300 ,R350 ,13878.69,0.81,79101,4,10,A -1911,R100 ,R140 ,15783.9,0.92,79857,5,10,A -1912,R100 ,R112 ,18813.41,1.1,96663,5,10,A -1913,R100 ,R133 ,16319.96,0.95,79888,5,10,A -1914,R100 ,R118 ,11945.36,0.7,79962,7,10,A -1915,R400 ,R438 ,14269.23,0.83,80280,2,10,A -1916,R400 ,R460 ,11931.3,0.7,89345,1,10,A -1917,R400 ,R422 ,21152.09,1.23,85221,2,10,A -1918,R300 ,R365 ,20249.03,1.18,97938,4,10,A -1919,R100 ,R167 ,13211.57,0.77,79993,6,10,A -1920,R300 ,R331 ,19359.99,1.13,79428,4,10,A -1921,R300 ,R315 ,13109.37,0.76,97974,4,10,A -1922,R300 ,R342 ,10731.77,0.63,79641,6,10,A -1923,R300 ,R337 ,20608.75,1.2,79484,4,10,A -1924,R100 ,R141 ,18602.58,1.09,81866,5,10,A -1925,R100 ,R150 ,14823.37,0.86,79914,5,10,A -1926,R200 ,R211 ,16035.38,0.94,87307,9,10,A -1927,R200 ,R233 ,18089.89,1.06,87498,9,10,A -1928,R100 ,R175 ,18484,1.08,96664,8,10,A -1929,R400 ,R419 ,13479.94,0.79,84656,2,10,A -1930,R400 ,R470 ,19137.52,1.12,84530,1,10,A -1931,R400 ,R417 ,13417.49,0.78,79855,3,10,A -1932,R300 ,R372 ,17498.3,1.02,96635,4,10,A -1933,R100 ,R133 ,15007.42,0.88,79753,5,10,A -1934,R300 ,R360 ,15013.3,0.88,96416,4,10,A -1935,R300 ,R310 ,17898.13,1.04,96890,4,10,A -1936,R200 ,R222 ,21679.63,1.26,78857,9,10,A -1937,R300 ,R337 ,13952.96,0.81,79869,4,10,A -1938,R400 ,R415 ,10906.67,0.64,79407,3,10,A -1939,R100 ,R105 ,12791.38,0.75,79737,7,10,A -1940,R100 ,R173 ,12149.04,0.71,80004,5,10,A -1941,R300 ,R310 ,17674.22,1.03,79343,4,10,A -1942,R400 ,R452 ,11022.64,0.64,79859,1,10,A -1943,R100 ,R129 ,13999,0.82,79891,7,10,A -1944,R100 ,R129 ,22245.22,1.3,96663,7,10,A -1945,R100 ,R129 ,15443.5,0.9,96892,7,10,A -1946,R100 ,R172 ,13466.53,0.79,79837,5,10,A -1947,R200 ,R259 ,13569.47,0.79,80057,10,10,A -1948,R400 ,R424 ,14464.63,0.84,84468,2,10,A -1949,R400 ,R454 ,15832.45,0.92,80170,3,10,A -1950,R100 ,R122 ,15450.59,0.9,103127,5,10,A -1951,R100 ,R147 ,14901.96,0.87,79811,5,10,A -1952,R100 ,R118 ,17005.88,0.99,82313,7,10,A -1953,R300 ,R341 ,10380.56,0.61,79516,6,10,A -1954,R400 ,R459 ,12301.22,0.72,72326,2,10,A -1955,R400 ,R460 ,10912.26,0.64,79797,1,10,A -1956,R400 ,R460 ,13294.29,0.78,81816,1,10,A -1957,R200 ,R259 ,14672.85,0.86,80130,10,10,A -1958,R200 ,R248 ,16870.99,0.98,79947,9,10,A -1959,R300 ,R374 ,17293.8,1.01,94245,9,10,A -1960,R300 ,R379 ,22912.25,1.34,94275,9,10,A -1961,R200 ,R232 ,18783.31,1.1,79962,9,10,A -1962,R300 ,R306 ,8816.03,0.51,79780,6,10,A -1963,R300 ,R369 ,12178.13,0.71,79891,4,10,A -1964,R300 ,R336 ,18641.11,1.09,81507,4,10,A -1965,R400 ,R468 ,16174.39,0.94,79939,1,10,A -1966,R300 ,R313 ,15802.73,0.92,103129,4,10,A -1967,R300 ,R314 ,14475.79,0.84,79983,4,10,A -1968,R400 ,R417 ,14314.36,0.83,80046,3,10,A -1969,R100 ,R173 ,15678.41,0.91,80005,5,10,A -1970,R400 ,R411 ,12912.32,0.75,80040,3,10,A -1971,R100 ,R137 ,11438.97,0.67,80160,5,10,A -1972,R100 ,R169 ,12317.64,0.72,79571,5,10,A -1973,R300 ,R348 ,12927.16,0.75,79813,4,10,A -1974,R300 ,R315 ,12648.88,0.74,79979,4,10,A -1975,R300 ,R311 ,16395.99,0.96,79191,6,10,A -1976,R100 ,R177 ,17236.3,1.01,103121,8,10,A -1977,R100 ,R123 ,12964.93,0.76,80167,7,10,A -1978,R100 ,R173 ,16261.24,0.95,79886,5,10,A -1979,R300 ,R327 ,10674.13,0.62,79771,6,10,A -1980,R200 ,R239 ,21183.4,1.24,85248,9,10,A -1981,R300 ,R342 ,8779.61,0.51,79952,6,10,A -1982,R300 ,R341 ,11215.11,0.65,79818,6,10,A -1983,R300 ,R369 ,17104.06,1,79918,4,10,A -1984,R200 ,R237 ,11877.35,0.69,79974,9,10,A -2006,R400 ,R419 ,20153.3,1.18,84532,2,10,A -2007,R400 ,R412 ,10893.06,0.64,80028,3,10,A -2008,R300 ,R342 ,7908.83,0.46,79922,6,10,A -2009,R400 ,R447 ,13109.58,0.76,79743,1,10,A -2010,R100 ,R107 ,11830.41,0.69,82264,7,10,A -2011,R300 ,R362 ,12315.06,0.72,79954,4,10,A -2014,R100 ,R136 ,18046.87,1.05,84554,5,10,A -2015,R100 ,R136 ,11773.91,0.69,79827,5,10,A -2016,R100 ,R174 ,14287.05,0.83,79738,5,10,A -2017,R400 ,R466 ,11668.63,0.68,79714,3,10,A -2018,R200 ,R213 ,18777.98,1.1,84121,9,10,A -2019,R200 ,R217 ,14515.48,0.85,84567,9,10,A -2020,R200 ,R209 ,15833.8,0.92,80485,9,10,A -2021,R100 ,R179 ,16619.28,0.97,96887,8,10,A -2022,R300 ,R367 ,22285.2,1.3,96822,4,10,A -2023,R100 ,R177 ,18884.33,1.1,96607,8,10,A -2024,R400 ,R451 ,14800.4,0.86,80050,2,10,A -2025,R100 ,R124 ,15418.57,0.9,84509,5,10,A -2026,R200 ,R207 ,16593.37,0.97,84476,9,10,A -2027,R300 ,R337 ,13010.79,0.76,80042,4,10,A -2028,R100 ,R145 ,13746.54,0.8,79786,5,10,A -2029,R100 ,R179 ,15920.81,0.93,80039,8,10,A -2030,R200 ,R219 ,21262.98,1.24,82356,9,10,A -2031,R300 ,R378 ,14390.38,0.84,79793,6,10,A -2032,R300 ,R365 ,13460.31,0.79,79763,4,10,A -2033,R100 ,R148 ,14546.27,0.85,79707,5,10,A -2034,R300 ,R354 ,21253.59,1.24,96696,4,10,A -2035,R100 ,R145 ,15469.15,0.9,96887,5,10,A -2036,R300 ,R335 ,22126.21,1.29,96990,4,10,A -2037,R300 ,R358 ,11518.8,0.67,79906,4,10,A -2038,R400 ,R467 ,14318.05,0.84,79753,2,10,A -2040,R300 ,R354 ,17063.27,1,79439,4,10,A -2041,R100 ,R105 ,12355.08,0.72,83548,7,10,A -2042,R300 ,R342 ,16031.24,0.94,96935,6,10,A -2043,R100 ,R144 ,12732.6,0.74,79972,7,10,A -2044,R100 ,R171 ,11796.18,0.69,80039,5,10,A -2045,R400 ,R460 ,13842.5,0.81,78700,1,10,A -2046,R100 ,R102 ,15801.65,0.92,97524,5,10,A -2048,R100 ,R133 ,15655.3,0.91,80039,5,10,A -2051,R200 ,R202 ,16135.06,0.94,82512,9,10,A -2052,R100 ,R175 ,17685.1,1.03,96997,8,10,A -2053,R300 ,R333 ,13709.08,0.8,80059,4,10,A -2055,R300 ,R331 ,13899.73,0.81,79476,4,10,A -2056,R300 ,R335 ,16237.46,0.95,96931,4,10,A -2057,R300 ,R351 ,21884.11,1.28,81995,4,10,A -2058,R300 ,R324 ,14026.92,0.82,79530,4,10,A -2059,R300 ,R320 ,15837.23,0.92,96931,4,10,A -2061,R300 ,R301 ,11518.39,0.67,79617,6,10,A -2062,R300 ,R324 ,15010.69,0.88,79725,4,10,A -2063,R300 ,R320 ,22742.94,1.33,97807,4,10,A -2064,R300 ,R354 ,12526.87,0.73,79854,4,10,A -2065,R300 ,R310 ,14059.85,0.82,96712,4,10,A -2066,R300 ,R364 ,13446.13,0.78,79811,6,10,A -2067,R300 ,R310 ,14790.46,0.86,95402,4,10,A -2068,R100 ,R168 ,12474.44,0.73,79974,5,10,A -2069,R300 ,R372 ,19794.26,1.15,96935,4,10,A -2070,R100 ,R169 ,18237.02,1.06,82352,5,10,A -2071,R400 ,R457 ,13884.61,0.81,79833,3,10,A -2072,R400 ,R453 ,15049.46,0.88,80252,3,10,A -2073,R400 ,R470 ,12944.49,0.75,79637,1,10,A -2074,R300 ,R355 ,10997.2,0.64,79476,4,10,A -2075,R400 ,R462 ,16673.55,0.97,85512,3,10,A -2076,R400 ,R451 ,11758,0.69,79795,2,10,A -2077,R400 ,R430 ,12219.16,0.71,79634,3,10,A -2078,R100 ,R116 ,18619.49,1.09,84892,5,10,A -2079,R100 ,R141 ,20343.1,1.19,85510,5,10,A -2080,R300 ,R362 ,12605.45,0.74,101681,4,10,A -2081,R100 ,R121 ,17503.82,1.02,96676,5,10,A -2082,R200 ,R244 ,14148.16,0.83,79830,9,10,A -2083,R300 ,R375 ,14948.88,0.87,84188,9,10,A -2084,R300 ,R369 ,11805.45,0.69,82776,4,10,A -2085,R300 ,R348 ,13948.75,0.81,79817,4,10,A -2086,R100 ,R169 ,13041.89,0.76,79795,5,10,A -2087,R100 ,R145 ,22546.95,1.32,81928,5,10,A -2088,R200 ,R233 ,18525.42,1.08,84224,9,10,A -2089,R300 ,R353 ,14135.17,0.82,96672,6,10,A -2090,R300 ,R355 ,13911.55,0.81,79848,4,10,A -2091,R300 ,R334 ,15409.45,0.9,97477,4,10,A -2092,R300 ,R318 ,19802.69,1.15,103290,4,10,A -2093,R300 ,R364 ,24946.24,1.45,81803,6,10,A -2095,R100 ,R129 ,14597.45,0.85,76959,6,10,A -2096,R200 ,R218 ,13918.17,0.81,79279,9,10,A -2098,R100 ,R167 ,11273.99,0.66,80161,7,10,A -2099,R400 ,R431 ,13274.74,0.77,80095,3,10,A -2100,R400 ,R430 ,11881.95,0.69,80161,3,10,A -2101,R100 ,R126 ,25991.63,1.52,92390,5,10,A -2102,R400 ,R424 ,11910.75,0.69,79940,2,10,A -2103,R100 ,R118 ,13708.19,0.8,82487,7,10,A -2104,R400 ,R422 ,14904.77,0.87,80190,2,10,A -2105,R100 ,R135 ,13635.68,0.8,82171,5,10,A -2106,R100 ,R146 ,21886.76,1.28,102399,5,10,A -2108,R300 ,R358 ,13209.06,0.77,80355,4,10,A -2109,R300 ,R349 ,13425.73,0.78,81724,4,10,A -2110,R200 ,R260 ,15506.9,0.9,80371,10,10,A -2111,R300 ,R371 ,12067.51,0.7,80126,4,10,A -2112,R300 ,R305 ,11248.22,0.66,80161,6,10,A -2113,R100 ,R134 ,16154.26,0.94,82041,5,10,A -2114,R400 ,R454 ,12706.22,0.74,79999,3,10,A -2115,R200 ,R208 ,12969.02,0.76,84158,9,10,A -2118,R300 ,R314 ,17591.29,1.03,101926,4,10,A -2119,R100 ,R171 ,13437.88,0.78,77429,5,10,A -2120,R400 ,R447 ,13448.13,0.78,80226,1,10,A -2121,R300 ,R334 ,15421.05,0.9,84352,4,10,A -2122,R100 ,R122 ,16351.93,0.95,79868,5,10,A -2123,R100 ,R178 ,18344.56,1.07,79905,8,10,A -2124,R400 ,R421 ,24831.76,1.45,86198,3,10,A -2125,R100 ,R107 ,16321.94,0.95,79771,7,10,A -2126,R300 ,R333 ,14207.28,0.83,80194,4,10,A -2127,R400 ,R439 ,14587.04,0.85,79317,1,10,A -2128,R200 ,R202 ,18280.45,1.07,81453,9,10,A -2129,R300 ,R336 ,13316.84,0.78,77316,4,10,A -2130,R400 ,R447 ,16133.54,0.94,80237,1,10,A -2131,R400 ,R421 ,16672.83,0.97,80356,3,10,A -2132,R300 ,R355 ,13031.92,0.76,96653,4,10,A -2133,R400 ,R415 ,13025,0.76,82355,3,10,A -2134,R300 ,R358 ,18768.16,1.09,80517,4,10,A -2135,R100 ,R126 ,11790.14,0.69,82548,5,10,A -2136,R200 ,R259 ,12598.14,0.73,81907,10,10,A -2137,R300 ,R336 ,29282.46,1.71,85373,4,10,A -2138,R400 ,R466 ,15357.32,0.9,96757,3,10,A -2139,R300 ,R311 ,11320.49,0.66,83197,6,10,A -2140,R300 ,R376 ,18635.02,1.09,101204,9,10,A -2141,R400 ,R419 ,17782.43,1.04,82185,2,10,A -2142,R300 ,R326 ,14030.84,0.82,95921,6,10,A -2143,R200 ,R209 ,18214.6,1.06,88818,9,10,A -2144,R300 ,R364 ,12214.72,0.71,82363,6,10,A -2145,R300 ,R321 ,15779.07,0.92,95958,6,10,A -2146,R300 ,R318 ,19087.89,1.11,100315,4,10,A -2147,R200 ,R217 ,15700.89,0.92,82594,9,10,A -2149,R300 ,R375 ,13284.48,0.77,82217,9,10,A -2150,R100 ,R178 ,14546.06,0.85,82403,8,10,A -2151,R200 ,R202 ,18247.93,1.06,84705,9,10,A -2152,R300 ,R305 ,12708.48,0.74,82672,6,10,A -2153,R300 ,R340 ,11820.02,0.69,82680,4,10,A -2154,R300 ,R359 ,13939.34,0.81,81971,4,10,A -2155,R300 ,R315 ,11028.44,0.64,82218,4,10,A -2156,R400 ,R460 ,15043.97,0.88,80276,1,10,A -2157,R100 ,R170 ,11986.52,0.7,82655,5,10,A -2158,R400 ,R467 ,12458.49,0.73,82241,2,10,A -2159,R100 ,R174 ,9543.22,0.56,83075,5,10,A -2161,R100 ,R170 ,15143.77,0.88,82722,5,10,A -2163,R200 ,R261 ,17502.73,1.02,82555,9,10,A -2164,R300 ,R380 ,13939.14,0.81,82340,9,10,A -2165,R200 ,R261 ,18428.88,1.07,84447,9,10,A -2166,R400 ,R447 ,12957.95,0.76,82709,1,10,A -2167,R400 ,R428 ,13447.78,0.78,82544,1,10,A -2168,R300 ,R371 ,11369.85,0.66,82675,4,10,A -2169,R300 ,R362 ,20325.35,1.19,95961,4,10,A -2170,R400 ,R422 ,12172.56,0.71,82272,2,10,A -2171,R300 ,R335 ,15182.74,0.89,82583,4,10,A -2172,R400 ,R453 ,14327.61,0.84,83077,3,10,A -2173,R400 ,R470 ,12794.02,0.75,82181,1,10,A -2174,R300 ,R346 ,12391.72,0.72,82601,4,10,A -2175,R400 ,R466 ,10997.7,0.64,82857,3,10,A -2176,R300 ,R379 ,25009.47,1.46,83900,9,10,A -2177,R100 ,R115 ,13191.28,0.77,82115,5,10,A -2178,R100 ,R135 ,21199.34,1.24,80171,5,10,A -2179,R200 ,R217 ,11191.94,0.65,82666,9,10,A -2180,R100 ,R114 ,19791.33,1.15,98251,5,10,A -2181,R400 ,R422 ,12618.57,0.74,84927,2,10,A -2182,R400 ,R447 ,12903.72,0.75,82275,1,10,A -2183,R100 ,R175 ,14774.68,0.86,95872,8,10,A -2184,R400 ,R454 ,14525.17,0.85,82530,3,10,A -2185,R200 ,R211 ,14338.59,0.84,84052,9,10,A -2186,R400 ,R431 ,13942.39,0.81,82838,3,10,A -2187,R300 ,R327 ,10701.3,0.62,81841,6,10,A -2188,R300 ,R349 ,21189.37,1.24,82204,4,10,A -2189,R100 ,R101 ,24105.11,1.41,98135,5,10,A -2190,R300 ,R352 ,12424.24,0.72,81751,6,10,A -2191,R400 ,R416 ,9003.96,0.53,81839,2,10,A -2192,R200 ,R264 ,13160.13,0.77,82140,10,10,A -2193,R100 ,R131 ,21700.84,1.27,104591,5,10,A -2194,R100 ,R143 ,21255.94,1.24,83071,8,10,A -2195,R200 ,R232 ,81115.94,4.73,81631,9,10,A -2196,R300 ,R367 ,11416.52,0.67,83971,4,10,A -2197,R100 ,R175 ,20485.02,1.19,95794,8,10,A -2199,R100 ,R110 ,15465.15,0.9,82252,5,10,A -2200,R100 ,R126 ,17905.31,1.04,98368,5,10,A -2201,R400 ,R430 ,15054.4,0.88,82198,3,10,A -2202,R400 ,R431 ,19492.92,1.14,84493,3,10,A -2203,R300 ,R370 ,12279.02,0.72,82433,3,10,A -2204,R100 ,R167 ,13945.06,0.81,82000,6,10,A -2205,R300 ,R311 ,11948.89,0.7,82517,6,10,A -2206,R100 ,R161 ,17124.9,1,82683,10,10,A -2207,R100 ,R135 ,13115.65,0.76,82368,5,10,A -2208,R300 ,R348 ,15921.09,0.93,82277,4,10,A -2210,R300 ,R310 ,20953.26,1.22,98033,4,10,A -2211,R400 ,R416 ,11981.49,0.7,82314,2,10,A -2212,R400 ,R423 ,24660.11,1.44,91947,2,10,A -2213,R400 ,R439 ,12549.89,0.73,82258,1,10,A -2214,R200 ,R208 ,14361.37,0.84,83147,9,10,A -2216,R300 ,R374 ,19632.56,1.15,95591,6,10,A -2217,R100 ,R133 ,15569.67,0.91,82555,5,10,A -2218,R100 ,R176 ,19129.39,1.12,95853,8,10,A -2219,R100 ,R177 ,20773.99,1.21,95921,8,10,A -2220,R300 ,R301 ,19264.01,1.12,95883,6,10,A -2221,R100 ,R177 ,19171.12,1.12,98530,8,10,A -2222,R100 ,R123 ,15223.32,0.89,82572,7,10,A -2223,R100 ,R131 ,12062.63,0.7,82769,5,10,A -2224,R300 ,R305 ,12026.39,0.7,82008,6,10,A -2225,R100 ,R179 ,15380.23,0.9,82815,8,10,A -2226,R100 ,R174 ,13300.03,0.78,79568,5,10,A -2227,R300 ,R375 ,18671.34,1.09,97381,9,10,A -2228,R100 ,R174 ,12586.78,0.73,79749,5,10,A -2229,R100 ,R102 ,28290.13,1.65,104399,5,10,A -2230,R100 ,R137 ,20244.76,1.18,82346,5,10,A -2231,R400 ,R454 ,12315.13,0.72,82023,3,10,A -2232,R200 ,R201 ,16960.15,0.99,84026,9,10,A -2233,R300 ,R315 ,14477.09,0.84,97840,4,10,A -2234,R300 ,R302 ,10622.44,0.62,102469,6,10,A -2235,R300 ,R354 ,19945.87,1.16,102327,4,10,A -2236,R300 ,R377 ,17565.23,1.02,98398,9,10,A -2237,R300 ,R305 ,14789.51,0.86,81809,6,10,A -2238,R200 ,R237 ,17540.29,1.02,81739,9,10,A -2239,R300 ,R327 ,16317.28,0.95,102368,6,10,A -2240,R300 ,R369 ,12964.15,0.76,82422,4,10,A -2241,R400 ,R431 ,14083.83,0.82,82689,3,10,A -2243,R300 ,R306 ,13982.8,0.82,98028,6,10,A -2244,R300 ,R355 ,15384.29,0.9,84647,4,10,A -2245,R200 ,R206 ,18086.36,1.05,82114,9,10,A -2246,R400 ,R461 ,13631.19,0.8,82987,3,10,A -2247,R400 ,R451 ,14377,0.84,81651,2,10,A -2248,R300 ,R360 ,12583.95,0.73,82718,4,10,A -2249,R400 ,R460 ,13104.62,0.76,82302,1,10,A -2250,R400 ,R457 ,12185.7,0.71,82698,3,10,A -2251,R100 ,R150 ,15613.2,0.91,82608,5,10,A -2252,R200 ,R245 ,12439.23,0.73,82391,9,10,A -2253,R400 ,R467 ,13349.91,0.78,82792,2,10,A -2254,R100 ,R134 ,13982.43,0.82,79882,5,10,A -2255,R100 ,R118 ,12695.01,0.74,82319,7,10,A -2256,R400 ,R450 ,11696.3,0.68,81964,2,10,A -2258,R400 ,R429 ,13082.13,0.76,85561,1,10,A -2259,R400 ,R412 ,23898.41,1.39,87461,3,10,A -2260,R200 ,R248 ,16211.26,0.95,98284,9,10,A -2261,R100 ,R179 ,21320.48,1.24,96619,8,10,A -2262,R400 ,R430 ,11808.71,0.69,82719,3,10,A -2264,R300 ,R324 ,27120.06,1.58,102684,4,10,A -2265,R300 ,R318 ,11890.78,0.69,82459,4,10,A -2266,R100 ,R174 ,18072.21,1.05,82387,5,10,A -2267,R400 ,R470 ,13125.4,0.77,82677,1,10,A -2268,R200 ,R246 ,12944.3,0.75,82302,9,10,A -2269,R300 ,R360 ,12743.29,0.74,82054,4,10,A -2270,R200 ,R220 ,17684.44,1.03,82589,9,10,A -2271,R400 ,R415 ,20206.73,1.18,84460,3,10,A -2272,R400 ,R441 ,15535.61,0.91,82290,3,10,A -2273,R300 ,R353 ,12140.39,0.71,82402,6,10,A -2274,R300 ,R340 ,12462.88,0.73,82754,4,10,A -2275,R200 ,R207 ,15040.35,0.88,82932,9,10,A -2276,R300 ,R340 ,13076.17,0.76,82715,4,10,A -2277,R300 ,R337 ,15381.21,0.9,79507,4,10,A -2278,R300 ,R306 ,8577.29,0.5,82776,6,10,A -2279,R300 ,R359 ,11524.71,0.67,82048,4,10,A -2280,R200 ,R239 ,18666.58,1.09,82375,9,10,A -2281,R200 ,R233 ,16828.93,0.98,82439,9,10,A -2283,R300 ,R302 ,10424.27,0.61,81779,6,10,A -2284,R100 ,R167 ,9327.15,0.54,82310,6,10,A -2287,R400 ,R452 ,14367.85,0.84,82476,1,10,A -2288,R300 ,R322 ,11427.84,0.67,98196,6,10,A -2289,R300 ,R314 ,13654.12,0.8,102718,4,10,A -2290,R200 ,R265 ,17523.14,1.02,82140,10,10,A -2292,R400 ,R428 ,13748.51,0.8,82304,1,10,A -2294,R400 ,R457 ,13577.8,0.79,82848,3,10,A -2295,R400 ,R467 ,11937.38,0.7,82713,2,10,A -2296,R300 ,R370 ,11253.68,0.66,82845,3,10,A -2297,R400 ,R457 ,13328.51,0.78,82301,3,10,A -2300,R100 ,R163 ,23676.61,1.38,102560,5,10,A -2301,R300 ,R315 ,12067.75,0.7,79580,4,10,A -2302,R400 ,R431 ,12003.96,0.7,82325,3,10,A -2303,R100 ,R107 ,21916.35,1.28,102791,7,10,A -2304,R200 ,R202 ,16984.39,0.99,92431,9,10,A -2305,R400 ,R460 ,13259.1,0.77,83617,1,10,A -2306,R200 ,R245 ,12004.62,0.7,81802,9,10,A -2307,R200 ,R236 ,21543.6,1.26,87697,9,10,A -2308,R300 ,R351 ,11655,0.68,82714,3,10,A -2309,R200 ,R232 ,14751.69,0.86,102578,9,10,A -2310,R400 ,R415 ,16000.5,0.93,81887,3,10,A -2312,R400 ,R453 ,23583.75,1.38,92086,3,10,A -2313,R100 ,R163 ,31423.53,1.83,104449,5,10,A -2314,R200 ,R265 ,15517.41,0.91,82921,10,10,A -2315,R400 ,R447 ,21727.61,1.27,82276,1,10,A -2316,R300 ,R320 ,15477.38,0.9,97942,4,10,A -2317,R300 ,R320 ,19986.85,1.17,103536,4,10,A -2319,R200 ,R207 ,19689.77,1.15,82769,9,10,A -2320,R300 ,R303 ,15413.78,0.9,103649,6,10,A -2321,R100 ,R111 ,16703.16,0.97,103492,5,10,A -2322,R100 ,R170 ,18035.07,1.05,82761,5,10,A -2323,R400 ,R466 ,13828.03,0.81,104043,3,10,A -2324,R400 ,R467 ,16118.75,0.94,82227,2,10,A -2325,R400 ,R452 ,11186.67,0.65,82428,1,10,A -2326,R100 ,R107 ,18733.23,1.09,103451,7,10,A -2327,R100 ,R136 ,13390.27,0.78,82875,5,10,A -2328,R200 ,R207 ,16998.92,0.99,83584,9,10,A -2329,R200 ,R219 ,20467.54,1.19,84992,9,10,A -2330,R100 ,R117 ,13410.92,0.78,82072,5,10,A -2331,R300 ,R350 ,17189.98,1,82050,4,10,A -2332,R300 ,R351 ,12842.81,0.75,82366,4,10,A -2333,R300 ,R335 ,15113.19,0.88,79522,4,10,A -2334,R300 ,R306 ,9482,0.55,82479,6,10,A -2335,R300 ,R302 ,14171.57,0.83,101330,6,10,A -2337,R400 ,R417 ,11256.92,0.66,82257,3,10,A -2338,R300 ,R326 ,19559.39,1.14,101316,6,10,A -2339,R200 ,R262 ,30081,1.75,88269,10,10,A -2340,R100 ,R163 ,18175.89,1.06,103620,5,10,A -2341,R300 ,R375 ,13774.94,0.8,82599,9,10,A -2342,R300 ,R341 ,14026.97,0.82,102964,6,10,A -2343,R100 ,R179 ,13508.68,0.79,82251,8,10,A -2345,R100 ,R118 ,14386.95,0.84,82330,7,10,A -2346,R100 ,R171 ,14719.41,0.86,82289,5,10,A -2347,R200 ,R218 ,11198.63,0.65,82277,9,10,A -2348,R100 ,R150 ,13182.36,0.77,82360,5,10,A -2349,R200 ,R250 ,17487.19,1.02,103132,9,10,A -2350,R200 ,R219 ,17382.19,1.01,97725,9,10,A -2351,R100 ,R174 ,13315.86,0.78,79494,5,10,A -2354,R300 ,R375 ,15840.96,0.92,103776,9,10,A -2355,R300 ,R340 ,10969.41,0.64,82363,4,10,A -2356,R300 ,R304 ,13665.86,0.8,82201,6,10,A -2357,R100 ,R129 ,21272.94,1.24,82116,6,10,A -2358,R100 ,R173 ,12503.48,0.73,82246,5,10,A -2359,R200 ,R213 ,13391.61,0.78,82322,9,10,A -2360,R300 ,R333 ,18988.72,1.11,103204,4,10,A -2361,R400 ,R460 ,17916.09,1.04,92397,1,10,A -2362,R300 ,R369 ,13196.91,0.77,103637,4,10,A -2363,R300 ,R320 ,15580.11,0.91,103715,4,10,A -2364,R300 ,R313 ,16405.13,0.96,111024,4,10,A -2365,R300 ,R374 ,18410.06,1.07,103609,9,10,A -2366,R300 ,R314 ,13287.57,0.78,82209,4,10,A -2367,R300 ,R333 ,13534.64,0.79,82289,4,10,A -2368,R300 ,R380 ,11108.29,0.65,82270,9,10,A -2369,R300 ,R320 ,11140.3,0.65,82334,4,10,A -2370,R300 ,R365 ,20821.61,1.21,100164,4,10,A -2371,R200 ,R262 ,29785.77,1.74,88020,10,10,A -2372,R200 ,R262 ,36310.74,2.12,87847,10,10,A -2373,R100 ,R141 ,23314.18,1.36,88792,5,10,A -2374,R300 ,R306 ,11208.65,0.65,82292,6,10,A -2375,R300 ,R340 ,11086.8,0.65,82382,4,10,A -2376,R300 ,R365 ,13742.95,0.8,101479,4,10,A -2377,R300 ,R353 ,11964.7,0.7,82341,6,10,A -2378,R100 ,R115 ,18158.26,1.06,102945,5,10,A -2379,R400 ,R457 ,13095.58,0.76,82376,3,10,A -2380,R400 ,R469 ,15786.46,0.92,83341,2,10,A -2381,R400 ,R446 ,20390.42,1.19,82841,2,10,A -2382,R400 ,R416 ,10784.53,0.63,82487,2,10,A -2383,R100 ,R107 ,19469.75,1.14,103679,7,10,A -2384,R400 ,R422 ,17722.2,1.03,82585,2,10,A -2385,R400 ,R430 ,14009.86,0.82,81934,3,10,A -2386,R200 ,R218 ,12348.87,0.72,101445,9,10,A -2387,R300 ,R335 ,12542.55,0.73,82295,4,10,A -2388,R100 ,R150 ,15505.85,0.9,82046,5,10,A -2389,R300 ,R304 ,20579.06,1.2,103125,6,10,A -2390,R100 ,R163 ,23943.77,1.4,105381,5,10,A -2391,R100 ,R138 ,13943.97,0.81,82922,5,10,A -2392,R400 ,R450 ,15908.74,0.93,82089,2,10,A -2394,R400 ,R415 ,13287.04,0.77,82259,3,10,A -2395,R300 ,R355 ,14161.52,0.83,82534,4,10,A -2396,R300 ,R370 ,11884.73,0.69,82555,3,10,A -2397,R200 ,R244 ,15628.89,0.91,83338,9,10,A -2398,R200 ,R240 ,17118.96,1,88129,9,10,A -2399,R400 ,R461 ,14808.26,0.86,82540,3,10,A -2400,R300 ,R375 ,15323.16,0.89,102712,9,10,A -2403,R100 ,R176 ,25435.33,1.48,102986,8,10,A -2404,R300 ,R380 ,15046.5,0.88,79480,9,10,A -2406,R100 ,R102 ,23477.23,1.37,97351,5,10,A -2407,R300 ,R358 ,10225.27,0.6,82339,3,10,A -2408,R200 ,R208 ,14322.74,0.84,82396,9,10,A -2409,R300 ,R341 ,14274.87,0.83,82387,6,10,A -2410,R200 ,R257 ,61584.24,3.59,89082,9,10,A -2411,R200 ,R257 ,50207.23,2.93,86764,9,10,A -2412,R200 ,R257 ,48383.53,2.82,86717,9,10,A -2414,R100 ,R117 ,13409.28,0.78,82272,5,10,A -2415,R100 ,R148 ,13091.96,0.76,79563,5,10,A -2418,R400 ,R462 ,16515.58,0.96,82365,3,10,A -2419,R300 ,R311 ,16511.15,0.96,103695,6,10,A -2420,R200 ,R250 ,13985.84,0.82,82255,9,10,A -2421,R200 ,R244 ,15128.36,0.88,82941,9,10,A -2422,R100 ,R129 ,13669.47,0.8,82291,6,10,A -2423,R100 ,R123 ,19437.21,1.13,82301,7,10,A -2424,R200 ,R207 ,17662.86,1.03,82183,9,10,A -2425,R300 ,R342 ,8287.99,0.48,82124,6,10,A -2426,R300 ,R327 ,14875.68,0.87,103658,6,10,A -2427,R300 ,R310 ,20554.44,1.2,87393,4,10,A -2428,R300 ,R304 ,14166.64,0.83,82240,6,10,A -2429,R300 ,R322 ,11837.59,0.69,82343,6,10,A -2430,R400 ,R428 ,14300.46,0.83,85134,1,10,A -2431,R300 ,R334 ,13900.18,0.81,102189,4,10,A -2432,R400 ,R439 ,12124.78,0.71,82311,1,10,A -2433,R400 ,R439 ,10645.27,0.62,82236,1,10,A -2434,R400 ,R460 ,16641.42,0.97,81961,1,10,A -2436,R400 ,R417 ,12524.26,0.73,82324,3,10,A -2437,R400 ,R431 ,13571.89,0.79,82214,3,10,A -2438,R300 ,R322 ,10645.93,0.62,82382,6,10,A -2439,R400 ,R431 ,13430.15,0.78,82287,3,10,A -2440,R100 ,R133 ,14561.68,0.85,82278,5,10,A -2442,R300 ,R332 ,14268.32,0.83,82355,4,10,A -2445,R300 ,R359 ,12342.84,0.72,82306,4,10,A -2446,R400 ,R461 ,13878.56,0.81,82109,2,10,A -2448,R100 ,R129 ,11575.58,0.68,79562,7,10,A -2449,R100 ,R101 ,16443.63,0.96,85996,5,10,A -2450,R100 ,R169 ,13559.36,0.79,85639,5,10,A -2451,R400 ,R469 ,27828.52,1.62,87111,2,10,A -2454,R100 ,R107 ,18016.56,1.05,82387,7,10,A -2455,R200 ,R208 ,15834.51,0.92,82590,9,10,A -2456,R100 ,R124 ,21347.96,1.25,107394,5,10,A -2457,R100 ,R176 ,21077.64,1.23,82430,8,10,A -2458,R100 ,R177 ,13321.8,0.78,82233,8,10,A -2459,R400 ,R438 ,12407.12,0.72,82135,2,10,A -2460,R300 ,R301 ,11315.18,0.66,81996,6,10,A -2461,R400 ,R438 ,13038.79,0.76,82284,2,10,A -2462,R200 ,R240 ,16201.64,0.94,85529,9,10,A -2463,R200 ,R246 ,17660.66,1.03,86038,9,10,A -2465,R200 ,R231 ,36242.28,2.11,84466,9,10,A -2467,R300 ,R327 ,10961.99,0.64,81855,6,10,A -2468,R200 ,R248 ,21042.87,1.23,103779,9,10,A -2469,R200 ,R250 ,13626.16,0.79,84451,9,10,A -2470,R200 ,R207 ,17761.54,1.04,82584,9,10,A -2471,R200 ,R205 ,17599.8,1.03,103431,9,10,A -2472,R200 ,R220 ,16118.77,0.94,81977,9,10,A -2473,R100 ,R168 ,20818.76,1.21,85348,4,10,A -2474,R300 ,R332 ,16935.71,0.99,85941,4,10,A -2475,R400 ,R459 ,25298.57,1.48,87391,2,10,A -2476,R300 ,R334 ,27801.12,1.62,108688,4,10,A -2478,R400 ,R417 ,13047.21,0.76,85748,3,10,A -2480,R400 ,R470 ,13099.1,0.76,86377,1,10,A -2482,R200 ,R244 ,17448.65,1.02,86586,9,10,A -2483,R100 ,R172 ,14827.66,0.86,85442,4,10,A -2485,R300 ,R359 ,12974.87,0.76,82918,4,10,A -2486,R100 ,R172 ,13628.4,0.79,85822,5,10,A -2488,R100 ,R172 ,16422.61,0.96,86006,5,10,A -2489,R300 ,R314 ,12425.12,0.72,85675,4,10,A -2490,R100 ,R121 ,19147.89,1.12,106766,5,10,A -2491,R100 ,R146 ,16506.59,0.96,85927,5,10,A -2492,R200 ,R246 ,16992.46,0.99,83759,9,10,A -2493,R300 ,R346 ,11287.76,0.66,85804,4,10,A -2494,R300 ,R303 ,12446.28,0.73,85769,6,10,A -2495,R300 ,R341 ,15332.87,0.89,107348,6,10,A -2496,R400 ,R453 ,13449.38,0.78,82821,3,10,A -2497,R300 ,R373 ,12544.15,0.73,85952,9,10,A -2498,R100 ,R167 ,15550.81,0.91,85803,6,10,A -2499,R200 ,R205 ,15762.52,0.92,107308,9,10,A -2501,R300 ,R370 ,14101.51,0.82,85787,3,10,A -2503,R300 ,R340 ,17639.27,1.03,103610,4,10,A -2516,R300 ,R302 ,14469.06,0.84,107351,6,10,A -2519,R100 ,R102 ,12477.91,0.73,86712,5,10,A -2520,R300 ,R326 ,10930.01,0.64,107443,6,10,A -2523,R200 ,R258 ,21739.93,1.27,85996,10,10,A -2524,R200 ,R250 ,18610.44,1.09,85127,9,10,A -2525,R100 ,R123 ,13790.05,0.8,85698,7,10,A -2526,R100 ,R127 ,12976.58,0.76,82494,7,10,A -2527,R400 ,R421 ,13644.45,0.8,85782,3,10,A -2528,R400 ,R416 ,11215.47,0.65,82825,2,10,A -2529,R400 ,R431 ,14783.81,0.86,85807,3,10,A -2530,R400 ,R447 ,12060.87,0.7,81769,1,10,A -2531,R300 ,R331 ,14006.88,0.82,82502,6,10,A -2532,R400 ,R428 ,18832.66,1.1,85689,1,10,A -2533,R300 ,R304 ,13237.56,0.77,82865,6,10,A -2534,R300 ,R331 ,12611.23,0.74,85262,6,10,A -2536,R400 ,R461 ,16009.96,0.93,85859,3,10,A -2537,R400 ,R421 ,14867.53,0.87,85862,3,10,A -2538,R400 ,R457 ,13153.08,0.77,82572,3,10,A -2540,R100 ,R143 ,17659.94,1.03,86399,8,10,A -2542,R100 ,R129 ,20273.52,1.18,103504,6,10,A -2544,R100 ,R135 ,14674.67,0.86,85980,5,10,A -2545,R400 ,R453 ,17078.18,1,85916,3,10,A -2546,R100 ,R110 ,14497.89,0.85,85943,5,10,A -2547,R300 ,R360 ,11536.51,0.67,85792,4,10,A -2548,R400 ,R421 ,14093.4,0.82,75582,3,10,A -2550,R300 ,R302 ,10857.29,0.63,103940,6,10,A -2557,R100 ,R172 ,14412.47,0.84,86062,5,10,A -2559,R100 ,R122 ,15308.18,0.89,82554,5,10,A -2565,R300 ,R362 ,6955.21,0.41,86031,4,10,A -2567,R400 ,R431 ,14185.38,0.83,86057,3,10,A -2568,R300 ,R380 ,20486.14,1.19,86392,9,10,A -2569,R300 ,R373 ,13379.83,0.78,85898,9,10,A -2570,R400 ,R468 ,14667.2,0.86,86060,1,10,A -2572,R300 ,R302 ,20958.4,1.22,101369,6,10,A -2581,R200 ,R233 ,15178.5,0.89,85236,9,10,A -2584,R200 ,R233 ,20568.84,1.2,87380,9,10,A -2586,R100 ,R110 ,19215.74,1.12,86289,5,10,A -2596,R400 ,R421 ,14129.75,0.82,86612,3,10,A -2601,R200 ,R212 ,18532.38,1.08,85641,9,10,A -2604,R200 ,R208 ,14991.21,0.87,86813,9,10,A -2605,R200 ,R233 ,20680.12,1.21,87313,9,10,A -2607,R400 ,R428 ,10917.01,0.64,86008,1,10,A -2608,R400 ,R461 ,14096.88,0.82,78437,3,10,A -2609,R100 ,R178 ,15797.52,0.92,86118,8,10,A -2613,R100 ,R116 ,26971.71,1.57,83519,5,10,A -2615,R200 ,R237 ,19736.55,1.15,83372,9,10,A -2627,R200 ,R263 ,16619.9,0.97,85914,9,10,A -2631,R400 ,R415 ,15121.29,0.88,83229,3,10,A -2632,R200 ,R239 ,20718.86,1.21,86716,9,10,A -2641,R100 ,R178 ,22049.41,1.29,85386,8,10,A -2649,R400 ,R429 ,17883.65,1.04,86430,1,10,A -2660,R200 ,R257 ,50337.47,2.94,85572,9,10,A -2682,R200 ,R257 ,60787.18,3.55,86688,9,10,A -2693,R400 ,R429 ,22348.01,1.3,78343,1,10,A -2697,R200 ,R257 ,49197.17,2.87,86717,9,10,A -2715,R200 ,R250 ,18163.03,1.06,85629,9,10,A -2716,R100 ,R179 ,26029.89,1.52,103599,8,10,A -2717,R100 ,R179 ,16868.81,0.98,84045,8,10,A -2721,R300 ,R372 ,15351.64,0.9,86076,4,10,A -2725,R300 ,R322 ,6638.75,0.39,82643,6,10,A -2727,R300 ,R301 ,12836.29,0.75,86223,6,10,A -2728,R100 ,R168 ,14313.97,0.83,82660,4,10,A -2729,R400 ,R470 ,14787.04,0.86,85163,1,10,A -2730,R200 ,R261 ,19808.13,1.16,85619,9,10,A -2737,R100 ,R167 ,14397.33,0.84,85650,6,10,A -2739,R300 ,R301 ,10245.67,0.6,85796,6,10,A -2742,R300 ,R350 ,17037.35,0.99,86116,4,10,A -2744,R200 ,R213 ,16037.01,0.94,86827,9,10,A -2747,R300 ,R379 ,15020.35,0.88,87031,9,10,A -2753,R400 ,R419 ,20767.47,1.21,82700,2,10,A -2754,R300 ,R342 ,11179.4,0.65,79305,6,10,A -2757,R400 ,R454 ,23500.78,1.37,87536,3,10,A -2759,R200 ,R240 ,21761.92,1.27,86306,9,10,A -2760,R200 ,R240 ,19140.67,1.12,86140,9,10,A -2764,R400 ,R453 ,20121.51,1.17,85110,3,10,A -2765,R100 ,R146 ,21144.9,1.23,86977,5,10,A -2766,R200 ,R210 ,10885.51,0.63,50670,9,10,A -2767,R200 ,R211 ,29795.47,1.74,81382,9,10,A -2768,R200 ,R212 ,12421.06,0.72,54031,9,10,A -2770,R300 ,R370 ,17177.56,1,86658,3,10,A -2771,R200 ,R237 ,15844.28,0.92,85407,9,10,A -2772,R200 ,R212 ,16456.86,0.96,81415,9,10,A -2774,R200 ,R204 ,13732.93,0.8,45825,9,10,A -2775,R200 ,R204 ,12790.63,0.75,58067,9,10,A -2776,R200 ,R204 ,11541.7,0.67,57332,9,10,A -2779,R200 ,R260 ,18343.08,1.07,86115,10,10,A -2780,R100 ,R110 ,19400.44,1.13,86169,5,10,A -2781,R100 ,R116 ,19231.18,1.12,89292,5,10,A -2784,R300 ,R372 ,9476.47,0.55,86519,4,10,A -2785,R300 ,R371 ,17529.66,1.02,86089,4,10,A -2786,R200 ,R265 ,7278.99,0.42,47568,10,10,A -2787,R400 ,R454 ,18302.68,1.07,87777,3,10,A -2790,R400 ,R441 ,27809.78,1.62,86814,3,10,A -2791,R200 ,R258 ,6161.97,0.36,40431,10,10,A -2795,R200 ,R245 ,9597.21,0.56,53312,9,10,A -2796,R300 ,R340 ,16983.81,0.99,87476,4,10,A -2799,R100 ,R116 ,17566.06,1.02,57790,5,10,A -2802,R200 ,R231 ,14610.41,0.85,78679,9,10,A -2803,R300 ,R327 ,10634.74,0.62,86126,6,10,A -2804,R200 ,R212 ,23877.14,1.39,86680,9,10,A -2805,R400 ,R438 ,13600.31,0.79,86209,2,10,A -2810,R200 ,R209 ,22919.47,1.34,87264,9,10,A -2811,R400 ,R459 ,16398.04,0.96,88436,2,10,A -2813,R300 ,R378 ,18224.95,1.06,87120,6,10,A -2815,R300 ,R351 ,11193.33,0.65,86144,4,10,A -2816,R300 ,R369 ,12425.87,0.72,83199,4,10,A -2818,R100 ,R136 ,16262.92,0.95,86314,5,10,A -2820,R100 ,R175 ,16508.87,0.96,85821,8,10,A -2822,R400 ,R429 ,19541.01,1.14,77450,1,10,A -2824,R100 ,R147 ,15836.67,0.92,85871,5,10,A -2829,R200 ,R211 ,16595.32,0.97,83206,9,10,A -2830,R200 ,R233 ,16857.37,0.98,86011,9,10,A -2831,R200 ,R206 ,13699.62,0.8,82986,9,10,A -2840,R400 ,R455 ,20786.26,1.21,84895,2,10,A -2843,R300 ,R349 ,17118.33,1,85989,4,10,A -2844,R400 ,R455 ,15425.05,0.9,83289,2,10,A -2845,R400 ,R411 ,17259.75,1.01,83326,3,10,A -2847,R400 ,R424 ,19538.61,1.14,86329,2,10,A -2848,R300 ,R349 ,13042.3,0.76,87087,4,10,A -2850,R400 ,R423 ,14194.74,0.83,49455,2,10,A -2851,R100 ,R173 ,14938.5,0.87,85416,5,10,A -2853,R400 ,R450 ,13751.56,0.8,86202,2,10,A -2855,R200 ,R231 ,23567.67,1.37,87616,9,10,A -2857,R100 ,R161 ,18571.01,1.08,85375,10,10,A -2860,R100 ,R112 ,14876.32,0.87,79532,5,10,A -2865,R300 ,R304 ,11109.83,0.65,82010,6,10,A -2867,R400 ,R453 ,12625.36,0.74,80000,3,10,A -2868,R300 ,R311 ,8076.43,0.47,81752,6,10,A -2870,R200 ,R257 ,31340,1.83,0,9,10,A -2871,R200 ,R261 ,11190.52,0.65,50000,9,10,A -3200,R100 ,R126 ,2018.34,0.12,12067,5,10,A -3201,R200 ,R210 ,1221.53,0.07,8137,9,10,A -3202,R200 ,R211 ,787.98,0.05,4762,9,10,A -3203,R200 ,R212 ,1577.67,0.09,9712,9,10,A -3204,R100 ,R163 ,1204.56,0.07,7819,5,10,A -3205,R200 ,R201 ,1622.35,0.09,9555,9,10,A -3206,R400 ,R462 ,2106.23,0.12,11683,3,10,A -3207,R100 ,R116 ,1450.92,0.08,12189,5,10,A -3208,R100 ,R116 ,1691.28,0.1,129000,5,10,A -3210,R400 ,R412 ,2075.48,0.12,11362,3,10,A -3211,R400 ,R412 ,1689.44,0.1,7450,3,10,A -3212,R400 ,R462 ,1521.78,0.09,10594,3,10,A -3214,R100 ,R116 ,1771.57,0.1,12560,5,10,A -3216,R200 ,R204 ,1279.47,0.07,11017,9,10,A -3217,R200 ,R204 ,2606.84,0.15,13776,9,10,A -3218,R200 ,R219 ,2980.91,0.17,18948,9,10,A -3219,R100 ,R145 ,1809.48,0.11,11937,5,10,A -3221,R100 ,R116 ,1781.38,0.1,15806,5,10,A -3222,R400 ,R429 ,1653.52,0.1,10403,1,10,A -3223,R400 ,R429 ,1383.63,0.08,9955,1,10,A -3224,R200 ,R233 ,2200.74,0.13,13280,9,10,A -3225,R200 ,R207 ,2690.44,0.16,21625,9,10,A -3226,R400 ,R429 ,1262.9,0.07,8196,1,10,A -3227,R400 ,R462 ,2603.03,0.15,18900,3,10,A -3229,R400 ,R423 ,2800.6,0.16,24167,2,10,A -3230,R400 ,R469 ,1471.29,0.09,10521,2,10,A -3233,R200 ,R202 ,1766.29,0.1,9700,9,10,A -3234,R400 ,R430 ,2123.94,0.12,13923,3,10,A -3235,R400 ,R451 ,4530.29,0.26,29059,2,10,A -3236,R400 ,R455 ,3341.1,0.19,29809,2,10,A -3237,R400 ,R469 ,1859.54,0.11,15806,2,10,A -3238,R300 ,R324 ,1680.59,0.1,11545,4,10,A -3239,R100 ,R101 ,1831.61,0.11,11100,5,10,A -3240,R200 ,R212 ,2975.19,0.17,31988,9,10,A -3241,R300 ,R372 ,1797.86,0.1,7500,4,10,A -3242,R400 ,R448 ,3059.54,0.18,18745,3,10,A -3243,R400 ,R423 ,2207.15,0.13,21600,2,10,A -3244,R100 ,R169 ,2485.25,0.14,16500,5,10,A -3247,R400 ,R421 ,5296.14,0.31,32664,3,10,A -3249,R400 ,R423 ,1605.65,0.09,14249,2,10,A -3250,R300 ,R322 ,903.51,0.05,11000,6,10,A -3251,R200 ,R236 ,2025.36,0.12,14200,9,10,A -3252,R100 ,R141 ,1802.91,0.11,20300,5,10,A -3253,R400 ,R452 ,3975.59,0.23,31000,1,10,A -3254,R100 ,R172 ,1945.21,0.11,9128,5,10,A -3255,R300 ,R372 ,1356.87,0.08,11300,4,10,A -3258,R200 ,R222 ,4202.41,0.25,25046,9,10,A -3259,R400 ,R455 ,4858.49,0.28,31369,2,10,A -3261,R300 ,R375 ,4091.49,0.24,31050,9,10,A -3262,R200 ,R236 ,3376.77,0.2,20225,9,10,A -3263,R400 ,R462 ,2252.46,0.13,20262,3,10,A -3264,R200 ,R210 ,2131.68,0.12,17000,9,10,A -3265,R200 ,R210 ,3463.55,0.2,29965,9,10,A -3267,R200 ,R211 ,1207.94,0.07,13000,9,10,A -3270,R100 ,R141 ,1616.55,0.09,12400,5,10,A -3273,R300 ,R348 ,2686.86,0.16,19200,4,10,A -3274,R200 ,R244 ,3067.18,0.18,25700,9,10,A -3276,R400 ,R423 ,1044.2,0.06,12400,2,10,A -3277,R400 ,R423 ,2645.38,0.15,22496,2,10,A -3279,R100 ,R175 ,1627.21,0.09,12100,8,10,A -3281,R200 ,R258 ,1604.14,0.09,17230,10,10,A -3283,R100 ,R141 ,1513.74,0.09,16700,5,10,A -3284,R400 ,R423 ,1161.45,0.07,11300,2,10,A -3285,R400 ,R462 ,2880.72,0.17,36700,3,10,A -3287,R400 ,R452 ,1718.72,0.1,19800,1,10,A -3290,R400 ,R446 ,4845.36,0.28,43415,2,10,A -3292,R300 ,R352 ,1573.85,0.09,32600,6,10,A -3293,R200 ,R236 ,3814.79,0.22,31536,9,10,A -3295,R400 ,R412 ,1857.09,0.11,0,3,10,A -3296,R400 ,R422 ,4049.03,0.24,33425,2,10,A -3304,R400 ,R429 ,1836.82,0.11,29738,1,10,A -3305,R400 ,R470 ,3247.8,0.19,14200,1,10,A -3306,R400 ,R447 ,3985.04,0.23,31800,1,10,A -3307,R100 ,R116 ,1214.94,0.07,6300,5,10,A -3310,R400 ,R421 ,3038.08,0.18,39623,3,10,A -3315,R200 ,R261 ,2407.47,0.14,16400,9,10,A -3316,R100 ,R178 ,2398.48,0.14,18196,8,10,A -3318,R400 ,R424 ,2678.01,0.16,35000,2,10,A diff --git a/docs/Directory_structure.md b/docs/Directory_structure.md index 6095e7b..816dc0d 100644 --- a/docs/Directory_structure.md +++ b/docs/Directory_structure.md @@ -31,7 +31,14 @@ project_name/ │ ├── bin/ │ ├── hive_queries.sh -│ └── run_tests.sh +│ ├── run_tests.sh +│ └── metrics/ +│ ├── build/ +│ ├── metrics.pyx +│ ├── metrics.so +│ ├── metrics.c +│ ├── setup.py +│ └── build.sh │ ├── data/ │ ├── input/ @@ -42,7 +49,7 @@ project_name/ │ └── model_diagnostics.csv │ ├── docs/ -│ ├── problem_statement.md +│ ├── Branch.md │ ├── Approach.pdf │ └── latex/ │ @@ -67,14 +74,7 @@ project_name/ │ ├── stat.py │ ├── opt.py │ ├── utils.py -│ ├── data_types.py -│ └── tmp/ -│ ├── build/ -│ ├── metrics.pyx -│ ├── metrics.so -│ ├── metrics.c -│ ├── setup.py -│ └── build.sh +│ └── data_types.py │ ├── tests/ │ ├── __init__.py diff --git a/log/cov.out b/log/cov.out deleted file mode 100644 index a6e7cb8..0000000 --- a/log/cov.out +++ /dev/null @@ -1,7 +0,0 @@ -Name Stmts Miss Cover Missing ------------------------------------------------------ -mllib/__init__.py 7 0 100% -mllib/lib/__init__.py 7 0 100% -mllib/lib/cluster.py 103 0 100% ------------------------------------------------------ -TOTAL 117 0 100% diff --git a/logs/cov.out b/logs/cov.out new file mode 100644 index 0000000..8f29759 --- /dev/null +++ b/logs/cov.out @@ -0,0 +1,8 @@ +Name Stmts Miss Cover Missing +----------------------------------------------------------------------------------------- +/media/ph33r/Data/Project/mllib/Git/mllib/__init__.py 7 0 100% +/media/ph33r/Data/Project/mllib/Git/mllib/lib/__init__.py 7 0 100% +/media/ph33r/Data/Project/mllib/Git/mllib/lib/cluster.py 103 0 100% +/media/ph33r/Data/Project/mllib/Git/mllib/lib/model.py 44 0 100% +----------------------------------------------------------------------------------------- +TOTAL 161 0 100% diff --git a/log/pip.out b/logs/pip.out similarity index 64% rename from log/pip.out rename to logs/pip.out index 6b4200b..f61bf91 100644 --- a/log/pip.out +++ b/logs/pip.out @@ -1 +1 @@ -INFO: Successfully saved requirements file in /media/ph33r/Data/Project/mllib/dev/requirements.txt +INFO: Successfully saved requirements file in /media/ph33r/Data/Project/mllib/Git/requirements.txt diff --git a/log/pylint/lib-__init__-py.out b/logs/pylint/lib-__init__-py.out similarity index 100% rename from log/pylint/lib-__init__-py.out rename to logs/pylint/lib-__init__-py.out diff --git a/log/pylint/lib-cfg-py.out b/logs/pylint/lib-cfg-py.out similarity index 100% rename from log/pylint/lib-cfg-py.out rename to logs/pylint/lib-cfg-py.out diff --git a/log/pylint/lib-cluster-py.out b/logs/pylint/lib-cluster-py.out similarity index 100% rename from log/pylint/lib-cluster-py.out rename to logs/pylint/lib-cluster-py.out diff --git a/log/pylint/lib-glmnet-py.out b/logs/pylint/lib-glmnet-py.out similarity index 100% rename from log/pylint/lib-glmnet-py.out rename to logs/pylint/lib-glmnet-py.out diff --git a/logs/pylint/lib-glmnet_ts-py.out b/logs/pylint/lib-glmnet_ts-py.out new file mode 100644 index 0000000..77fd809 --- /dev/null +++ b/logs/pylint/lib-glmnet_ts-py.out @@ -0,0 +1,9 @@ +************* Module mllib.lib.glmnet_ts +glmnet_ts.py:238:41: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +glmnet_ts.py:239:41: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +glmnet_ts.py:240:42: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +glmnet_ts.py:241:42: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + diff --git a/logs/pylint/lib-model-py.out b/logs/pylint/lib-model-py.out new file mode 100644 index 0000000..8d71b59 --- /dev/null +++ b/logs/pylint/lib-model-py.out @@ -0,0 +1,9 @@ +************* Module mllib.lib.model +model.py:140:41: I1101: Module 'metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +model.py:141:41: I1101: Module 'metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +model.py:142:42: I1101: Module 'metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +model.py:143:42: I1101: Module 'metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + diff --git a/log/pylint/lib-utils-py.out b/logs/pylint/lib-utils-py.out similarity index 100% rename from log/pylint/lib-utils-py.out rename to logs/pylint/lib-utils-py.out diff --git a/log/pylint/mllib-__init__-py.out b/logs/pylint/metrics-setup-py.out similarity index 100% rename from log/pylint/mllib-__init__-py.out rename to logs/pylint/metrics-setup-py.out diff --git a/log/pylint/mllib-__main__-py.out b/logs/pylint/mllib-__init__-py.out similarity index 100% rename from log/pylint/mllib-__main__-py.out rename to logs/pylint/mllib-__init__-py.out diff --git a/log/pylint/pylint.out b/logs/pylint/mllib-__main__-py.out similarity index 100% rename from log/pylint/pylint.out rename to logs/pylint/mllib-__main__-py.out diff --git a/log/pylint/tests-__init__-py.out b/logs/pylint/pylint.out similarity index 100% rename from log/pylint/tests-__init__-py.out rename to logs/pylint/pylint.out diff --git a/log/pylint/tests-test_cluster-py.out b/logs/pylint/tests-__init__-py.out similarity index 100% rename from log/pylint/tests-test_cluster-py.out rename to logs/pylint/tests-__init__-py.out diff --git a/logs/pylint/tests-test_cluster-py.out b/logs/pylint/tests-test_cluster-py.out new file mode 100644 index 0000000..d7495ee --- /dev/null +++ b/logs/pylint/tests-test_cluster-py.out @@ -0,0 +1,4 @@ + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + diff --git a/logs/pylint/tests-test_glmnet_ts-py.out b/logs/pylint/tests-test_glmnet_ts-py.out new file mode 100644 index 0000000..d7495ee --- /dev/null +++ b/logs/pylint/tests-test_glmnet_ts-py.out @@ -0,0 +1,4 @@ + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + diff --git a/logs/pylint/tests-test_metrics-py.out b/logs/pylint/tests-test_metrics-py.out new file mode 100644 index 0000000..d40a4ad --- /dev/null +++ b/logs/pylint/tests-test_metrics-py.out @@ -0,0 +1,10 @@ +************* Module tests.test_metrics +test_metrics.py:61:22: I1101: Module 'mllib.lib.metrics' has no 'rsq' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +test_metrics.py:69:22: I1101: Module 'mllib.lib.metrics' has no 'mse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +test_metrics.py:77:22: I1101: Module 'mllib.lib.metrics' has no 'rmse' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +test_metrics.py:85:22: I1101: Module 'mllib.lib.metrics' has no 'mae' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) +test_metrics.py:93:22: I1101: Module 'mllib.lib.metrics' has no 'mape' member, but source is unavailable. Consider adding this module to extension-pkg-whitelist if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member) + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + diff --git a/logs/pylint/tests-test_model-py.out b/logs/pylint/tests-test_model-py.out new file mode 100644 index 0000000..d7495ee --- /dev/null +++ b/logs/pylint/tests-test_model-py.out @@ -0,0 +1,4 @@ + +-------------------------------------------------------------------- +Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00) + diff --git a/mllib/__main__.py b/mllib/__main__.py index 6c6fb9e..2fbd285 100644 --- a/mllib/__main__.py +++ b/mllib/__main__.py @@ -27,7 +27,7 @@ from lib import cfg, utils # noqa: F841 from lib.cluster import Cluster # noqa: F841 -from lib.glmnet import GLMNet # noqa: F841 +from lib.model import GLMNet # noqa: F841 # ============================================================================= # --- DO NOT CHANGE ANYTHING FROM HERE @@ -58,6 +58,7 @@ args = CLI.parse_args() fn_ip = args.filename[0] +fn_ip = "store.csv" # ============================================================================= # --- Main @@ -66,15 +67,24 @@ if __name__ == '__main__': start = time.time_ns() # --- Clustering + start_t = time.time_ns() df_ip = pd.read_csv(path + "input/" + fn_ip) clus_sol = Cluster(df=df_ip, x_var=["x1"]) clus_sol.opt_k() print("Clustering\n", "optimal k = " + str(clus_sol.optimal_k), - elapsed_time("Time", start), + elapsed_time("Time", start_t), sep="\n") # --- GLMNet + start_t = time.time_ns() df_ip = pd.read_csv(path + "input/test_glmnet.csv") glm_mod = GLMNet(df=df_ip, y_var=["y"], - x_var=["x1", "x2", "x3"]) + x_var=["x1", "x3"]) + print("\nGLMNet\n") + for k, v in glm_mod.model_summary.items(): + print(k, str(v).rjust(69 - len(k))) + print(elapsed_time("Time", start_t), + sep="\n") + # --- EOF + print(sep, elapsed_time("Total time", start), sep, sep="\n") diff --git a/mllib/lib/cluster.py b/mllib/lib/cluster.py index b2844b9..b0e9d14 100644 --- a/mllib/lib/cluster.py +++ b/mllib/lib/cluster.py @@ -65,8 +65,8 @@ class Cluster(): Stopping criterion: `one_se` or `gap_max` (the default is "one_se"). - README - ------ + Notes + ----- Points to be noted for `method`: - Default method is `one_se`. diff --git a/mllib/lib/glmnet.py b/mllib/lib/glmnet.py deleted file mode 100644 index 2855247..0000000 --- a/mllib/lib/glmnet.py +++ /dev/null @@ -1,115 +0,0 @@ -""" -GLMNet module. - -Objective: - - Build - `GLMNet `_ - model using optimal alpha and lambda - -Credits -------- -:: - - Authors: - - Diptesh - - Date: Sep 06, 2021 -""" - -# pylint: disable=invalid-name -# pylint: disable=R0902,R0903,R0913,R0914 - -from typing import List, Dict - -import pandas as pd -import numpy as np - -# ============================================================================= -# --- DO NOT CHANGE ANYTHING FROM HERE -# ============================================================================= - - -class GLMNet(): - """GLMNet module. - - Objective: - - Build - `GLMNet `_ - model using optimal alpha and lambda - - Parameters - ---------- - df : pd.DataFrame - - Pandas dataframe containing `y_var` and `x_var` variables. - - y_var : List[str] - - Dependant variables. - - x_var : List[str] - - Independant variables. - - timeseries : bool, optional - - Boolean value to indicate time-series inputs (the default is False). - - param : Dict, optional - - GLMNet parameters (the default is None). - In case of None, the parameters will default to:: - - seed: 1 - a_inc: 0.05 - test_perc: 0.25 - n_jobs: -1 - k_fold: 10 - lambda_param: [1e-5, 1e-4, 1e-3, 1e-2, 1e-1, 1.0, 10.0, 100.0] - timeseries: False - - """ - - def __init__(self, - df: pd.DataFrame, - y_var: List[str], - x_var: List[str], - timeseries: bool = False, - param: Dict = None): - """Initialize variables for module ``GLMNet``.""" - self.df = df - self.y_var = y_var - self.x_var = x_var - if param is None: - param = {"seed": 1, - "a_inc": 0.05, - "test_perc": 0.25, - "n_jobs": -1, - "k_fold": 10, - "lambda_param": [1e-5, 1e-4, 1e-3, 1e-2, 1e-1, - 1.0, 10.0, 100.0]} - self.param = param - self.param["l1_range"] = list(np.array(range(5, 105, - int(self.param["a_inc"] - * 100.0))) / 100.0) - self.param["timeseries"] = timeseries - - def fit(self): - """Fit the best GLMNet model.""" - - def predict(self, df_predict: pd.DataFrame) -> pd.DataFrame: - """Short summary. - - Parameters - ---------- - df_predict : pd.DataFrame - - Pandas dataframe containing `x_var`. - - Returns - ------- - pd.DataFrame - - Pandas dataframe containing predicted `y_var` and `x_var`. - - """ diff --git a/mllib/lib/metrics.so b/mllib/lib/metrics.so new file mode 100644 index 0000000..c972ad9 Binary files /dev/null and b/mllib/lib/metrics.so differ diff --git a/mllib/lib/model.py b/mllib/lib/model.py new file mode 100644 index 0000000..a93c36d --- /dev/null +++ b/mllib/lib/model.py @@ -0,0 +1,166 @@ +""" +Module for commonly used machine learning modelling algorithms. + +**Available routines:** + +- class ``GLMNet``: Builds GLMnet model using cross validation. + +Credits +------- +:: + + Authors: + - Diptesh + + Date: Sep 06, 2021 +""" + +# pylint: disable=invalid-name +# pylint: disable=R0902,R0903,R0913,R0914,C0413 + +from typing import List, Dict + +import re +import sys +from inspect import getsourcefile +from os.path import abspath + +import pandas as pd +import numpy as np + +from sklearn.linear_model import ElasticNetCV +from sklearn.model_selection import train_test_split as split + +path = abspath(getsourcefile(lambda: 0)) +path = re.sub(r"(.+\/)(.+.py)", "\\1", path) +sys.path.insert(0, path) + +import metrics # noqa: F841 + +# ============================================================================= +# --- DO NOT CHANGE ANYTHING FROM HERE +# ============================================================================= + + +class GLMNet(): + """GLMNet module. + + Objective: + - Build + `GLMNet `_ + model using optimal alpha and lambda + + Parameters + ---------- + df : pd.DataFrame + + Pandas dataframe containing `y_var` and `x_var` variables. + + y_var : List[str] + + Dependant variable. + + x_var : List[str] + + Independant variables. + + strata : pd.DataFrame, optional + + A pandas dataframe column defining the strata (the default is None). + + param : Dict, optional + + GLMNet parameters (the default is None). + In case of None, the parameters will default to:: + + seed: 1 + a_inc: 0.05 + test_perc: 0.25 + n_jobs: -1 + k_fold: 10 + + """ + + def __init__(self, + df: pd.DataFrame, + y_var: List[str], + x_var: List[str], + strata: str = None, + param: Dict = None): + """Initialize variables for module ``GLMNet``.""" + self.df = df[y_var + x_var] + self.y_var = y_var + self.x_var = x_var + self.strata = strata + self.model_summary = None + if param is None: + param = {"seed": 1, + "a_inc": 0.05, + "test_perc": 0.25, + "n_jobs": -1, + "k_fold": 10} + self.param = param + self.param["l1_range"] = list(np.round(np.arange(self.param["a_inc"], + 1.01, + self.param["a_inc"]), + 2)) + self._fit() + self._compute_metrics() + + def _fit(self) -> None: + """Fit the best GLMNet model.""" + train_x, test_x,\ + train_y, test_y = split(self.df[self.x_var], + self.df[self.y_var], + test_size=self.param["test_perc"], + random_state=self.param["seed"], + stratify=self.strata) + mod = ElasticNetCV(l1_ratio=self.param["l1_range"], + fit_intercept=True, + alphas=[1e-5, 1e-4, 1e-3, 1e-2, 1e-1, + 1.0, 10.0, 100.0], + normalize=True, + cv=self.param["k_fold"], + n_jobs=self.param["n_jobs"], + random_state=self.param["seed"]) + mod.fit(train_x, train_y.values.ravel()) + opt = {"alpha": mod.l1_ratio_, + "lambda": mod.alpha_, + "intercept": mod.intercept_, + "coef": mod.coef_, + "train_v": mod.score(train_x, train_y), + "test_v": mod.score(test_x, test_y)} + self.model = mod + self.opt = opt + + def _compute_metrics(self): + """Compute commonly used metrics to evaluate the model.""" + y = self.df[self.y_var].iloc[:, 0].values.tolist() + y_hat = list(self.predict(self.df[self.x_var])["y"].values) + model_summary = {"rsq": np.round(metrics.rsq(y, y_hat), 3), + "mae": np.round(metrics.mae(y, y_hat), 3), + "mape": np.round(metrics.mape(y, y_hat), 3), + "rmse": np.round(metrics.rmse(y, y_hat), 3)} + model_summary["mse"] = np.round(model_summary["rmse"] ** 2, 3) + self.model_summary = model_summary + + def predict(self, df_predict: pd.DataFrame) -> pd.DataFrame: + """Predict y_var/target variable. + + Parameters + ---------- + df_predict : pd.DataFrame + + Pandas dataframe containing `x_var`. + + Returns + ------- + pd.DataFrame + + Pandas dataframe containing predicted `y_var` and `x_var`. + + """ + y_hat = self.model.predict(df_predict) + df_predict = df_predict.copy() + df_predict["y"] = y_hat + return df_predict diff --git a/requirements.txt b/requirements.txt index 33253fa..ef333fe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ numpy==1.19.5 pandas==1.1.3 -scikit_learn==0.24.2 +Cython==0.29.15 +scikit_learn==1.0 diff --git a/tests/test_metrics.py b/tests/test_metrics.py new file mode 100644 index 0000000..d9b7eac --- /dev/null +++ b/tests/test_metrics.py @@ -0,0 +1,102 @@ +""" +Test suite module for ``metrics``. + +Credits +------- +:: + + Authors: + - Diptesh + + Date: Sep 07, 2021 +""" + +# pylint: disable=invalid-name +# pylint: disable=wrong-import-position + +import unittest +import warnings +import re +import sys + +from inspect import getsourcefile +from os.path import abspath + +import numpy as np + +# Set base path +path = abspath(getsourcefile(lambda: 0)) +path = re.sub(r"(.+)(\/tests.*)", "\\1", path) + +sys.path.insert(0, path) + +from mllib.lib import metrics # noqa: F841 + +# ============================================================================= +# --- User defined functions +# ============================================================================= + + +def ignore_warnings(test_func): + """Suppress deprecation warnings of pulp.""" + + def do_test(self, *args, **kwargs): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + test_func(self, *args, **kwargs) + return do_test + + +class TestMetrics(unittest.TestCase): + """Test suite for module ``metrics``.""" + + def setUp(self): + """Set up for module ``metrics``.""" + + def test_rsq(self): + """Metrics: Test for R-squared.""" + y = [3, 8, 10, 17, 24, 27] + y_hat = [2, 8, 10, 13, 18, 20] + exp_op = 0.973 + op = np.round(metrics.rsq(y, y_hat), 3) + self.assertEqual(op, exp_op) + + def test_mse(self): + """Metrics: Test for MSE.""" + y = [34, 37, 44, 47, 48, 48, 46, 43, 32, 27, 26, 24] + y_hat = [37, 40, 46, 44, 46, 50, 45, 44, 34, 30, 22, 23] + exp_op = 5.917 + op = np.round(metrics.mse(y, y_hat), 3) + self.assertEqual(op, exp_op) + + def test_rmse(self): + """Metrics: Test for RMSE.""" + y = [34, 37, 44, 47, 48, 48, 46, 43, 32, 27, 26, 24] + y_hat = [37, 40, 46, 44, 46, 50, 45, 44, 34, 30, 22, 23] + exp_op = 2.432 + op = np.round(metrics.rmse(y, y_hat), 3) + self.assertEqual(op, exp_op) + + def test_mae(self): + """Metrics: Test for MAE.""" + y = [12, 13, 14, 15, 15, 22, 27] + y_hat = [11, 13, 14, 14, 15, 16, 18] + exp_op = 2.429 + op = np.round(metrics.mae(y, y_hat), 3) + self.assertEqual(op, exp_op) + + def test_mape(self): + """Metrics: Test for MAPE.""" + y = [34, 37, 44, 47, 48, 48, 46, 43, 32, 27, 26, 24] + y_hat = [37, 40, 46, 44, 46, 50, 45, 44, 34, 30, 22, 23] + exp_op = 0.065 + op = np.round(metrics.mape(y, y_hat), 3) + self.assertEqual(op, exp_op) + + +# ============================================================================= +# --- Main +# ============================================================================= + +if __name__ == '__main__': + unittest.main() diff --git a/tests/test_model.py b/tests/test_model.py new file mode 100644 index 0000000..a73901c --- /dev/null +++ b/tests/test_model.py @@ -0,0 +1,95 @@ +""" +Test suite module for ``model``. + +Credits +------- +:: + + Authors: + - Diptesh + + Date: Sep 07, 2021 +""" + +# pylint: disable=invalid-name +# pylint: disable=wrong-import-position + +import unittest +import warnings +import re +import sys + +from inspect import getsourcefile +from os.path import abspath + +import pandas as pd +import numpy as np + +# Set base path +path = abspath(getsourcefile(lambda: 0)) +path = re.sub(r"(.+)(\/tests.*)", "\\1", path) + +sys.path.insert(0, path) + +from mllib.lib.model import GLMNet # noqa: F841 + +# ============================================================================= +# --- DO NOT CHANGE ANYTHING FROM HERE +# ============================================================================= + +path = path + "/data/input/" + +# ============================================================================= +# --- User defined functions +# ============================================================================= + + +def ignore_warnings(test_func): + """Suppress deprecation warnings.""" + + def do_test(self, *args, **kwargs): + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + test_func(self, *args, **kwargs) + return do_test + + +class TestGLMNet(unittest.TestCase): + """Test suite for module ``GLMNet``.""" + + def setUp(self): + """Set up for module ``GLMNet``.""" + + def test_known_equation(self): + """GLMNet: Test a known equation.""" + df_ip = pd.read_csv(path + "test_glmnet.csv") + mod = GLMNet(df=df_ip, + y_var=["y"], + x_var=["x1", "x2", "x3"]) + op = mod.opt + self.assertEqual(np.round(op.get('intercept'), 0), 100.0) + self.assertEqual(np.round(op.get('coef')[0], 0), 2.0) + self.assertEqual(np.round(op.get('coef')[1], 0), 3.0) + self.assertEqual(np.round(op.get('coef')[2], 0), 0.0) + + def test_predict_target_variable(self): + """GLMNet: Test to predict a target variable.""" + df_ip = pd.read_csv(path + "test_glmnet.csv") + mod = GLMNet(df=df_ip, + y_var=["y"], + x_var=["x1", "x2", "x3"]) + df_predict = pd.DataFrame({"x1": [10, 20], + "x2": [5, 10], + "x3": [100, 0]}) + op = mod.predict(df_predict) + op = np.round(np.array(op["y"]), 1) + exp_op = np.array([135.0, 170.0]) + self.assertEqual((op == exp_op).all(), True) + + +# ============================================================================= +# --- Main +# ============================================================================= + +if __name__ == '__main__': + unittest.main()