ONNX Model Zoo

0xroba/piggyback

By 0xroba · ↓ 0 · ♥ 1 · Updated 2025-04-26

What's in this repo

This page lists the files in 0xroba/piggyback, including xgb_model.onnx.

  • 1 ONNX models (.onnx files)
  • 15 files, including 5 .py, 3 .pyc, 3 .json, 1 .md, 1 .onnx, 1 .txt
  • Last updated 2025-04-26

ONNX files

File Size Download
models/xgb_model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Token Price Growth Prediction Model

Model Description

This model predicts the maximum price growth potential of crypto tokens over a 15-minute window. It uses XGBoost (converted to ONNX format) trained on historical token metrics data to predict potential short-term price movements.

Use Cases

  • Price movement anticipation for trading strategies
  • Risk assessment for token investments
  • Liquidity analysis in token markets

Model Details

  • Model Type: XGBoost (converted to ONNX for deployment)
  • Training Algorithm: Gradient boosting with Huber loss (reg:pseudohubererror)
  • Target: Maximum price growth percentage within a 15-minute window
  • Input Features: Various token metrics including price, volume, transaction counts, and velocity indicators
  • Preprocessing: StandardScaler normalization and log-transformation of target values

Limitations

  • The model predicts potential maximum growth, not guaranteed outcomes
  • Performance depends on market conditions similar to those in the training data
  • Not suited for long-term price predictions
  • Does not account for external market events or news

Usage Example

import numpy as np
import onnxruntime as ort
import json
import pandas as pd

# Load model and scaler
model = ort.InferenceSession("models/xgb_model.onnx")
with open("models/scaler_stats.json", "r") as f:
    scaler_data = json.load(f)

# Function to preprocess input data
def preprocess(data, scaler_data):
    # Convert to numpy array
    data_np = np.array(data, dtype=np.float32)

    # Apply scaling using the saved scaler parameters
    scaled_data = (data_np - scaler_data["mean"]) / scaler_data["scale"]

    return scaled_data.astype(np.float32)

# Function to make predictions
def predict(features, model, scaler_data):
    # Preprocess
    processed_features = preprocess(features, scaler_data)

    # Get input name
    input_name = model.get_inputs()[0].name

    # Run inference
    pred_log = model.run(None, {input_name: processed_features.reshape(1, -1)})[0]

    # Convert log prediction back to percentage
    pred_pct = np.expm1(pred_log) * 100.0

    return pred_pct[0][0]  # Return as scalar

# Example usage
features = [...]  # Array of features matching the model's expected input
prediction = predict(features, model, scaler_data)
print(f"Predicted max price growth: {prediction:.2f}%")

Model info

onnx endpoints_compatible region:us
↓ 0 ♥ 1

Created: 2025-04-23

Updated: 2025-04-26

View on Hugging Face

Files (15)

.gitattributes
README.md
__init__.py
__pycache__/__init__.cpython-313.pyc
__pycache__/connection.cpython-313.pyc
__pycache__/data_utils.cpython-313.pyc
connection.py
data_utils.py
handler.py
inference.py
models/best_params.json
models/scaler_stats.json
models/xgb_huber_model.json
models/xgb_model.onnx ONNX
requirements.txt

Related models