random

getml.data.columns.random(seed: int = 5849) FloatColumnView[source]

Create random column.

The numbers will uniformly distributed from 0.0 to 1.0. This can be used to randomly split a population table into a training and a test set

Args:
seed (int):

Seed used for the random number generator.

Returns:
FloatColumnView:

FloatColumn containing random numbers

Example:

population = getml.DataFrame('population')
population.add(numpy.zeros(100), 'column_01')

idx = random(seed=42)
population_train = population[idx > 0.7]
population_test = population[idx <= 0.7]