Expand description
Common functionality for linear model Python bindings
This module contains shared imports, types, and utilities used across all linear model implementations.
Macros§
- wrap_
pyfunction - Wraps a Rust function annotated with
#[pyfunction].
Structs§
- Borrowed
- A borrowed equivalent to
Bound. - Bound
- A Python thread-attached equivalent to
Py<T>. - Performance
Stats - Performance monitoring structure
- Py
- A reference to an object allocated on the Python heap.
- PyAny
- Represents any Python object.
- PyClass
Initializer - Initializer for our
#[pyclass]system. - PyErr
- Represents a Python exception.
- PyModule
- Represents a Python
moduleobject. - PyRef
- A wrapper type for an immutably borrowed value from a
Bound<'py, T>. - PyRef
Mut - A wrapper type for a mutably borrowed value from a
Bound<'py, T>. - PyValue
Error - Represents Python’s
ValueErrorexception. - Python
- A marker token that represents holding the GIL.
Enums§
- Sklears
Python Error - Enhanced error handling for sklears-python
Traits§
- From
PyObject - Extract a type from a Python object.
- From
PyObject Owned - A data structure that can be extracted without borrowing any data from the input.
- Into
PyObject - Defines a conversion from a Rust type to a Python object, which may fail.
- PyAny
Methods - This trait represents the Python APIs which are usable on all Python objects.
- PyBool
Methods - Implementation of functionality for
PyBool. - PyByte
Array Methods - Implementation of functionality for
PyByteArray. - PyBytes
Methods - Implementation of functionality for
PyBytes. - PyCapsule
Methods - Implementation of functionality for
PyCapsule. - PyComplex
Methods - Implementation of functionality for
PyComplex. - PyDict
Methods - Implementation of functionality for
PyDict. - PyFloat
Methods - Implementation of functionality for
PyFloat. - PyFrozen
SetMethods - Implementation of functionality for
PyFrozenSet. - PyList
Methods - Implementation of functionality for
PyList. - PyMapping
Methods - Implementation of functionality for
PyMapping. - PyMapping
Proxy Methods - Implementation of functionality for
PyMappingProxy. - PyModule
Methods - Implementation of functionality for
PyModule. - PySequence
Methods - Implementation of functionality for
PySequence. - PySet
Methods - Implementation of functionality for
PySet. - PySlice
Methods - Implementation of functionality for
PySlice. - PyString
Methods - Implementation of functionality for
PyString. - PyTraceback
Methods - Implementation of functionality for
PyTraceback. - PyTuple
Methods - Implementation of functionality for
PyTuple. - PyType
Methods - Implementation of functionality for
PyType. - PyWeakref
Methods - Implementation of functionality for
PyWeakref.
Functions§
- calculate_
r2_ score - Calculate R² score with optimized array operations
- check_
memory_ usage - Check memory usage and warn if arrays are very large
- core_
array1_ to_ py - Convert an ndarray Array1 into a Python-owned NumPy array object
- core_
array2_ to_ py - Convert an ndarray Array2 into a Python-owned NumPy array object
- get_
available_ memory_ mb - Get system memory information for better memory management
- pyarray_
to_ core_ array1 - Convert a read-only NumPy array view into an owned SciRS2 ndarray Array1
- pyarray_
to_ core_ array2 - Convert a read-only NumPy array view into an owned SciRS2 ndarray Array2
- validate_
finite_ values - Validate that array contains only finite values
- validate_
finite_ values_ 1d - Validate that 1D array contains only finite values
- validate_
fit_ arrays - Validate input arrays for model fitting
- validate_
fit_ arrays_ enhanced - Enhanced validation functions with better error handling
- validate_
predict_ array - Validate input arrays for prediction
Type Aliases§
- Array1
- one-dimensional array
- Array2
- two-dimensional array
- Linear
Model Result - Common error type for linear model operations
- PyArray1
- One-dimensional array.
- PyArray2
- Two-dimensional array.
- PyReadonly
Array1 - Read-only borrow of a one-dimensional array.
- PyReadonly
Array2 - Read-only borrow of a two-dimensional array.
- PyResult
- Represents the result of a Python call.
Attribute Macros§
- pyclass
- pyfunction
- A proc macro used to expose Rust functions to Python.
- pymethods
- A proc macro used to expose methods to Python.
- pymodule
- A proc macro used to implement Python modules.