A.dateinterval()

Description:

Generate multiple date difference variables for a datetime sequence/table sequence variable.

Syntax:

A.dateinterval(T)

During modeling, generate multiple date difference variables for a sequence of datetime variables and return a binary sequence where the first bit is a table sequence made up of all the derivative variables and the second bit is generation process records Rec; the derivative variables automatically perform subsequent pre-processing

A.dateinterval@r(Rec)

During scoring, generate a table sequence consisting of multiple date difference variables according to sequence A of datetime variables and generation process records Rec

Note:

External library function (See External Library Guide).

It generates multiple date difference variables for datetime sequence/table sequence variable A.

Parameter:

A

A sequence, which is a datetime variable

T

The target variable value used to perform potential data smoothing

Rec

A sequence of generation process records

Option:

@bnie

Each option specifies a target type, and options are mutual-exclusive; automatically judge the type when no option is used; the order of priorities of the options is binary, numeric, integer and enumerated

Return value:

Sequence/Table sequence

Example:

 

A

 

1

=T("catering_sale.csv").run(date1=date(date1,"yyyy/MM/dd"),date2=date(date2,"yyyy/MM/dd"))

 

2

=[A1.(date1),A1.(date2)]

A sequence of datetime variables.

3

=A1.(sales)

The target variable.

4

=A2.dateinterval@n(A3)

A4(1) A table sequence of derivative variables;

A4(2) Generation process records Rec.

@n specifies the target variable as numeric.

5

=A2.dateinterval@r(A4(2))

Generate date difference variables for A2 according to A4’s generation process records Rec.