scale_move_times: Scale move times

View source: R/rbitr_helpers.R

scale_move_timesR Documentation

Scale move times

Description

Applies the scaling function log(0.005 * move_times + 3)^2 - log(3)^2 to the move_times parameter.

Usage

scale_move_times(move_times)

inv_scale_move_times(scaled_times)

Arguments

move_times

A numeric vector of move times.

scaled_times

A numeric vector of scaled move times.

Details

The function scale_move_times() first applies a cap of 12e4, and then applies the logarithmic scaling transformation log(0.005 * move_times + 3)^2 - log(3)^2 to the move_times parameter. The inverse function inv_scale_move_times() reverses the transformation.

The scaling function is borrowed from lichess

Value

For scaled_move_times(), a numeric vector of scaled move times. For inv_scaled_move_times() a numeric vector of un-scaled move times.

Note

The inverse function cannot recover transformed values that were greater than 12e4 due to the cap applied by the initial scaling.


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