scikitplot.cexperimental#

C-Experimental modules for Scikit-Plots.

This package contains high-performance functions implemented in C, C++, and Cython, exposed to Python via Cython and Pybind11 bindings. These utilities are intended for experimental and performance-critical use cases.

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.

_cy_cexperimental.expit

Compute the sigmoid (expit) of a scalar input.

_cy_cexperimental.log_expit

Compute the natural logarithm of the sigmoid (expit) of a scalar input.

_cy_cexperimental.logit

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_cexperimental.py_print

py_print(message: str = 'Hello, from Pybind11 C++!') -> None

Python samples#

User guide. See the C-Experimental (experimental) section for further details.

_logsumexp.sigmoid

Compute the sigmoid function for the input array x.

_logsumexp.softmax

Compute the softmax function.

_logsumexp.logsumexp

Compute the log of the sum of exponentials of input elements.

_logsumexp.log_softmax

Compute the logarithm of the softmax function.