Skip to content

FinalRep/ris-go

Repository files navigation

CI Status Built with Mage

ris-go – Relative Index for Streetlifting

ris-go is a Go library for calculating the Relative Index for Streetlifting (RIS). The library allows the calculation of the RIS value based on individual strength levels and body weight, and it provides a method for determining the parameters of the underlying mathematical model based on real sports data.

This project was initially created by Waris Radji and Mathieu Ardoin as part of a bachelor's thesis with the goal of making performance evaluation methods in strength sports comparable and adaptable.


Background

The RIS is a relative scoring system specifically for the sport of Streetlifting. It is designed to make athletes of different weight classes comparable by normalizing total performance.

Formula

$$ \text{RIS} = \frac{\text{Total} \times 100}{A + \frac{K - A}{1 + Q \cdot e^{-B \cdot (\text{BW} - v)}}} $$

Parameters:

  • Total: Total performance (e.g., sum of Weighted Pull-Up and Weighted Dip)
  • BW: Body weight
  • A, K, Q, B, v: Parameters that are optimized through fitting to real data

Features

  • Calculation of the RIS value with given parameters
  • Fitting of RIS parameters to performance data via nonlinear optimization
  • Importing and processing CSV data
  • Modular architecture in Go

Quick Start

Prerequisites

  • Go ≥ 1.24
  • gonum for mathematical optimization

Installation

go get github.com/finalrep/ris-go/lib

(Optional) Python setup

only needed if you want to use FitRISParamsScipy

python3 -m venv .venv  # Creation of a virtualenv is recommanded
source .venv/bin/activate
pip install -r requirements.txt

Usage

We recommend to use FitRISParamsNelder which uses NelderMead for fitting optimization. The original implementation can be used by using FitRISParamsScipy but needs extra setup for python.

Example

  • see our example implementation
  • The following plots use the 2023 data and our example to create a fitting for both male and female athletes

data plot male data plot female

Development and Contribution

pre-commit hook

This project uses pre-commit. Install pre-commit and run•

pre-commit install

Using mage

Install Mage by

go install github.com/magefile/mage@latest
mage -init

# outputs all possible usage options
mage

Testing

Run mage test:run to test the code and mage test:cover to see test coverage

About

Relative Index for Streetlifting calculation library written in go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors