teradataml 20.0.0.0__py3-none-any.whl → 20.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of teradataml might be problematic. Click here for more details.
- teradataml/LICENSE-3RD-PARTY.pdf +0 -0
- teradataml/LICENSE.pdf +0 -0
- teradataml/README.md +183 -0
- teradataml/__init__.py +6 -3
- teradataml/_version.py +2 -2
- teradataml/analytics/__init__.py +3 -2
- teradataml/analytics/analytic_function_executor.py +275 -40
- teradataml/analytics/analytic_query_generator.py +92 -0
- teradataml/analytics/byom/__init__.py +3 -2
- teradataml/analytics/json_parser/metadata.py +1 -0
- teradataml/analytics/json_parser/utils.py +17 -21
- teradataml/analytics/meta_class.py +40 -1
- teradataml/analytics/sqle/DecisionTreePredict.py +1 -1
- teradataml/analytics/sqle/__init__.py +10 -2
- teradataml/analytics/table_operator/__init__.py +3 -2
- teradataml/analytics/uaf/__init__.py +21 -2
- teradataml/analytics/utils.py +62 -1
- teradataml/analytics/valib.py +1 -1
- teradataml/automl/__init__.py +1553 -319
- teradataml/automl/custom_json_utils.py +139 -61
- teradataml/automl/data_preparation.py +276 -319
- teradataml/automl/data_transformation.py +163 -81
- teradataml/automl/feature_engineering.py +402 -239
- teradataml/automl/feature_exploration.py +9 -2
- teradataml/automl/model_evaluation.py +48 -51
- teradataml/automl/model_training.py +291 -189
- teradataml/catalog/byom.py +8 -8
- teradataml/catalog/model_cataloging_utils.py +1 -1
- teradataml/clients/auth_client.py +133 -0
- teradataml/clients/pkce_client.py +1 -1
- teradataml/common/aed_utils.py +3 -2
- teradataml/common/constants.py +48 -6
- teradataml/common/deprecations.py +13 -7
- teradataml/common/garbagecollector.py +156 -120
- teradataml/common/messagecodes.py +6 -1
- teradataml/common/messages.py +3 -1
- teradataml/common/sqlbundle.py +1 -1
- teradataml/common/utils.py +103 -11
- teradataml/common/wrapper_utils.py +1 -1
- teradataml/context/context.py +121 -31
- teradataml/data/advertising.csv +201 -0
- teradataml/data/bank_marketing.csv +11163 -0
- teradataml/data/bike_sharing.csv +732 -0
- teradataml/data/boston2cols.csv +721 -0
- teradataml/data/breast_cancer.csv +570 -0
- teradataml/data/complaints_test_tokenized.csv +353 -0
- teradataml/data/complaints_tokens_model.csv +348 -0
- teradataml/data/covid_confirm_sd.csv +83 -0
- teradataml/data/customer_segmentation_test.csv +2628 -0
- teradataml/data/customer_segmentation_train.csv +8069 -0
- teradataml/data/dataframe_example.json +10 -0
- teradataml/data/docs/sqle/docs_17_10/OneHotEncodingFit.py +3 -1
- teradataml/data/docs/sqle/docs_17_10/OneHotEncodingTransform.py +6 -0
- teradataml/data/docs/sqle/docs_17_10/OutlierFilterTransform.py +5 -1
- teradataml/data/docs/sqle/docs_17_20/ANOVA.py +61 -1
- teradataml/data/docs/sqle/docs_17_20/CFilter.py +132 -0
- teradataml/data/docs/sqle/docs_17_20/ColumnTransformer.py +2 -0
- teradataml/data/docs/sqle/docs_17_20/FTest.py +105 -26
- teradataml/data/docs/sqle/docs_17_20/GLM.py +162 -1
- teradataml/data/docs/sqle/docs_17_20/GetFutileColumns.py +5 -3
- teradataml/data/docs/sqle/docs_17_20/KMeans.py +48 -1
- teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +162 -0
- teradataml/data/docs/sqle/docs_17_20/NonLinearCombineFit.py +3 -2
- teradataml/data/docs/sqle/docs_17_20/OneHotEncodingFit.py +5 -0
- teradataml/data/docs/sqle/docs_17_20/OneHotEncodingTransform.py +6 -0
- teradataml/data/docs/sqle/docs_17_20/OutlierFilterFit.py +2 -0
- teradataml/data/docs/sqle/docs_17_20/Pivoting.py +279 -0
- teradataml/data/docs/sqle/docs_17_20/ROC.py +3 -2
- teradataml/data/docs/sqle/docs_17_20/SVMPredict.py +13 -2
- teradataml/data/docs/sqle/docs_17_20/ScaleFit.py +119 -1
- teradataml/data/docs/sqle/docs_17_20/ScaleTransform.py +93 -1
- teradataml/data/docs/sqle/docs_17_20/Shap.py +197 -0
- teradataml/data/docs/sqle/docs_17_20/TDGLMPredict.py +163 -1
- teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +189 -0
- teradataml/data/docs/sqle/docs_17_20/TFIDF.py +142 -0
- teradataml/data/docs/sqle/docs_17_20/Unpivoting.py +216 -0
- teradataml/data/docs/sqle/docs_17_20/XGBoost.py +12 -4
- teradataml/data/docs/sqle/docs_17_20/XGBoostPredict.py +7 -1
- teradataml/data/docs/sqle/docs_17_20/ZTest.py +72 -7
- teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -10
- teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/ArimaForecast.py +35 -5
- teradataml/data/docs/uaf/docs_17_20/ArimaValidate.py +3 -1
- teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +293 -0
- teradataml/data/docs/uaf/docs_17_20/AutoArima.py +354 -0
- teradataml/data/docs/uaf/docs_17_20/BreuschGodfrey.py +3 -2
- teradataml/data/docs/uaf/docs_17_20/BreuschPaganGodfrey.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/Convolve.py +13 -10
- teradataml/data/docs/uaf/docs_17_20/Convolve2.py +4 -1
- teradataml/data/docs/uaf/docs_17_20/CumulPeriodogram.py +5 -4
- teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +4 -4
- teradataml/data/docs/uaf/docs_17_20/DWT.py +235 -0
- teradataml/data/docs/uaf/docs_17_20/DWT2D.py +214 -0
- teradataml/data/docs/uaf/docs_17_20/DurbinWatson.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/ExtractResults.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +160 -0
- teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +9 -31
- teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +4 -2
- teradataml/data/docs/uaf/docs_17_20/IDFFT2.py +1 -8
- teradataml/data/docs/uaf/docs_17_20/IDWT.py +236 -0
- teradataml/data/docs/uaf/docs_17_20/IDWT2D.py +226 -0
- teradataml/data/docs/uaf/docs_17_20/IQR.py +134 -0
- teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/MAMean.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +297 -0
- teradataml/data/docs/uaf/docs_17_20/MatrixMultiply.py +15 -6
- teradataml/data/docs/uaf/docs_17_20/PACF.py +0 -1
- teradataml/data/docs/uaf/docs_17_20/Portman.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/Resample.py +9 -1
- teradataml/data/docs/uaf/docs_17_20/SAX.py +246 -0
- teradataml/data/docs/uaf/docs_17_20/SeasonalNormalize.py +17 -10
- teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/WhitesGeneral.py +3 -1
- teradataml/data/docs/uaf/docs_17_20/WindowDFFT.py +368 -0
- teradataml/data/dwt2d_dataTable.csv +65 -0
- teradataml/data/dwt_dataTable.csv +8 -0
- teradataml/data/dwt_filterTable.csv +3 -0
- teradataml/data/finance_data4.csv +13 -0
- teradataml/data/glm_example.json +28 -1
- teradataml/data/grocery_transaction.csv +19 -0
- teradataml/data/housing_train_segment.csv +201 -0
- teradataml/data/idwt2d_dataTable.csv +5 -0
- teradataml/data/idwt_dataTable.csv +8 -0
- teradataml/data/idwt_filterTable.csv +3 -0
- teradataml/data/insect2Cols.csv +61 -0
- teradataml/data/interval_data.csv +5 -0
- teradataml/data/jsons/paired_functions.json +14 -0
- teradataml/data/jsons/sqle/17.20/TD_ANOVA.json +99 -27
- teradataml/data/jsons/sqle/17.20/TD_CFilter.json +118 -0
- teradataml/data/jsons/sqle/17.20/TD_FTest.json +166 -83
- teradataml/data/jsons/sqle/17.20/TD_GLM.json +90 -14
- teradataml/data/jsons/sqle/17.20/TD_GLMPREDICT.json +48 -5
- teradataml/data/jsons/sqle/17.20/TD_GetFutileColumns.json +5 -3
- teradataml/data/jsons/sqle/17.20/TD_KMeans.json +31 -11
- teradataml/data/jsons/sqle/17.20/TD_NaiveBayes.json +193 -0
- teradataml/data/jsons/sqle/17.20/TD_NaiveBayesPredict.json +212 -0
- teradataml/data/jsons/sqle/17.20/TD_NonLinearCombineFit.json +3 -2
- teradataml/data/jsons/sqle/17.20/TD_OneClassSVM.json +9 -9
- teradataml/data/jsons/sqle/17.20/TD_Pivoting.json +280 -0
- teradataml/data/jsons/sqle/17.20/TD_ROC.json +2 -1
- teradataml/data/jsons/sqle/17.20/TD_SVM.json +16 -16
- teradataml/data/jsons/sqle/17.20/TD_SVMPredict.json +19 -1
- teradataml/data/jsons/sqle/17.20/TD_ScaleFit.json +168 -15
- teradataml/data/jsons/sqle/17.20/TD_ScaleTransform.json +50 -1
- teradataml/data/jsons/sqle/17.20/TD_Shap.json +222 -0
- teradataml/data/jsons/sqle/17.20/TD_TFIDF.json +162 -0
- teradataml/data/jsons/sqle/17.20/TD_Unpivoting.json +235 -0
- teradataml/data/jsons/sqle/17.20/TD_XGBoost.json +25 -7
- teradataml/data/jsons/sqle/17.20/TD_XGBoostPredict.json +17 -4
- teradataml/data/jsons/sqle/17.20/TD_ZTest.json +157 -80
- teradataml/data/jsons/storedprocedure/17.20/TD_FILTERFACTORY1D.json +150 -0
- teradataml/data/jsons/uaf/17.20/TD_ACF.json +1 -18
- teradataml/data/jsons/uaf/17.20/TD_ARIMAESTIMATE.json +3 -16
- teradataml/data/jsons/uaf/17.20/TD_ARIMAFORECAST.json +0 -3
- teradataml/data/jsons/uaf/17.20/TD_ARIMAVALIDATE.json +5 -3
- teradataml/data/jsons/uaf/17.20/TD_ARIMAXESTIMATE.json +362 -0
- teradataml/data/jsons/uaf/17.20/TD_AUTOARIMA.json +469 -0
- teradataml/data/jsons/uaf/17.20/TD_BINARYMATRIXOP.json +0 -3
- teradataml/data/jsons/uaf/17.20/TD_BINARYSERIESOP.json +0 -2
- teradataml/data/jsons/uaf/17.20/TD_BREUSCH_GODFREY.json +2 -1
- teradataml/data/jsons/uaf/17.20/TD_BREUSCH_PAGAN_GODFREY.json +2 -5
- teradataml/data/jsons/uaf/17.20/TD_CONVOLVE.json +3 -6
- teradataml/data/jsons/uaf/17.20/TD_CONVOLVE2.json +1 -3
- teradataml/data/jsons/uaf/17.20/TD_CUMUL_PERIODOGRAM.json +0 -5
- teradataml/data/jsons/uaf/17.20/TD_DFFT.json +1 -4
- teradataml/data/jsons/uaf/17.20/TD_DFFT2.json +2 -7
- teradataml/data/jsons/uaf/17.20/TD_DFFT2CONV.json +1 -2
- teradataml/data/jsons/uaf/17.20/TD_DFFTCONV.json +0 -2
- teradataml/data/jsons/uaf/17.20/TD_DTW.json +3 -6
- teradataml/data/jsons/uaf/17.20/TD_DWT.json +173 -0
- teradataml/data/jsons/uaf/17.20/TD_DWT2D.json +160 -0
- teradataml/data/jsons/uaf/17.20/TD_FITMETRICS.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_GOLDFELD_QUANDT.json +16 -30
- teradataml/data/jsons/uaf/17.20/{TD_HOLT_WINTERS_FORECAST.json → TD_HOLT_WINTERS_FORECASTER.json} +1 -2
- teradataml/data/jsons/uaf/17.20/TD_IDFFT2.json +1 -15
- teradataml/data/jsons/uaf/17.20/TD_IDWT.json +162 -0
- teradataml/data/jsons/uaf/17.20/TD_IDWT2D.json +149 -0
- teradataml/data/jsons/uaf/17.20/TD_IQR.json +117 -0
- teradataml/data/jsons/uaf/17.20/TD_LINEAR_REGR.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_LINESPEC.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_MAMEAN.json +1 -3
- teradataml/data/jsons/uaf/17.20/TD_MATRIX2IMAGE.json +209 -0
- teradataml/data/jsons/uaf/17.20/TD_PACF.json +2 -2
- teradataml/data/jsons/uaf/17.20/TD_POWERSPEC.json +5 -5
- teradataml/data/jsons/uaf/17.20/TD_RESAMPLE.json +48 -28
- teradataml/data/jsons/uaf/17.20/TD_SAX.json +208 -0
- teradataml/data/jsons/uaf/17.20/TD_SEASONALNORMALIZE.json +12 -6
- teradataml/data/jsons/uaf/17.20/TD_SIMPLEEXP.json +0 -1
- teradataml/data/jsons/uaf/17.20/TD_TRACKINGOP.json +8 -8
- teradataml/data/jsons/uaf/17.20/TD_UNDIFF.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_UNNORMALIZE.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +400 -0
- teradataml/data/kmeans_example.json +5 -0
- teradataml/data/kmeans_table.csv +10 -0
- teradataml/data/load_example_data.py +8 -2
- teradataml/data/naivebayestextclassifier_example.json +1 -1
- teradataml/data/naivebayestextclassifierpredict_example.json +11 -0
- teradataml/data/onehot_encoder_train.csv +4 -0
- teradataml/data/openml_example.json +29 -0
- teradataml/data/peppers.png +0 -0
- teradataml/data/real_values.csv +14 -0
- teradataml/data/sax_example.json +8 -0
- teradataml/data/scale_attributes.csv +3 -0
- teradataml/data/scale_example.json +52 -1
- teradataml/data/scale_input_part_sparse.csv +31 -0
- teradataml/data/scale_input_partitioned.csv +16 -0
- teradataml/data/scale_input_sparse.csv +11 -0
- teradataml/data/scale_parameters.csv +3 -0
- teradataml/data/scripts/deploy_script.py +21 -2
- teradataml/data/scripts/sklearn/sklearn_fit.py +40 -37
- teradataml/data/scripts/sklearn/sklearn_fit_predict.py +22 -30
- teradataml/data/scripts/sklearn/sklearn_function.template +42 -24
- teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +23 -33
- teradataml/data/scripts/sklearn/sklearn_neighbors.py +19 -28
- teradataml/data/scripts/sklearn/sklearn_score.py +32 -32
- teradataml/data/scripts/sklearn/sklearn_transform.py +85 -42
- teradataml/data/star_pivot.csv +8 -0
- teradataml/data/templates/open_source_ml.json +2 -1
- teradataml/data/teradataml_example.json +97 -1
- teradataml/data/timestamp_data.csv +4 -0
- teradataml/data/titanic_dataset_unpivoted.csv +19 -0
- teradataml/data/uaf_example.json +55 -1
- teradataml/data/unpivot_example.json +15 -0
- teradataml/data/url_data.csv +9 -0
- teradataml/data/windowdfft.csv +16 -0
- teradataml/data/ztest_example.json +16 -0
- teradataml/dataframe/copy_to.py +9 -4
- teradataml/dataframe/data_transfer.py +125 -64
- teradataml/dataframe/dataframe.py +575 -57
- teradataml/dataframe/dataframe_utils.py +47 -9
- teradataml/dataframe/fastload.py +273 -90
- teradataml/dataframe/functions.py +339 -0
- teradataml/dataframe/row.py +160 -0
- teradataml/dataframe/setop.py +2 -2
- teradataml/dataframe/sql.py +740 -18
- teradataml/dataframe/window.py +1 -1
- teradataml/dbutils/dbutils.py +324 -18
- teradataml/geospatial/geodataframe.py +1 -1
- teradataml/geospatial/geodataframecolumn.py +1 -1
- teradataml/hyperparameter_tuner/optimizer.py +13 -13
- teradataml/lib/aed_0_1.dll +0 -0
- teradataml/opensource/sklearn/_sklearn_wrapper.py +254 -122
- teradataml/options/__init__.py +16 -5
- teradataml/options/configure.py +39 -6
- teradataml/options/display.py +2 -2
- teradataml/plot/axis.py +4 -4
- teradataml/scriptmgmt/UserEnv.py +26 -19
- teradataml/scriptmgmt/lls_utils.py +120 -16
- teradataml/table_operators/Script.py +4 -5
- teradataml/table_operators/TableOperator.py +160 -26
- teradataml/table_operators/table_operator_util.py +88 -41
- teradataml/table_operators/templates/dataframe_udf.template +63 -0
- teradataml/telemetry_utils/__init__.py +0 -0
- teradataml/telemetry_utils/queryband.py +52 -0
- teradataml/utils/validators.py +41 -3
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/METADATA +191 -6
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/RECORD +263 -185
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/WHEEL +0 -0
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/top_level.txt +0 -0
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
def AutoArima(data=None, data_filter_expr=None, max_pq_nonseasonal=[5,5],
|
|
2
|
+
max_pq_seasonal=[2,2], start_pq_nonseasonal=[0,0],
|
|
3
|
+
start_pq_seasonal=[0,0], d=-1, ds=-1, max_d=2, max_ds=1,
|
|
4
|
+
period=1, stationary=False, seasonal=True, constant=True,
|
|
5
|
+
algorithm="MLE", fit_percentage=100,
|
|
6
|
+
infor_criteria="AIC", stepwise=False, nmodels=94,
|
|
7
|
+
max_iterations=100, coeff_stats=False,
|
|
8
|
+
fit_metrics=False, residuals=False, arma_roots=False,
|
|
9
|
+
test_nonseasonal="ADF", test_seasonal="OCSB",
|
|
10
|
+
output_fmt_index_style="NUMERICAL_SEQUENCE",
|
|
11
|
+
**generic_arguments):
|
|
12
|
+
"""
|
|
13
|
+
DESCRIPTION:
|
|
14
|
+
AutoArima() function searches the possible models within the order
|
|
15
|
+
constrains in the function parameters, and returns the best ARIMA
|
|
16
|
+
model based on the criterion provided by the "infor_criteria"
|
|
17
|
+
parameter. AutoArima() function creates a six-layered ART table.
|
|
18
|
+
|
|
19
|
+
PARAMETERS:
|
|
20
|
+
data:
|
|
21
|
+
Required Argument.
|
|
22
|
+
Specifies the time series whose value can be REAL.
|
|
23
|
+
Types: TDSeries
|
|
24
|
+
|
|
25
|
+
data_filter_expr:
|
|
26
|
+
Optional Argument.
|
|
27
|
+
Specifies the filter expression for "data".
|
|
28
|
+
Types: ColumnExpression
|
|
29
|
+
|
|
30
|
+
max_pq_nonseasonal:
|
|
31
|
+
Optional Argument.
|
|
32
|
+
Specifies the (p,q) order of the maximum autoregression (AR) and
|
|
33
|
+
moving average (MA) parameters.
|
|
34
|
+
Default Value: [5,5]
|
|
35
|
+
Types: list
|
|
36
|
+
|
|
37
|
+
max_pq_seasonal:
|
|
38
|
+
Optional Argument.
|
|
39
|
+
Specifies the (P,Q) order of the max seasonal AR and MA
|
|
40
|
+
parameters.
|
|
41
|
+
Default Value: [2,2]
|
|
42
|
+
Types: list
|
|
43
|
+
|
|
44
|
+
start_pq_nonseasonal:
|
|
45
|
+
Optional Argument.
|
|
46
|
+
Specifies the start value of (p,q). Only used when "stepwise"=1.
|
|
47
|
+
Default Value: [0,0]
|
|
48
|
+
Types: list
|
|
49
|
+
|
|
50
|
+
start_pq_seasonal:
|
|
51
|
+
Optional Argument.
|
|
52
|
+
Specifies the start value of seasonal (P,Q). Only used when
|
|
53
|
+
"stepwise"=1.
|
|
54
|
+
Default Value: [0,0]
|
|
55
|
+
Types: list
|
|
56
|
+
|
|
57
|
+
d:
|
|
58
|
+
Optional Argument.
|
|
59
|
+
Specifies the order of first-differencing.
|
|
60
|
+
Default Value: -1 (auto search d).
|
|
61
|
+
Types: int
|
|
62
|
+
|
|
63
|
+
ds:
|
|
64
|
+
Optional Argument.
|
|
65
|
+
Specifies the order of seasonal-differencing.
|
|
66
|
+
Default Value: -1 (auto search Ds).
|
|
67
|
+
Types: int
|
|
68
|
+
|
|
69
|
+
max_d:
|
|
70
|
+
Optional Argument.
|
|
71
|
+
Specifies the maximum number of non-seasonal differences.
|
|
72
|
+
Default Value: 2
|
|
73
|
+
Types: int
|
|
74
|
+
|
|
75
|
+
max_ds:
|
|
76
|
+
Optional Argument.
|
|
77
|
+
Specifies the maximum number of seasonal differences.
|
|
78
|
+
Default Value: 1
|
|
79
|
+
Types: int
|
|
80
|
+
|
|
81
|
+
period:
|
|
82
|
+
Optional Argument.
|
|
83
|
+
Specifies the number of periods per season. For non-seasonal
|
|
84
|
+
data, period is 1.
|
|
85
|
+
Default Value: 1
|
|
86
|
+
Types: int
|
|
87
|
+
|
|
88
|
+
stationary:
|
|
89
|
+
Optional Argument.
|
|
90
|
+
Specifies whether to restrict search to stationary models.
|
|
91
|
+
If True, the function restricts search to stationary models.
|
|
92
|
+
Default Value: False
|
|
93
|
+
Types: bool
|
|
94
|
+
|
|
95
|
+
seasonal:
|
|
96
|
+
Optional Argument.
|
|
97
|
+
Specifies whether to restrict search to non-seasonal models.
|
|
98
|
+
If False, then the function restricts search to non-seasonal
|
|
99
|
+
models.
|
|
100
|
+
Default Value: True
|
|
101
|
+
Types: bool
|
|
102
|
+
|
|
103
|
+
constant:
|
|
104
|
+
Optional Argument.
|
|
105
|
+
Specifies whether an indicator that AutoArima() function includes
|
|
106
|
+
an intercept. If True, means CONSTANT/intercept
|
|
107
|
+
should be included. If False, means
|
|
108
|
+
CONSTANT/intercept should not be included.
|
|
109
|
+
Default Value: True
|
|
110
|
+
Types: bool
|
|
111
|
+
|
|
112
|
+
algorithm:
|
|
113
|
+
Optional Argument.
|
|
114
|
+
Specifies the approach used by TD_AUTOARIMA to estimate the
|
|
115
|
+
coefficients.
|
|
116
|
+
Permitted Values:
|
|
117
|
+
* MLE: Use maximum likelihood approach.
|
|
118
|
+
* CSS_MLE: Use the conditional sum-of-squares to determine a
|
|
119
|
+
start value and then do maximum likelihood.
|
|
120
|
+
* CSS: Use the conditional sum-of squares approach.
|
|
121
|
+
Default Value: MLE
|
|
122
|
+
Types: str
|
|
123
|
+
|
|
124
|
+
fit_percentage:
|
|
125
|
+
Optional Argument.
|
|
126
|
+
Specifies the percentage of passed-in sample points used for the
|
|
127
|
+
model fitting (parameter estimation).
|
|
128
|
+
Default Value: 100
|
|
129
|
+
Types: int
|
|
130
|
+
|
|
131
|
+
infor_criteria:
|
|
132
|
+
Optional Argument.
|
|
133
|
+
Specifies the information criterion to be used in model selection.
|
|
134
|
+
Permitted Values: AIC, AICC, BIC
|
|
135
|
+
Default Value: AIC
|
|
136
|
+
Types: str
|
|
137
|
+
|
|
138
|
+
stepwise:
|
|
139
|
+
Optional Argument.
|
|
140
|
+
Specifies whether the function does stepwise selection or not.
|
|
141
|
+
If True, then the function does stepwise selection otherwise the
|
|
142
|
+
function selects all models.
|
|
143
|
+
Default Value: False
|
|
144
|
+
Types: bool
|
|
145
|
+
|
|
146
|
+
nmodels:
|
|
147
|
+
Optional Argument.
|
|
148
|
+
Specifies the maximum number of models considered in the stepwise
|
|
149
|
+
search.
|
|
150
|
+
Default Value: 94
|
|
151
|
+
Types: int
|
|
152
|
+
|
|
153
|
+
max_iterations:
|
|
154
|
+
Optional Argument.
|
|
155
|
+
Specifies the maximum number of iterations that can be employed
|
|
156
|
+
to non-linear optimization procedure.
|
|
157
|
+
Default Value: 100
|
|
158
|
+
Types: int
|
|
159
|
+
|
|
160
|
+
coeff_stats:
|
|
161
|
+
Optional Argument.
|
|
162
|
+
Specifies the indicator to return coefficient statistical columns
|
|
163
|
+
TSTAT_VALUE and TSTAT_PROB. If True, means return
|
|
164
|
+
the columns otherwise do not return the
|
|
165
|
+
columns.
|
|
166
|
+
Default Value: False
|
|
167
|
+
Types: bool
|
|
168
|
+
|
|
169
|
+
fit_metrics:
|
|
170
|
+
Optional Argument.
|
|
171
|
+
Specifies the indicator to generate the secondary result set that
|
|
172
|
+
contains the model metadata statistics. If True,
|
|
173
|
+
means generate the secondary result set otherwise
|
|
174
|
+
do not generate the secondary result set.
|
|
175
|
+
Default Value: False
|
|
176
|
+
Types: bool
|
|
177
|
+
|
|
178
|
+
residuals:
|
|
179
|
+
Optional Argument.
|
|
180
|
+
Specifies the indicator to generate the tertiary result set that
|
|
181
|
+
contains the model residuals. If True, means
|
|
182
|
+
generate the tertiary result set, otherwise
|
|
183
|
+
do not generate the tertiary result set.
|
|
184
|
+
Default Value: False
|
|
185
|
+
Types: bool
|
|
186
|
+
|
|
187
|
+
arma_roots:
|
|
188
|
+
Optional Argument.
|
|
189
|
+
Specifies the indicator to generate the senary result set that
|
|
190
|
+
contains the inverse AR and MA roots of result best
|
|
191
|
+
model that AutoArima() selected (the model in the
|
|
192
|
+
primary output layer). There should be no inverse
|
|
193
|
+
roots showing outside of the unit circle. If True,
|
|
194
|
+
means generate result set otherwise do not
|
|
195
|
+
generate a result set.
|
|
196
|
+
Default Value: False
|
|
197
|
+
Types: bool
|
|
198
|
+
|
|
199
|
+
test_nonseasonal:
|
|
200
|
+
Optional Argument.
|
|
201
|
+
Specifies the nonseasonal unit root test used to choose
|
|
202
|
+
differencing number "d".
|
|
203
|
+
AutoArima() function only uses ADF test for
|
|
204
|
+
nonseasonal unit root test.
|
|
205
|
+
Permitted Values: ADF
|
|
206
|
+
Default Value: ADF
|
|
207
|
+
Types: str
|
|
208
|
+
|
|
209
|
+
test_seasonal:
|
|
210
|
+
Optional Argument.
|
|
211
|
+
Specifies the seasonal unit root test used to choose differencing
|
|
212
|
+
number "d". AutoArima() function only uses OCSB test for
|
|
213
|
+
seasonal unit root test.
|
|
214
|
+
Permitted Values: OCSB
|
|
215
|
+
Default Value: OCSB
|
|
216
|
+
Types: str
|
|
217
|
+
|
|
218
|
+
output_fmt_index_style:
|
|
219
|
+
Optional Argument.
|
|
220
|
+
Specifies the index style of the output format.
|
|
221
|
+
Permitted Values: NUMERICAL_SEQUENCE, FLOW_THROUGH
|
|
222
|
+
Default Value: NUMERICAL_SEQUENCE
|
|
223
|
+
Types: str
|
|
224
|
+
|
|
225
|
+
**generic_arguments:
|
|
226
|
+
Specifies the generic keyword arguments of UAF functions.
|
|
227
|
+
Below are the generic keyword arguments:
|
|
228
|
+
persist:
|
|
229
|
+
Optional Argument.
|
|
230
|
+
Specifies whether to persist the results of the
|
|
231
|
+
function in a table or not. When set to True,
|
|
232
|
+
results are persisted in a table; otherwise,
|
|
233
|
+
results are garbage collected at the end of the
|
|
234
|
+
session.
|
|
235
|
+
Note that, when UAF function is executed, an
|
|
236
|
+
analytic result table (ART) is created.
|
|
237
|
+
Default Value: False
|
|
238
|
+
Types: bool
|
|
239
|
+
|
|
240
|
+
volatile:
|
|
241
|
+
Optional Argument.
|
|
242
|
+
Specifies whether to put the results of the
|
|
243
|
+
function in a volatile ART or not. When set to
|
|
244
|
+
True, results are stored in a volatile ART,
|
|
245
|
+
otherwise not.
|
|
246
|
+
Default Value: False
|
|
247
|
+
Types: bool
|
|
248
|
+
|
|
249
|
+
output_table_name:
|
|
250
|
+
Optional Argument.
|
|
251
|
+
Specifies the name of the table to store results.
|
|
252
|
+
If not specified, a unique table name is internally
|
|
253
|
+
generated.
|
|
254
|
+
Types: str
|
|
255
|
+
|
|
256
|
+
output_db_name:
|
|
257
|
+
Optional Argument.
|
|
258
|
+
Specifies the name of the database to create output
|
|
259
|
+
table into. If not specified, table is created into
|
|
260
|
+
database specified by the user at the time of context
|
|
261
|
+
creation or configuration parameter. Argument is ignored,
|
|
262
|
+
if "output_table_name" is not specified.
|
|
263
|
+
Types: str
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
RETURNS:
|
|
267
|
+
Instance of AutoArima.
|
|
268
|
+
Output teradataml DataFrames can be accessed using attribute
|
|
269
|
+
references, such as AutoArima_obj.<attribute_name>.
|
|
270
|
+
Output teradataml DataFrame attribute names are:
|
|
271
|
+
1. result
|
|
272
|
+
2. fitmetadata
|
|
273
|
+
3. fitresiduals
|
|
274
|
+
4. model
|
|
275
|
+
5. icandorder
|
|
276
|
+
6. armaroots
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
RAISES:
|
|
280
|
+
TeradataMlException, TypeError, ValueError
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
EXAMPLES:
|
|
284
|
+
# Notes:
|
|
285
|
+
# 1. Get the connection to Vantage, before importing the
|
|
286
|
+
# function in user space.
|
|
287
|
+
# 2. User can import the function, if it is available on
|
|
288
|
+
# Vantage user is connected to.
|
|
289
|
+
# 3. To check the list of UAF analytic functions available
|
|
290
|
+
# on Vantage user connected to, use
|
|
291
|
+
# "display_analytic_functions()".
|
|
292
|
+
|
|
293
|
+
# Check the list of available UAF analytic functions.
|
|
294
|
+
display_analytic_functions(type="UAF")
|
|
295
|
+
|
|
296
|
+
# Import function AutoArima.
|
|
297
|
+
from teradataml import AutoArima
|
|
298
|
+
|
|
299
|
+
# Load the example data.
|
|
300
|
+
load_example_data("uaf", ["blood2ageandweight", "covid_confirm_sd"])
|
|
301
|
+
|
|
302
|
+
# Create teradataml DataFrame object.
|
|
303
|
+
data = DataFrame.from_table("blood2ageandweight")
|
|
304
|
+
|
|
305
|
+
# Create teradataml TDSeries object.
|
|
306
|
+
data_series_df = TDSeries(data=data,
|
|
307
|
+
id="PatientID",
|
|
308
|
+
row_index="SeqNo",
|
|
309
|
+
row_index_style="SEQUENCE",
|
|
310
|
+
payload_field="BloodFat",
|
|
311
|
+
payload_content="REAL")
|
|
312
|
+
|
|
313
|
+
# Example 1: Execute AutoArima with start_pq_nonseasonal as [1,1], algorithm = "MLE" and
|
|
314
|
+
# fit_percentage=80 to find the best ARIMA model.
|
|
315
|
+
uaf_out = AutoArima(data=data_series_df,
|
|
316
|
+
start_pq_nonseasonal=[1, 1],
|
|
317
|
+
seasonal=False,
|
|
318
|
+
constant=True,
|
|
319
|
+
algorithm="MLE",
|
|
320
|
+
fit_percentage=80,
|
|
321
|
+
stepwise=True,
|
|
322
|
+
nmodels=7,
|
|
323
|
+
fit_metrics=True,
|
|
324
|
+
residuals=True)
|
|
325
|
+
|
|
326
|
+
# Print the result DataFrames.
|
|
327
|
+
print(uaf_out.result)
|
|
328
|
+
|
|
329
|
+
# Example 2: Execute AutoArima with max_pq_nonseasonal as [3,3], arma_roots = True,
|
|
330
|
+
# to find thhe best ARIMA model.
|
|
331
|
+
covid_confirm_sd = DataFrame("covid_confirm_sd")
|
|
332
|
+
data_series_df = TDSeries(data=covid_confirm_sd,
|
|
333
|
+
id="city",
|
|
334
|
+
row_index="row_axis",
|
|
335
|
+
row_index_style="SEQUENCE",
|
|
336
|
+
payload_field="cnumber",
|
|
337
|
+
payload_content="REAL")
|
|
338
|
+
|
|
339
|
+
uaf_out = AutoArima(data=data_series_df,
|
|
340
|
+
max_pq_nonseasonal=[3, 3],
|
|
341
|
+
stationary=False,
|
|
342
|
+
stepwise=False,
|
|
343
|
+
arma_roots=True,
|
|
344
|
+
residuals=True)
|
|
345
|
+
|
|
346
|
+
# Print the result DataFrames.
|
|
347
|
+
print(uaf_out.result)
|
|
348
|
+
print(uaf_out.fitresiduals)
|
|
349
|
+
print(uaf_out.model)
|
|
350
|
+
print(uaf_out.icandorder)
|
|
351
|
+
print(uaf_out.armaroots)
|
|
352
|
+
|
|
353
|
+
"""
|
|
354
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
def BreuschGodfrey(data=None, data_filter_expr=None, residual_max_lags=None,
|
|
2
|
-
explanatory_count=None, significance_level=
|
|
2
|
+
explanatory_count=None, significance_level=0.05,
|
|
3
3
|
**generic_arguments):
|
|
4
4
|
"""
|
|
5
5
|
DESCRIPTION:
|
|
@@ -46,6 +46,7 @@ def BreuschGodfrey(data=None, data_filter_expr=None, residual_max_lags=None,
|
|
|
46
46
|
significance_level:
|
|
47
47
|
Optional Argument.
|
|
48
48
|
Specifies the desired significance level for the test.
|
|
49
|
+
Default Value: 0.05
|
|
49
50
|
Types: float
|
|
50
51
|
|
|
51
52
|
**generic_arguments:
|
|
@@ -163,7 +164,7 @@ def BreuschGodfrey(data=None, data_filter_expr=None, residual_max_lags=None,
|
|
|
163
164
|
id="cityid",
|
|
164
165
|
row_index="ROW_I",
|
|
165
166
|
row_index_style= "SEQUENCE",
|
|
166
|
-
payload_field=["ACTUAL_VALUE","CALC_VALUE"],
|
|
167
|
+
payload_field=["RESIDUAL","ACTUAL_VALUE","CALC_VALUE"],
|
|
167
168
|
payload_content="MULTIVAR_REAL")
|
|
168
169
|
|
|
169
170
|
uaf_out = BreuschGodfrey(data=data_series_bg,
|
|
@@ -149,7 +149,7 @@ def BreuschPaganGodfrey(data=None, data_filter_expr=None, variables_count=None,
|
|
|
149
149
|
id="cityid",
|
|
150
150
|
row_index="ROW_I",
|
|
151
151
|
row_index_style= "SEQUENCE",
|
|
152
|
-
payload_field=["ACTUAL_VALUE","CALC_VALUE"],
|
|
152
|
+
payload_field=["RESIDUAL","ACTUAL_VALUE","CALC_VALUE"],
|
|
153
153
|
payload_content="MULTIVAR_REAL")
|
|
154
154
|
uaf_out = BreuschPaganGodfrey(data=data_series_bg,
|
|
155
155
|
variables_count=2,
|
|
@@ -41,7 +41,7 @@ def Convolve(data1=None, data1_filter_expr=None, data2=None,
|
|
|
41
41
|
data2:
|
|
42
42
|
Required Argument.
|
|
43
43
|
Specifies the actual filter kernel.
|
|
44
|
-
|
|
44
|
+
The time series have the following TDSeries characteristics.
|
|
45
45
|
1. "payload_content" must have one of these values:
|
|
46
46
|
* REAL
|
|
47
47
|
* COMPLEX
|
|
@@ -64,18 +64,21 @@ def Convolve(data1=None, data1_filter_expr=None, data2=None,
|
|
|
64
64
|
|
|
65
65
|
algorithm:
|
|
66
66
|
Optional Argument.
|
|
67
|
-
Specifies the options to use for convolving.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
Specifies the options to use for convolving.
|
|
68
|
+
By default, the function selects the best option based
|
|
69
|
+
on the number of entries present in the two inputs,
|
|
70
|
+
and their types ( REAL, COMPLEX, and so on.)
|
|
71
|
+
CONV_SUMMATION only supports:
|
|
72
|
+
* REAL, REAL
|
|
73
|
+
* REAL, MULTIVAR_REAL
|
|
74
|
+
* MULTIVAR_REAL, REAL
|
|
75
|
+
* MULTIVAR_REAL, MULTIVAR_REAL
|
|
74
76
|
Note:
|
|
75
77
|
* This parameter is usually used for testing.
|
|
76
78
|
If this parameter is not included, the internal
|
|
77
|
-
planning logic selects the best option based
|
|
78
|
-
|
|
79
|
+
planning logic selects the best option based on
|
|
80
|
+
the number of entries present in the two inputs,
|
|
81
|
+
and their types ( REAL, COMPLEX, and so on.)
|
|
79
82
|
Permitted Values: CONV_SUMMATION, CONV_DFFT
|
|
80
83
|
Types: str
|
|
81
84
|
|
|
@@ -154,7 +154,6 @@ def Convolve2(data1=None, data1_filter_expr=None, data2=None,
|
|
|
154
154
|
data3 = DataFrame.from_table("Convolve2RealsLeft")
|
|
155
155
|
data4 = DataFrame.from_table("Convolve2RealsLeft")
|
|
156
156
|
|
|
157
|
-
|
|
158
157
|
# Example 1: Apply the Convolve2() function when payload fields of two matrices
|
|
159
158
|
# are the different to convolve two matrices into a new source
|
|
160
159
|
# image matrix.
|
|
@@ -168,6 +167,7 @@ def Convolve2(data1=None, data1_filter_expr=None, data2=None,
|
|
|
168
167
|
column_index='column_i',
|
|
169
168
|
payload_field=["B"],
|
|
170
169
|
payload_content="REAL")
|
|
170
|
+
|
|
171
171
|
data2_matrix_df = TDMatrix(data=data2,
|
|
172
172
|
id='id',
|
|
173
173
|
row_index_style="sequence",
|
|
@@ -176,6 +176,7 @@ def Convolve2(data1=None, data1_filter_expr=None, data2=None,
|
|
|
176
176
|
column_index='column_i',
|
|
177
177
|
payload_field=["A"],
|
|
178
178
|
payload_content="REAL")
|
|
179
|
+
|
|
179
180
|
# Convolve the "data1_matrix_df" and "data2_matrix_df" matrices using the Convolve2() function.
|
|
180
181
|
uaf_out1 = Convolve2(data1=data1_matrix_df,
|
|
181
182
|
data2=data2_matrix_df,
|
|
@@ -196,6 +197,7 @@ def Convolve2(data1=None, data1_filter_expr=None, data2=None,
|
|
|
196
197
|
column_index='col_seq',
|
|
197
198
|
payload_field=["A"],
|
|
198
199
|
payload_content="REAL")
|
|
200
|
+
|
|
199
201
|
data4_matrix_df = TDMatrix(data=data4,
|
|
200
202
|
id='id',
|
|
201
203
|
row_index_style="sequence",
|
|
@@ -204,6 +206,7 @@ def Convolve2(data1=None, data1_filter_expr=None, data2=None,
|
|
|
204
206
|
column_index='col_seq',
|
|
205
207
|
payload_field=["A"],
|
|
206
208
|
payload_content="REAL")
|
|
209
|
+
|
|
207
210
|
# Convolve the "data3_matrix_df" and "data4_matrix_df" matrices using the Convolve2() function.
|
|
208
211
|
uaf_out2 = Convolve2(data1=data3_matrix_df,
|
|
209
212
|
data2=data4_matrix_df,
|
|
@@ -21,7 +21,7 @@ def CumulPeriodogram(data=None, data_filter_expr=None,
|
|
|
21
21
|
2. Use ArimaValidate() to validate spectral candidates.
|
|
22
22
|
4. Execute CumulPeriodogram() using the residuals.
|
|
23
23
|
5. See the null hypothesis result from CumulPeriodogram().
|
|
24
|
-
6. Use
|
|
24
|
+
6. Use DataFrame.plot() to plot the results.
|
|
25
25
|
|
|
26
26
|
PARAMETERS:
|
|
27
27
|
data:
|
|
@@ -143,7 +143,6 @@ def CumulPeriodogram(data=None, data_filter_expr=None,
|
|
|
143
143
|
fit_metrics=True,
|
|
144
144
|
residuals=True)
|
|
145
145
|
|
|
146
|
-
|
|
147
146
|
# Example 1: Perform statistical test using CumulPeriodogram()
|
|
148
147
|
# with input as TDSeries object created over the 'fitresiduals'
|
|
149
148
|
# attribute of arima_validate generated by running ArimaValidate() and
|
|
@@ -158,7 +157,8 @@ def CumulPeriodogram(data=None, data_filter_expr=None,
|
|
|
158
157
|
payload_field="RESIDUAL",
|
|
159
158
|
payload_content="REAL")
|
|
160
159
|
|
|
161
|
-
uaf_out = CumulPeriodogram(data=data_series_df,
|
|
160
|
+
uaf_out = CumulPeriodogram(data=data_series_df,
|
|
161
|
+
significance_level=0.05)
|
|
162
162
|
|
|
163
163
|
# Print the result DataFrames.
|
|
164
164
|
print(uaf_out.result)
|
|
@@ -174,7 +174,8 @@ def CumulPeriodogram(data=None, data_filter_expr=None,
|
|
|
174
174
|
# generated by ArimaValidate() function with layer as 'ARTFITRESIDUALS'.
|
|
175
175
|
art_df = TDAnalyticResult(data=arima_validate.result, layer="ARTFITRESIDUALS")
|
|
176
176
|
|
|
177
|
-
uaf_out = CumulPeriodogram(data=art_df,
|
|
177
|
+
uaf_out = CumulPeriodogram(data=art_df,
|
|
178
|
+
significance_level=0.05)
|
|
178
179
|
|
|
179
180
|
# Print the result DataFrames.
|
|
180
181
|
print(uaf_out.result)
|
|
@@ -174,10 +174,10 @@ def DFFT2Conv(data=None, data_filter_expr=None, conv=None,
|
|
|
174
174
|
# input matrix with real numbers only for the matrix id 33.
|
|
175
175
|
filter_expr = td_matrix.id==33
|
|
176
176
|
dfft2_out = DFFT2(data=td_matrix,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
data_filter_expr=filter_expr,
|
|
178
|
+
freq_style="K_INTEGRAL",
|
|
179
|
+
human_readable=False,
|
|
180
|
+
output_fmt_content="COMPLEX")
|
|
181
181
|
|
|
182
182
|
# Example 1: Convert the complex(REAL,IMAGINARY) output of DFFT2() to
|
|
183
183
|
# polar(AMPLITUDE,PHASE) in RADIAN format using TDMatrix
|