semvec/pypi-packages huggingface dataset:
modstablib 0.1.2
A library for evaluating and improving model stability.
Requires Python: >=3.8

[![PyPi](https://img.shields.io/pypi/v/modstablib)](https://pypi.org/project/modstablib/)
[![GitHub issues](https://img.shields.io/badge/issue_tracking-github-blue.svg)](https://github.com/faridrodriguez/model-stability/issues)
![model-stability logo](https://res.cloudinary.com/djk43drcj/image/upload/v1750236449/modstablib-logo.svg)

Tools for stable ML models.

## Installation

Install via pip:

```bash
pip install modstablib
```

## Usage

The main function provided is `stability_index`, which evaluates the stability of a sequence of metric values (e.g., accuracy over time or epochs).

### Example

```python
from modstablib.metrics._performance import stability_index

# Example: accuracy values over epochs
metric_vector = [0.85, 0.86, 0.84, 0.83, 0.82]

score = stability_index(metric_vector)
print(f"Stability index: {score}")
```

#### Parameters
- `metric_vector`: Sequence (list, numpy array, etc.) of metric values to evaluate stability.
- `falling_rate_weight`: (optional, default=12) Weight for penalizing negative trend (slope).
- `variability_weight`: (optional, default=0.5) Weight for penalizing variability (standard deviation of residuals).

#### Returns
- A float: Higher values indicate greater stability (less decrease and less variability).

## License
MIT

## Issues
For questions or issues, please use the [GitHub issue tracker](https://github.com/faridrodriguez/model-stability/issues).
pyiges 0.3.2
Pythonic IGES reader
Requires Python: >=3.9
Keywords: iges, cad, nurbs, bspline

########
 pyIGES
########

Python IGES reader with basic functionality to read an IGES file and
convert some entities to a ``pyvista`` or ``vtk`` mesh.

This module can read in and perform basic parsing of all entities and
can perform additional parsing and geometry visualization of the
following entities:

-  Vertex List (Type 502 Form 1)
-  Edge List
-  Loop (for specifying a bounded face for BREP geometries
-  Face
-  Circular arc
-  Rational B-Spline Surface
-  Rational B-Spline Curve
-  Conic Arc (Type 104)
-  Line
-  Point

**************
 Installation
**************

``pyiges`` is offered in a "full" variant including the conversion
features and a "pure" parsing module variant. The pure variant has no
conversion features, no dependencies to ``pyvista,geomdl``, and can be
installed by removing the ``[full]`` specificator from the following
commands.

Install with pip using:

.. code::

   pip install pyiges[full]

Otherwise, if you want the bleeding edge version, feel free to clone
this repo and install with:

.. code:: bash

   git clone https://github.com/pyvista/pyiges
   cd pyiges
   pip install .[full]

Note that the square brackets might need to be escaped or quoted when
using ``zsh``.

*******
 Usage
*******

The ``pyiges`` module can read in many entities as raw text, but only
NURBS surfaces and bsplines can be converted to ``pyvista`` meshes.

.. code:: python

   import pyiges
   from pyiges import examples

   # load an example impeller
   iges = pyiges.read(examples.impeller)

   # print an invidiual entity (boring)
   print(iges[0])

   # convert all lines to a vtk mesh and plot it
   lines = iges.to_vtk(bsplines=True, surfaces=False, merge=True)
   lines.plot(color='w', line_width=2)

   # convert all surfaces to a vtk mesh and plot it
   mesh = iges.to_vtk(bsplines=False, surfaces=True, merge=True, delta=0.05)
   mesh.plot(color='w', smooth_shading=True)
   # control resolution of the mesh by changing "delta"

   # save this surface to file
   mesh.save('mesh.ply')  # as ply
   mesh.save('mesh.stl')  # as stl
   mesh.save('mesh.vtk')  # as vtk

Lines
=====

.. image:: https://github.com/pyvista/pyiges/raw/main/docs/images/impeller_lines.png

Surfaces
========

.. image:: https://github.com/pyvista/pyiges/raw/main/docs/images/impeller_surf.png

*****************
 Acknowledgments
*****************

Substantial code was obtained from or inspired by
https://github.com/cfinch/IGES-File-Reader

IGES reference definitions were obtained from `Eclipse IGES Wiki
<https://wiki.eclipse.org/IGES_file_Specification#Rational_B-Spline_Curve_.28Type_126.29>`_,