A.smooth()

Description:

Perform smoothing on a sequence type variable during modeling.

Syntax:

A.smooth(T)

During modeling, perform smoothing on high-frequency categorical enumerated variable A and return a binary sequence containing the smoothing result and the smoothing records Rec

A.smooth@r(Rec)

During scoring, perform smoothing on multiclassification enumerated variable A according to Rec, the smoothing process records, and return the smoothing result

Note:

The external library function (See External Library Guide) performs smoothing on a sequence type variable during modeling.

Parameter:

A

A sequence containing high-frequency categorical enumerated variables

T

A sequence of target variable values

Rec

A sequence of smoothing process records

Option:

@c

Modify the original data to the smoothing result after execution

@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

Example:

 

A

 

1

[a,d,f,g,y,j,y,k,l,v,x,,w,t,j,c,,z,h,y,j,e,e,s,d,q,ad,gr,hy,ki,lo,ss,df,afd,ju,li,ol]

Input a sequence of high-frequency categorical variables.

2

=A1.len().(rand(100))

Generate a sequence of integers of same length as A1.

3

=A1.setenum@c()

Map A1 as integers and modify the original data.

4

=A1.smooth(A2)

Take A2 as the target variable, perform smoothing on A1, and return smoothing result and smoothing process records Rec.

5

=A1.smooth@r(A3(2))

Perform smoothing on A1 according to A3’s smoothing process records; often used to smooth the score data.