Transform

The process of taking an original value and input variables and derive a target feature ready for analytic processing

Log Transform

Log transformation is a data transformation method in which it replaces each variable x with a log(x) where x is a positive number and greater than zero

AttributeDescriptionTypeRequired

source field

The column to perform the calculation upon

Double

Example

features:
  compute:
    log_spend:
      function:
        log transform:
          source field: spend

Day of Week Transform

Provide the day of week from the passed date object to a number between 1 and 7, where start of week is Monday(1).

Supported date objects:

  • java.time.LocalDate

  • java.sql.Date

  • org.joda.time.DateTime

Attributes

AttributeDescriptionTypeRequired

source field

The column to perform the calculation upon

Double

Example

features:
  compute:
    day_of_week:
      function:
        day-of-week transform:
          source field: date

Day Binning

Categorise a day into one of two categories where a weekday (Mon-Fri) is assigned as 1 and 2 for (Sat-Sun)

Attributes

AttributeDescriptionTypeRequired

source field

The column to perform the calculation upon

Double

Example

features:
  compute:
    day_bin:
      function:
        day binning:
          source field: date

Age Binning

Categorise a passed age value, either an integer or date object, in to a pre-configured age bin.

Attributes

AttributeDescriptionTypeRequired

bins

Array of age bins to use. Default bins are set to 0-9, 10-19,...110-119.

Int[][]

as date

Passed event field is a supported date object.

Supported Data classes

  • java.time.LocalDate

  • java.sql.Date

Boolean

Default: false

base date

Provide a date which is used to calculate the age. Default set to the date process is started

String

Format: YYYY-MM-DD

source field

The column to perform the calculation upon

Double

Example

features:
  compute:
      age_bin:
        function:
          age binning:
            bins: [ [0,18], [19,21], [22, 40], [41, 55], [56,76]]
            base date: 2023-01-01
            source field: current_age

Last updated