Menu

ConvertDoubleToInt

KKozlov

Last modified 2 years ago

Finding Integer Valued Parameters with DEEP

DEEP method operates on floating point parameters. On the other hand many real problems are formulated so that the parameters are integer numbers, e.g. indices of some sort.

Conversion by sorting

The following procedure is used to produce the integer vector of parameters from the floating point vector constructed by DEEP method.

  1. The values are sorted in ascending order.
  2. The index of the parameter in the floating point array becomes the value of the parameter in the integer array.

Floating point array;

a[0] = 0.3
a[1] = 0.5
a[2] = 0.1
a[3] = 0.8

Sorted array:

b[0] = a[2] = 0.1
b[1] = a[0] = 0.3
b[2] = a[1] = 0.5
b[3] = a[3] = 0.8

Integer array:

i[0] = 2
i[1] = 0
i[2] = 1
i[3] = 3

Conversion by special rounding

Taken from Uher et al., 2016

x_int = (1+999*x_double)/500

Related

Wiki: ExternalModelParameters
Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.