Example: EXECUTE FUNCTION with INPUT_FMT
EXECUTE FUNCTION
INTO VOLATILE ART(tmpTable)
TD_MATRIXMULTIPLY(
MATRIX_SPEC(
TABLE_NAME(m1),
ROW_AXIS(SEQUENCE(r)),
COLUMN_AXIS(SEQUENCE(c)),
MATRIX_ID(id),
PAYLOAD( FIELDS(v),CONTENT(REAL))
),
MATRIX_SPEC(
TABLE_NAME(m2),
ROW_AXIS(SEQUENCE(r)),
COLUMN_AXIS(SEQUENCE(c)),
MATRIX_ID(id),
PAYLOAD( FIELDS(v),CONTENT(REAL))
) where id = 1,
INPUT_FMT(INPUT_MODE(MANY2ONE))
);
Example: Auto-correction and Auto-covariance
EXECUTE FUNCTION INTO VOLATILE ART(ACF_RESULTS)
TD_ACF(
SERIES_SPEC(
TABLE_NAME(OCEAN_BUOYS),
ROW_AXIS(TIMECODE(TD_TIMECODE)),
SERIES_ID(Ocean_Name,BuoyID),
PAYLOAD(FIELDS(JsonCol.Measure.Salinity), CONTENT(REAL))
),
FUNC_PARAMS(
MAXLAGS(2500),
FUNC_TYPE(0),
UNBIASED(0),
DEMEAN(1),
QSTAT(1),
ALPHA(1)
)
);
Example: Map Plot
EXECUTE FUNCTION
TD_Plot
(
SERIES_SPEC
(
TABLE_NAME(ACFDemo),
ROW_AXIS(SEQUENCE(ROW_I)),
SERIES_ID(BuoyID),
PAYLOAD
(FIELDS
(Magnitude, CONF_OFF_Magnitude),CONTENT(MULTIVAR_REAL)
)
)
WHERE BuoyID IN (8),
FUNC_PARAMS
(
PLOTS[(TYPE('corr') ,LEGEND('best'))],
IMAGE('png')
)
);
Example: Linear Regression
EXECUTE FUNCTION INTO VOLATILE ART(LR_RESULTS)
TD_LINEAR_REGR(
SERIES_SPEC(
TABLE_NAME(HOUSE_VALUES),
SERIES_ID(CITYID),
ROW_AXIS(TIMECODE(TD_TIMECODE)
),
PAYLOAD(FIELDS(HOUSE_VAL, SALARY),CONTENT(MULTIVAR_REAL))) WHERE CITYID=33,
FUNC_PARAMS(
FORMULA('Y = B0 + B1*X1'),
WEIGHTS(0),
ALGORITHM('QR'),
COEFF_STATS(1),
VARIABLES_COUNT(2),
MODEL_STATS(1),
RESIDUALS(1))
);