npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

riskfix

v0.2.4

Published

This is a *React component library* that provides reusable UI components for building web applications.

Readme

RiskFix: A Modular Package for Visual-Interactive Validation of Risk-Prediction Machine Learning Models

This is a React component library that provides reusable UI components for building web applications.

Installation

You can install this library via NPM by running the following command:

npm install riskfix

Usage

To use this component library in your project, you can import individual components like so:

import { PreBias } from "riskfix"

function MyComponent() {
	const [count, setCount] = useState(0)
	return (<PreBias setPrebiasValue={setCount} />);
}

Available Components

PreBias: A pre-bias component

  • setPrebiasValue: (value: number) => void;

QRReader: A QR code reader component

  • bedside_info: string;
    • A string representing the information about the bedside monitoring device.
  • bedside_devices: string | null;
    • A string or null value representing the list of devices connected to the bedside monitoring system.
  • setBedsideDevices: React.Dispatch<React.SetStateAction<string | null>>;
    • A React state hook function that takes a string or null value and sets the bedside devices.
  • setBedsideInfo: React.Dispatch<React.SetStateAction>;
    • A React state hook function that takes a string value and sets the bedside info.
  • handleScan: (data: any) => void;
    • A function that takes a data object as an argument and is called when a QR code is successfully scanned.
  • handleError: (err: any) => void;
    • A function that takes an error object as an argument and is called when there is an error with the QR code scan.

PredictionTimeline: A prediction timeline component to show model validated results.

  • prebiasValue: number | undefined;
    • An optional number value representing the pre-bias value for the risk prediction model.
  • bedsideDevices: string | null;
    • A string or null value representing the list of devices connected to the bedside monitoring system.
  • bedsideInfo: string;
    • A string value representing the information about the bedside monitoring device.
  • user: { email: string } | undefined;
    • An optional object with an email property representing the user information.
  • recordValidation: (val: IValidation) => Promise<number | undefined>
    • A function that takes a validation object as an argument and returns a promise that resolves to a number or undefined value.
  • fetchAnnotation: (user: string, devid: number, start_time: number, end_time: number) => Promise
    • A function that takes user, devid, start_time, and end_time as arguments and returns a promise that resolves to an annotation object.
  • recordAnnotation: (val: IRecordAnnotation) => Promise<number | undefined>
    • A function that takes an annotation object as an argument and returns a promise that resolves to a number or undefined value.
  • fetchPrediction: (devid: number, limit: number, start_time: number, end_time: number) => Promise
    • A function that takes devid, limit, start_time, and end_time as arguments and returns a promise that resolves to a prediction scores object.
  • fetchValidation: (user: string, devid: number, start_time: number, end_time: number) => Promise
    • A function that takes user, devid, start_time, and end_time as arguments and returns a promise that resolves to a validated scores object.

Timeline: The timeline visualization component used within the PredictionTimeline component.

  • devid: number;
    • A number value representing the ID of the monitoring device.
  • prebias: number;
    • A number value representing the pre-bias value for the risk prediction model.
  • modelPause: boolean;
    • A boolean value indicating whether the model is paused or not.
  • user: string;
    • A string value representing the user information.
  • fetchInterval
    • The time of the interval between points, in milliseconds. An example value would be: 30000 for 30 second intervals.
  • timeWindow
    • The size of display window in terms of time, in milliseconds. For example, if we wanted to show the last 5 mins. we would put in: (5 * 60 * 1000).
  • rollbackTime
    • If a time rollback is required from the latest set of points, use this to start after a certain number of milliseconds before the current time within the model values.
  • fetchPrediction: (devid: number, limit: number, start_time: number, end_time: number) => Promise
    • A function that takes devid, limit, start_time, and end_time as arguments and returns a promise that resolves to a prediction scores object.
  • fetchValidation: (user: string, devid: number, start_time: number, end_time: number) => Promise
    • A function that takes user, devid, start_time, and end_time as arguments and returns a promise that resolves to a validated scores object.
  • recordValidation: (val: IValidation) => Promise<number | undefined>
    • A function that takes a validation object as an argument and returns a promise that resolves to a number or undefined value.

Contributing

To contribute to this project, please follow these steps:

Fork the repo Create a new branch (git checkout -b my-new-feature) Make changes and commit (git commit -am 'Add some feature') Push to the branch (git push origin my-new-feature) Create a new pull request

License

This project is licensed under the MIT License. See the LICENSE file for more details.