nick-leland/RD2L_Random_Forest
By nick-leland · ↓ 0 · ♥ 0 · Updated 2025-01-09
What's in this repo
This page lists the files in nick-leland/RD2L_Random_Forest, including rd2l_forest.onnx.
- 1 ONNX models (.onnx files)
- 3 files, including 1 .md, 1 .onnx
- Last updated 2025-01-09
ONNX files
| File | Size | Download |
|---|---|---|
| rd2l_forest.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
tags:
- tabular
- regression
- tabular-regression
- dota
Validation Metrics
- Accuracy: 0.8284240188362744
- R2: 0.63
- MSE: 2428.91
- MAE: 34.33
- RMSE: 49.28
Usage
import numpy as np
from numpy import random
import pandas as pd
import onnxruntime as ort
# Load the saved file
model_path = "rd2l_forest.onnx"
session = ort.InferenceSession(model_path)
# Define default naming scheme
input_name = session.get_inputs()[0].name
output_name = session.get_outputs()[0].name
def prediction(input_data : np.ndarray) -> float
"""
Performs inference on the loaded ONNX model using the provided input data.
Args:
input_data (np.ndarray): An array of size (263,), this represents all of a singular players information
Returns:
float: The predicted cost of the player
"""
# Convert to onnx input format and reshape
input_data = input_data.to_numpy(dtype=np.float32).reshape(1, -1)
# Create prediction
predictions = session.run([output_name], {input_name: input_data})
# Convert to individual value
return round(float(predictions[0][0][0]), 2)
sample_df = pd.DataFrame(np.random.rand(263))
prediction(sample_df)
license: mit
Model info
onnx
tabular
regression
tabular-regression
dota
region:us
↓ 0
♥ 0
Created: 2025-01-05
Updated: 2025-01-09
View on Hugging FaceFiles (3)
.gitattributes
README.md
rd2l_forest.onnx
ONNX
Related models
More from nick-leland
No other models by this author.