winning_chances: Calculate winning chances

View source: R/rbitr_helpers.R

winning_chancesR Documentation

Calculate winning chances

Description

Applies the scaling function 2 / (1 + exp(-0.004 * scores)) - 1 to the scores parameter.

Usage

winning_chances(scores)

inv_winning_chances(scaled_scores)

Arguments

scores

A numeric vector of chess engine evaluations.

scaled_scores

A numeric vector of scaled chess engine evaluations.

Details

The function winning_chances() applies the exponential scaling function 2 / (1 + exp(-0.004 * scores)) - 1 to the scores parameter. The inverse function inv_winning_chances() reverses the transformation.

The scaling function is borrowed from lichess

Value

A numeric vector of winning chances.


dryguy/rbitr documentation built on Oct. 15, 2024, 6:18 a.m.