NumericVectorOrArrayRole

class sparklightautoml.dataset.roles.NumericVectorOrArrayRole(size, element_col_name_template, dtype=numpy.float32, force_input=False, prob=False, discretization=False, is_vector=True)[source]

Bases: NumericRole

Role that describe numeric vector or numeric array.

__init__(size, element_col_name_template, dtype=numpy.float32, force_input=False, prob=False, discretization=False, is_vector=True)[source]
Parameters:
  • size (int) – number of elements in every vector in this column

  • element_col_name_template (Union[str, List[str]]) – string template to produce name for each element in the vector

  • neccessary (when array-to-columns transformation is) –

  • dtype (Union[Callable, type, str]) – type of the vector’s elements

  • force_input (bool) – Select a feature for training, regardless of the selector results.

  • prob (bool) – If input number is probability.

feature_name_at(position)[source]

produces a name for feature on position in the vector

Parameters:

position (int) – position in the vector in range [0 .. size]

Return type:

str

Returns:

feature name