Formula Rules and Transform Instructions

Formula Rules

How to Create a Custom Formula for Synthetic Data:

  1. Referencing Columns: Use column_# to reference columns (e.g., column_1, column_2).
  2. Basic Operations: Supported operators: +, -, *, /, ^ (for power).
  3. Math Functions: Use log(), exp(), sqrt(), abs(), sin(), cos(), tan(), etc.
  4. Random Numbers:
    • random(): Generate numbers between 0 and 1.
    • random(min, max): Generate numbers within a range (e.g., random(0, 10)).
  5. Cumulative Sum:
    • cumsum(column_#): Compute the cumulative sum of the values in the specified column.
  6. Differences:
    • diff(column_#): Compute the differences between consecutive values in the specified column, with the first value set to 0.
  7. Conditional Logic: Use if(condition, value_if_true, value_if_false).
    • Example: if(column_1 >= 2000, 1, 0)
    • Example: if(column_1 == nan, 1, 0)
  8. Constants: Include numeric values directly (e.g., 42, 3.14).
  9. NaN Values: Undefined values or empty cells are replaced with -0.9999.
  10. Dynamic Column Naming: When generating synthetic data, a new column is created using the provided property name. If the provided property name already exist in the table as a column, it will replace that column.

Examples:

Transform Instructions