50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

dbnR (version 0.7.8)

one_hot: One hot encoder for natural numbers without the 0.

Description

Given a natural number, return the natural number equivalent to its one-hot encoding. Examples: 3 -> 100 -> 4, 5 -> 10000 -> 16

Usage

one_hot(nat)

Value

the converted number

Arguments

nat

the natural number to convert