Skip to main content

First Prediction Time (FPT) for bearings vibration data

A Python Library for FPT detection in rotating machinery bearings. Provides a modular, dataset pipeline for loading raw vibration signals, computing an indicator (currently only Root Mean Square RMS), detecting the beginning of the degradation stage, extracting features, and saving the features and vibration in NPY files. Inspired by the FPT proposed in Physics guided neural network: Remaining useful life prediction of rolling bearings using long short-term memory network through dynamic weighting of degradation process.


Features

  • Dataset-pipeline: supports PRONOSTIA and XJTU datasets; can be extended with different case studies
  • Pluggable components: Swapping detectors (default three sigma interval), smoothers (default no smoothing), indicators (default RMS), and reporters via Protocols
  • Three-sigma FPT detection: Degradation detection with configurable sensitivity. The number of standard deviations for the interval bounds and the consecutive samples that needs to exceed the bounds before the FPT is declared are configurable.
  • Feature extraction: time domain (RMS, peak, std, Square Root Amplitude) and frequency-domain (P7, P8) features.
  • Storage: Saves features and vibration signals as .npy files for ML workflows.
  • TOML-based configuration: dataset configs for PRONOSTIA and XJTU ship with the package. Can be overridden with your own file.

Installations

pip install fpt-bearings

Quick Start

from pathlib import Path
from fpt_bearings.loaders import PronostiaLoader
from fpt_bearings.indicators import RMS
from fpt_bearings.detector import ThreeSigmaDetector
from fpt_bearings.features import FeatureExtractor, default_features
from fpt_bearings.smoothing import ExponentialSmoother
from fpt_bearings.storage import NpyArtifactStore
from fpt_bearings.report import TextReporter
from fpt_bearings.pipeline import FPTPipeline

loader = PronostiaLoader()

pipeline = FPTPipeline(
    loader=loader,
    indicator=RMS(),
    detector=ThreeSigmaDetector(k=3.0, consecutive=3),
    extractor=FeatureExtractor(default_features(loader.sample_freq)),
    store=NpyArtifactStore(Path("output/pronostia")),
    reporter=TextReporter(Path("output/pronostia/report.txt"), title="PRONOSTIA"),
    smoother=ExponentialSmoother(alpha=0.5),
)

pipeline.run(Path("/data/PRONOSTIA/Test_set"))

FPT overview

Raw vibration files
       │
       ▼
   BearingLoader        ← PronostiaLoader / XjtuLoader / custom
       │
       ▼
    Smoother            ← ExponentialSmoother / NoSmoother / custom
       │
       ▼
  HealthIndicator       ← RMS / custom
       │
       ▼
   FPTDetector          ← ThreeSigmaDetector / custom
       │
    ┌──┴──────────────┐
    ▼                 ▼
FeatureExtractor   ArtifactStore    ← features + vibration saved as .npy                      │
                      ▼
                   Reporter         ← TextReporter / custom

Classes

Loaders

** Dataset config shipped with package**:

Class Dataset Config
PronostiaLoader FEMTO / PRONOSTIA pronostia.toml
XjtuLoader XJTU-SY xjtu.toml

Load an external config

loader = PronostiaLoader.from_config(Path("my_config.toml"))

Example of config format (TOML):

minutes_per_sample = 10.0
sample_freq = 25600.0

[healthy_points]
bearing1_1 = 5
bearing1_2 = 8

Smoother

smoother = ExponentialSmoother(alpha=0.3)  # lower alpha = smoother
smoother = NoSmoother()                    # pass-through (default)

Health Indicator

indicator = RMS()

Detector

detector = ThreeSigmaDetector(k=3.0, consecutive=3)
fpt_index, found = detector.detect(indicator_series, healthy_point=10)

Feature Extractor

extractor = FeatureExtractor(default_features(sample_freq=25600.0))
features_df = extractor.extract(list_of_signals)

Artifact Store

store = NpyArtifactStore(Path("output/pronostia"))

Reporter

reporter = TextReporter(Path("output/report.txt"), title="PRONOSTIA")

Metadata

Release files for fpt-bearings 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fpt-bearings 0.1.0
File Size Uploaded Provenance Actions
fpt_bearings-0.1.0.tar.gz 50.9 kB With provenance Details for fpt_bearings-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fpt-bearings 0.1.0
File Interpreter ABI Platform Actions
fpt_bearings-0.1.0-py3-none-any.whl Python 3 none any Details for fpt_bearings-0.1.0-py3-none-any.whl

Total release size: 88.8 kB

Release files / fpt_bearings-0.1.0.tar.gz

Download URL fpt_bearings-0.1.0.tar.gz
Size 50.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f6541387e0a0117cbe274d543df8ccfc854deaf7147bf60979e89963a88de859
BLAKE2b-256 checksum
How to use checksums
f116e4d92152b2c2300d51ee0a3d0f9124be1d0b9f63f75bf0c2505b81e52442
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 7, 2026.

Transparency log

Release files / fpt_bearings-0.1.0-py3-none-any.whl

Download URL fpt_bearings-0.1.0-py3-none-any.whl
Size 37.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7d5ce3c5b0b62324b24338fc05a8e65bec23dbfc9a62b9b5fe68f334df37027
BLAKE2b-256 checksum
How to use checksums
cfe00bdb8cd71845827caf1fda386a49ac7bafbf2acdf779c674fd98dfccd93d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 7, 2026.

Transparency log

Security for fpt-bearings 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fpt_bearings-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page