scikitplot.cexperimental#
C-Experimental functions and utilities by Python and Cython/Pybind11 Bindings.
This package contains cexperimental functions and utilities for use with Cython/Pybind11 Bindings and Python implementations. The functions provided here are optimized for performance and are implemented using Cython/Pybind11 Bindings to leverage its speed advantages.
This package is intended for cexperimental use. Functionality and APIs may change in future releases.
User guide. See the C-Experimental (experimental) section for further details.
Cython Bindings samples#
C-Experimental API Functions by Cython#
This module provides Cython implementations of several mathematical functions
often used in statistical and machine learning contexts,
such as the expit (sigmoid) function, its logarithm, and the logit function.
These functions are scalar and typed versions of functions commonly
found in libraries like scipy.special
.
The module leverages Cython’s fused types to handle different numeric types
(double
, float
, long double
) in a single function definition,
making the code both efficient and flexible.
User guide. See the C-Experimental (experimental) section for further details.
Compute the sigmoid (expit) of a scalar input. |
|
Compute the natural logarithm of the sigmoid (expit) of a scalar input. |
|
Compute the logit (inverse sigmoid) of a scalar input. |
Pybind11 Bindings samples#
Experimental API Python module that uses C/C++ for numerical computations. Created by Pybind11 bindings.
User guide. See the C-Experimental (experimental) section for further details.
py_print(message: str = 'Hello, from Pybind11 C++!') -> None |
Python samples#
User guide. See the C-Experimental (experimental) section for further details.
Compute the sigmoid function for the input array |
|
Compute the softmax function. |
|
Compute the log of the sum of exponentials of input elements. |
|
Compute the logarithm of the softmax function. |