teradataml 20.0.0.1__py3-none-any.whl → 20.0.0.3__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.

Files changed (240) hide show
  1. teradataml/LICENSE-3RD-PARTY.pdf +0 -0
  2. teradataml/LICENSE.pdf +0 -0
  3. teradataml/README.md +306 -0
  4. teradataml/__init__.py +10 -3
  5. teradataml/_version.py +1 -1
  6. teradataml/analytics/__init__.py +3 -2
  7. teradataml/analytics/analytic_function_executor.py +299 -16
  8. teradataml/analytics/analytic_query_generator.py +92 -0
  9. teradataml/analytics/byom/__init__.py +3 -2
  10. teradataml/analytics/json_parser/metadata.py +13 -3
  11. teradataml/analytics/json_parser/utils.py +13 -6
  12. teradataml/analytics/meta_class.py +40 -1
  13. teradataml/analytics/sqle/DecisionTreePredict.py +1 -1
  14. teradataml/analytics/sqle/__init__.py +11 -2
  15. teradataml/analytics/table_operator/__init__.py +4 -3
  16. teradataml/analytics/uaf/__init__.py +21 -2
  17. teradataml/analytics/utils.py +66 -1
  18. teradataml/analytics/valib.py +1 -1
  19. teradataml/automl/__init__.py +1502 -323
  20. teradataml/automl/custom_json_utils.py +139 -61
  21. teradataml/automl/data_preparation.py +247 -307
  22. teradataml/automl/data_transformation.py +32 -12
  23. teradataml/automl/feature_engineering.py +325 -86
  24. teradataml/automl/model_evaluation.py +44 -35
  25. teradataml/automl/model_training.py +122 -153
  26. teradataml/catalog/byom.py +8 -8
  27. teradataml/clients/pkce_client.py +1 -1
  28. teradataml/common/__init__.py +2 -1
  29. teradataml/common/constants.py +72 -0
  30. teradataml/common/deprecations.py +13 -7
  31. teradataml/common/garbagecollector.py +152 -120
  32. teradataml/common/messagecodes.py +11 -2
  33. teradataml/common/messages.py +4 -1
  34. teradataml/common/sqlbundle.py +26 -4
  35. teradataml/common/utils.py +225 -14
  36. teradataml/common/wrapper_utils.py +1 -1
  37. teradataml/context/context.py +82 -2
  38. teradataml/data/SQL_Fundamentals.pdf +0 -0
  39. teradataml/data/complaints_test_tokenized.csv +353 -0
  40. teradataml/data/complaints_tokens_model.csv +348 -0
  41. teradataml/data/covid_confirm_sd.csv +83 -0
  42. teradataml/data/dataframe_example.json +27 -1
  43. teradataml/data/docs/sqle/docs_17_20/CFilter.py +132 -0
  44. teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +162 -0
  45. teradataml/data/docs/sqle/docs_17_20/OutlierFilterFit.py +2 -0
  46. teradataml/data/docs/sqle/docs_17_20/Pivoting.py +279 -0
  47. teradataml/data/docs/sqle/docs_17_20/Shap.py +203 -0
  48. teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +189 -0
  49. teradataml/data/docs/sqle/docs_17_20/TFIDF.py +142 -0
  50. teradataml/data/docs/sqle/docs_17_20/TextParser.py +3 -3
  51. teradataml/data/docs/sqle/docs_17_20/Unpivoting.py +216 -0
  52. teradataml/data/docs/tableoperator/docs_17_20/Image2Matrix.py +118 -0
  53. teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -10
  54. teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +1 -1
  55. teradataml/data/docs/uaf/docs_17_20/ArimaForecast.py +35 -5
  56. teradataml/data/docs/uaf/docs_17_20/ArimaValidate.py +3 -1
  57. teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +293 -0
  58. teradataml/data/docs/uaf/docs_17_20/AutoArima.py +354 -0
  59. teradataml/data/docs/uaf/docs_17_20/BreuschGodfrey.py +3 -2
  60. teradataml/data/docs/uaf/docs_17_20/BreuschPaganGodfrey.py +1 -1
  61. teradataml/data/docs/uaf/docs_17_20/Convolve.py +13 -10
  62. teradataml/data/docs/uaf/docs_17_20/Convolve2.py +4 -1
  63. teradataml/data/docs/uaf/docs_17_20/CopyArt.py +145 -0
  64. teradataml/data/docs/uaf/docs_17_20/CumulPeriodogram.py +5 -4
  65. teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +4 -4
  66. teradataml/data/docs/uaf/docs_17_20/DWT.py +235 -0
  67. teradataml/data/docs/uaf/docs_17_20/DWT2D.py +214 -0
  68. teradataml/data/docs/uaf/docs_17_20/DickeyFuller.py +18 -21
  69. teradataml/data/docs/uaf/docs_17_20/DurbinWatson.py +1 -1
  70. teradataml/data/docs/uaf/docs_17_20/ExtractResults.py +1 -1
  71. teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +160 -0
  72. teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +1 -1
  73. teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +9 -31
  74. teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +4 -2
  75. teradataml/data/docs/uaf/docs_17_20/IDFFT2.py +1 -8
  76. teradataml/data/docs/uaf/docs_17_20/IDWT.py +236 -0
  77. teradataml/data/docs/uaf/docs_17_20/IDWT2D.py +226 -0
  78. teradataml/data/docs/uaf/docs_17_20/IQR.py +134 -0
  79. teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
  80. teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +2 -2
  81. teradataml/data/docs/uaf/docs_17_20/MAMean.py +3 -3
  82. teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +297 -0
  83. teradataml/data/docs/uaf/docs_17_20/MatrixMultiply.py +15 -6
  84. teradataml/data/docs/uaf/docs_17_20/PACF.py +0 -1
  85. teradataml/data/docs/uaf/docs_17_20/Portman.py +2 -2
  86. teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
  87. teradataml/data/docs/uaf/docs_17_20/Resample.py +9 -1
  88. teradataml/data/docs/uaf/docs_17_20/SAX.py +246 -0
  89. teradataml/data/docs/uaf/docs_17_20/SeasonalNormalize.py +17 -10
  90. teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
  91. teradataml/data/docs/uaf/docs_17_20/WhitesGeneral.py +3 -1
  92. teradataml/data/docs/uaf/docs_17_20/WindowDFFT.py +368 -0
  93. teradataml/data/dwt2d_dataTable.csv +65 -0
  94. teradataml/data/dwt_dataTable.csv +8 -0
  95. teradataml/data/dwt_filterTable.csv +3 -0
  96. teradataml/data/finance_data4.csv +13 -0
  97. teradataml/data/grocery_transaction.csv +19 -0
  98. teradataml/data/idwt2d_dataTable.csv +5 -0
  99. teradataml/data/idwt_dataTable.csv +8 -0
  100. teradataml/data/idwt_filterTable.csv +3 -0
  101. teradataml/data/interval_data.csv +5 -0
  102. teradataml/data/jsons/paired_functions.json +14 -0
  103. teradataml/data/jsons/sqle/17.20/TD_CFilter.json +118 -0
  104. teradataml/data/jsons/sqle/17.20/TD_NaiveBayes.json +193 -0
  105. teradataml/data/jsons/sqle/17.20/TD_NaiveBayesPredict.json +212 -0
  106. teradataml/data/jsons/sqle/17.20/TD_OneClassSVM.json +9 -9
  107. teradataml/data/jsons/sqle/17.20/TD_Pivoting.json +280 -0
  108. teradataml/data/jsons/sqle/17.20/TD_Shap.json +222 -0
  109. teradataml/data/jsons/sqle/17.20/TD_TFIDF.json +162 -0
  110. teradataml/data/jsons/sqle/17.20/TD_TextParser.json +1 -1
  111. teradataml/data/jsons/sqle/17.20/TD_Unpivoting.json +235 -0
  112. teradataml/data/jsons/sqle/20.00/TD_KMeans.json +250 -0
  113. teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +266 -0
  114. teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +278 -0
  115. teradataml/data/jsons/storedprocedure/17.20/TD_COPYART.json +71 -0
  116. teradataml/data/jsons/storedprocedure/17.20/TD_FILTERFACTORY1D.json +150 -0
  117. teradataml/data/jsons/tableoperator/17.20/IMAGE2MATRIX.json +53 -0
  118. teradataml/data/jsons/uaf/17.20/TD_ACF.json +1 -18
  119. teradataml/data/jsons/uaf/17.20/TD_ARIMAESTIMATE.json +3 -16
  120. teradataml/data/jsons/uaf/17.20/TD_ARIMAFORECAST.json +0 -3
  121. teradataml/data/jsons/uaf/17.20/TD_ARIMAVALIDATE.json +5 -3
  122. teradataml/data/jsons/uaf/17.20/TD_ARIMAXESTIMATE.json +362 -0
  123. teradataml/data/jsons/uaf/17.20/TD_AUTOARIMA.json +469 -0
  124. teradataml/data/jsons/uaf/17.20/TD_BINARYMATRIXOP.json +0 -3
  125. teradataml/data/jsons/uaf/17.20/TD_BINARYSERIESOP.json +0 -2
  126. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_GODFREY.json +2 -1
  127. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_PAGAN_GODFREY.json +2 -5
  128. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE.json +3 -6
  129. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE2.json +1 -3
  130. teradataml/data/jsons/uaf/17.20/TD_CUMUL_PERIODOGRAM.json +0 -5
  131. teradataml/data/jsons/uaf/17.20/TD_DFFT.json +1 -4
  132. teradataml/data/jsons/uaf/17.20/TD_DFFT2.json +2 -7
  133. teradataml/data/jsons/uaf/17.20/TD_DFFT2CONV.json +1 -2
  134. teradataml/data/jsons/uaf/17.20/TD_DFFTCONV.json +0 -2
  135. teradataml/data/jsons/uaf/17.20/TD_DICKEY_FULLER.json +10 -19
  136. teradataml/data/jsons/uaf/17.20/TD_DTW.json +3 -6
  137. teradataml/data/jsons/uaf/17.20/TD_DWT.json +173 -0
  138. teradataml/data/jsons/uaf/17.20/TD_DWT2D.json +160 -0
  139. teradataml/data/jsons/uaf/17.20/TD_FITMETRICS.json +1 -1
  140. teradataml/data/jsons/uaf/17.20/TD_GOLDFELD_QUANDT.json +16 -30
  141. teradataml/data/jsons/uaf/17.20/{TD_HOLT_WINTERS_FORECAST.json → TD_HOLT_WINTERS_FORECASTER.json} +1 -2
  142. teradataml/data/jsons/uaf/17.20/TD_IDFFT2.json +1 -15
  143. teradataml/data/jsons/uaf/17.20/TD_IDWT.json +162 -0
  144. teradataml/data/jsons/uaf/17.20/TD_IDWT2D.json +149 -0
  145. teradataml/data/jsons/uaf/17.20/TD_IQR.json +117 -0
  146. teradataml/data/jsons/uaf/17.20/TD_LINEAR_REGR.json +1 -1
  147. teradataml/data/jsons/uaf/17.20/TD_LINESPEC.json +1 -1
  148. teradataml/data/jsons/uaf/17.20/TD_MAMEAN.json +1 -3
  149. teradataml/data/jsons/uaf/17.20/TD_MATRIX2IMAGE.json +209 -0
  150. teradataml/data/jsons/uaf/17.20/TD_PACF.json +2 -2
  151. teradataml/data/jsons/uaf/17.20/TD_POWERSPEC.json +5 -5
  152. teradataml/data/jsons/uaf/17.20/TD_RESAMPLE.json +48 -28
  153. teradataml/data/jsons/uaf/17.20/TD_SAX.json +210 -0
  154. teradataml/data/jsons/uaf/17.20/TD_SEASONALNORMALIZE.json +12 -6
  155. teradataml/data/jsons/uaf/17.20/TD_SIMPLEEXP.json +0 -1
  156. teradataml/data/jsons/uaf/17.20/TD_TRACKINGOP.json +8 -8
  157. teradataml/data/jsons/uaf/17.20/TD_UNDIFF.json +1 -1
  158. teradataml/data/jsons/uaf/17.20/TD_UNNORMALIZE.json +1 -1
  159. teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +410 -0
  160. teradataml/data/load_example_data.py +8 -2
  161. teradataml/data/medical_readings.csv +101 -0
  162. teradataml/data/naivebayestextclassifier_example.json +1 -1
  163. teradataml/data/naivebayestextclassifierpredict_example.json +11 -0
  164. teradataml/data/patient_profile.csv +101 -0
  165. teradataml/data/peppers.png +0 -0
  166. teradataml/data/real_values.csv +14 -0
  167. teradataml/data/sax_example.json +8 -0
  168. teradataml/data/scripts/deploy_script.py +1 -1
  169. teradataml/data/scripts/lightgbm/dataset.template +157 -0
  170. teradataml/data/scripts/lightgbm/lightgbm_class_functions.template +247 -0
  171. teradataml/data/scripts/lightgbm/lightgbm_function.template +216 -0
  172. teradataml/data/scripts/lightgbm/lightgbm_sklearn.template +159 -0
  173. teradataml/data/scripts/sklearn/sklearn_fit.py +194 -160
  174. teradataml/data/scripts/sklearn/sklearn_fit_predict.py +136 -115
  175. teradataml/data/scripts/sklearn/sklearn_function.template +34 -16
  176. teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +155 -137
  177. teradataml/data/scripts/sklearn/sklearn_neighbors.py +1 -1
  178. teradataml/data/scripts/sklearn/sklearn_score.py +12 -3
  179. teradataml/data/scripts/sklearn/sklearn_transform.py +162 -24
  180. teradataml/data/star_pivot.csv +8 -0
  181. teradataml/data/target_udt_data.csv +8 -0
  182. teradataml/data/templates/open_source_ml.json +3 -1
  183. teradataml/data/teradataml_example.json +20 -1
  184. teradataml/data/timestamp_data.csv +4 -0
  185. teradataml/data/titanic_dataset_unpivoted.csv +19 -0
  186. teradataml/data/uaf_example.json +55 -1
  187. teradataml/data/unpivot_example.json +15 -0
  188. teradataml/data/url_data.csv +9 -0
  189. teradataml/data/vectordistance_example.json +4 -0
  190. teradataml/data/windowdfft.csv +16 -0
  191. teradataml/dataframe/copy_to.py +1 -1
  192. teradataml/dataframe/data_transfer.py +5 -3
  193. teradataml/dataframe/dataframe.py +1002 -201
  194. teradataml/dataframe/fastload.py +3 -3
  195. teradataml/dataframe/functions.py +867 -0
  196. teradataml/dataframe/row.py +160 -0
  197. teradataml/dataframe/setop.py +2 -2
  198. teradataml/dataframe/sql.py +840 -33
  199. teradataml/dataframe/window.py +1 -1
  200. teradataml/dbutils/dbutils.py +878 -34
  201. teradataml/dbutils/filemgr.py +48 -1
  202. teradataml/geospatial/geodataframe.py +1 -1
  203. teradataml/geospatial/geodataframecolumn.py +1 -1
  204. teradataml/hyperparameter_tuner/optimizer.py +13 -13
  205. teradataml/lib/aed_0_1.dll +0 -0
  206. teradataml/opensource/__init__.py +1 -1
  207. teradataml/opensource/{sklearn/_class.py → _class.py} +102 -17
  208. teradataml/opensource/_lightgbm.py +950 -0
  209. teradataml/opensource/{sklearn/_wrapper_utils.py → _wrapper_utils.py} +1 -2
  210. teradataml/opensource/{sklearn/constants.py → constants.py} +13 -10
  211. teradataml/opensource/sklearn/__init__.py +0 -1
  212. teradataml/opensource/sklearn/_sklearn_wrapper.py +1019 -574
  213. teradataml/options/__init__.py +9 -23
  214. teradataml/options/configure.py +42 -4
  215. teradataml/options/display.py +2 -2
  216. teradataml/plot/axis.py +4 -4
  217. teradataml/scriptmgmt/UserEnv.py +13 -9
  218. teradataml/scriptmgmt/lls_utils.py +77 -23
  219. teradataml/store/__init__.py +13 -0
  220. teradataml/store/feature_store/__init__.py +0 -0
  221. teradataml/store/feature_store/constants.py +291 -0
  222. teradataml/store/feature_store/feature_store.py +2223 -0
  223. teradataml/store/feature_store/models.py +1505 -0
  224. teradataml/store/vector_store/__init__.py +1586 -0
  225. teradataml/table_operators/Script.py +2 -2
  226. teradataml/table_operators/TableOperator.py +106 -20
  227. teradataml/table_operators/query_generator.py +3 -0
  228. teradataml/table_operators/table_operator_query_generator.py +3 -1
  229. teradataml/table_operators/table_operator_util.py +102 -56
  230. teradataml/table_operators/templates/dataframe_register.template +69 -0
  231. teradataml/table_operators/templates/dataframe_udf.template +63 -0
  232. teradataml/telemetry_utils/__init__.py +0 -0
  233. teradataml/telemetry_utils/queryband.py +52 -0
  234. teradataml/utils/dtypes.py +4 -2
  235. teradataml/utils/validators.py +34 -2
  236. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/METADATA +311 -3
  237. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/RECORD +240 -157
  238. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/WHEEL +0 -0
  239. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/top_level.txt +0 -0
  240. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/zip-safe +0 -0
@@ -0,0 +1,236 @@
1
+ def IDWT(data1=None, data1_filter_expr=None, data2=None,
2
+ data2_filter_expr=None, wavelet=None, mode="symmetric",
3
+ part=None, input_fmt_input_mode=None,
4
+ output_fmt_index_style="NUMERICAL_SEQUENCE",
5
+ **generic_arguments):
6
+ """
7
+ DESCRIPTION:
8
+ IDWT() is a function that performs inverse discrete wavelet transform (IDWT).
9
+
10
+ PARAMETERS:
11
+ data1:
12
+ Required Argument.
13
+ Specifies the input series. Multiple
14
+ payloads are supported, and each payload column is
15
+ transformed independently. Only REAL or MULTIVAR_REAL
16
+ payload content types are supported.
17
+ Types: TDSeries
18
+
19
+ data1_filter_expr:
20
+ Optional Argument.
21
+ Specifies the filter expression for "data1".
22
+ Types: ColumnExpression
23
+
24
+ data2:
25
+ Optional Argument.
26
+ Specifies the input series. The series specifies the filter.
27
+ It should have two payload columns corresponding to low
28
+ and high pass filters.
29
+ Only MULTIVAR_REAL payload content type is supported.
30
+ Types: TDSeries
31
+
32
+ data2_filter_expr:
33
+ Optional Argument.
34
+ Specifies the filter expression for "data2".
35
+ Types: ColumnExpression
36
+
37
+ wavelet:
38
+ Optional Argument.
39
+ Specifies the name of the wavelet.
40
+ Permitted Values:
41
+ * Daubechies: 'db1' or 'haar', 'db2', 'db3', .... ,'db38'
42
+ * Coiflets: 'coif1', 'coif2', ... , 'coif17'
43
+ * Symlets: 'sym2', 'sym3', ... ,' sym20'
44
+ * Discrete Meyer: 'dmey'
45
+ * Biorthogonal: 'bior1.1', 'bior1.3', 'bior1.5',
46
+ 'bior2.2', 'bior2.4', 'bior2.6',
47
+ 'bior2.8', 'bior3.1', 'bior3.3',
48
+ 'bior3.5', 'bior3.7', 'bior3.9',
49
+ 'bior4.4', 'bior5.5', 'bior6.8'
50
+ * Reverse Biorthogonal: 'rbio1.1', 'rbio1.3',
51
+ 'rbio1.5' 'rbio2.2',
52
+ 'rbio2.4', 'rbio2.6',
53
+ 'rbio2.8', 'rbio3.1',
54
+ 'rbio3.3', 'rbio3.5',
55
+ 'rbio3.7','rbio3.9',
56
+ 'rbio4.4', 'rbio5.5',
57
+ 'rbio6.8'
58
+ Note:
59
+ * If 'wavelet' is specified, do not include a second
60
+ input series for the function. Otherwise, include
61
+ a second input series to provide the filter.
62
+ * Data type is case-sensitive.
63
+ Types: str
64
+
65
+ mode:
66
+ Optional Argument.
67
+ Specifies the signal extension mode.
68
+ Data type is case-insensitive.
69
+ Permitted Values:
70
+ * symmetric, sym, symh
71
+ * reflect, symw
72
+ * smooth, spd, sp1
73
+ * constant, sp0
74
+ * zero, zpd
75
+ * periodic, ppd
76
+ * periodization, per
77
+ * antisymmetric, asym, asymh
78
+ * antireflect, asymw
79
+ Default Value: symmetric
80
+ Types: str
81
+
82
+ part:
83
+ Optional Argument.
84
+ Specifies the indicator that the input is partial decomposition
85
+ result.
86
+ Note:
87
+ Data type is case-insensitive.
88
+ Permitted Values:
89
+ * a - the approximation
90
+ * d - the detail of decomposition of result.
91
+ Types: str
92
+
93
+ input_fmt_input_mode:
94
+ Optional Argument.
95
+ Specifies the input mode supported by the function.
96
+ When there are two input series, then the input_fmt_input_mode
97
+ specification is mandatory.
98
+ Permitted Values:
99
+ * ONE2ONE: Both the primary and secondary series
100
+ specifications contain a series name which
101
+ identifies the two series in the function.
102
+ * MANY2ONE: The MANY specification is the primary series
103
+ declaration. The secondary series specification
104
+ contains a series name that identifies the single
105
+ secondary series.
106
+ * MATCH: Both series are defined by their respective series
107
+ specification instance name declarations.
108
+ Types: str
109
+
110
+ output_fmt_index_style:
111
+ Optional Argument.
112
+ Specifies the index style of the output format.
113
+ Permitted Values: NUMERICAL_SEQUENCE
114
+ Default Value: NUMERICAL_SEQUENCE
115
+ Types: str
116
+
117
+ **generic_arguments:
118
+ Specifies the generic keyword arguments of UAF functions.
119
+ Below are the generic keyword arguments:
120
+ persist:
121
+ Optional Argument.
122
+ Specifies whether to persist the results of the
123
+ function in a table or not. When set to True,
124
+ results are persisted in a table; otherwise,
125
+ results are garbage collected at the end of the
126
+ session.
127
+ Note that, when UAF function is executed, an
128
+ analytic result table (ART) is created.
129
+ Default Value: False
130
+ Types: bool
131
+
132
+ volatile:
133
+ Optional Argument.
134
+ Specifies whether to put the results of the
135
+ function in a volatile ART or not. When set to
136
+ True, results are stored in a volatile ART,
137
+ otherwise not.
138
+ Default Value: False
139
+ Types: bool
140
+
141
+ output_table_name:
142
+ Optional Argument.
143
+ Specifies the name of the table to store results.
144
+ If not specified, a unique table name is internally
145
+ generated.
146
+ Types: str
147
+
148
+ output_db_name:
149
+ Optional Argument.
150
+ Specifies the name of the database to create output
151
+ table into. If not specified, table is created into
152
+ database specified by the user at the time of context
153
+ creation or configuration parameter. Argument is ignored,
154
+ if "output_table_name" is not specified.
155
+ Types: str
156
+
157
+
158
+ RETURNS:
159
+ Instance of IDWT.
160
+ Output teradataml DataFrames can be accessed using attribute
161
+ references, such as IDWT_obj.<attribute_name>.
162
+ Output teradataml DataFrame attribute name is:
163
+ 1. result
164
+
165
+
166
+ RAISES:
167
+ TeradataMlException, TypeError, ValueError
168
+
169
+
170
+ EXAMPLES:
171
+ # Notes:
172
+ # 1. Get the connection to Vantage, before importing the
173
+ # function in user space.
174
+ # 2. User can import the function, if it is available on
175
+ # Vantage user is connected to.
176
+ # 3. To check the list of UAF analytic functions available
177
+ # on Vantage user connected to, use
178
+ # "display_analytic_functions()".
179
+
180
+ # Check the list of available UAF analytic functions.
181
+ display_analytic_functions(type="UAF")
182
+
183
+ # Import function IDWT.
184
+ from teradataml import IDWT
185
+
186
+ # Load the example data.
187
+ load_example_data("uaf", ["idwt_dataTable", "idwt_filterTable"])
188
+
189
+ # Create teradataml DataFrame objects.
190
+ data1 = DataFrame.from_table("idwt_dataTable")
191
+ data2 = DataFrame.from_table("idwt_filterTable")
192
+
193
+ # Create teradataml TDSeries objects.
194
+ data1_series_df = TDSeries(data=data1,
195
+ id="id",
196
+ row_index="rowi",
197
+ row_index_style="SEQUENCE",
198
+ payload_field=["approx"],
199
+ payload_content="REAL")
200
+
201
+ data2_series_df = TDSeries(data=data2,
202
+ id="id",
203
+ row_index="seq",
204
+ row_index_style="SEQUENCE",
205
+ payload_field=["lo", "hi"],
206
+ payload_content="MULTIVAR_REAL")
207
+
208
+
209
+ # Example 1: Perform inverse discrete wavelet transform using 2 series as input.
210
+ uaf_out = IDWT(data1=data1_series_df,
211
+ data2=data2_series_df,
212
+ data2_filter_expr=data2.id==1,
213
+ input_fmt_input_mode="MANY2ONE",
214
+ part='a')
215
+
216
+ # Print the result DataFrame.
217
+ print(uaf_out.result)
218
+
219
+ # Example 2: Perform inverse discrete wavelet transform using 1 series as input and wavelet parameter.
220
+
221
+ # Create teradataml TDSeries objects.
222
+ data_series_df = TDSeries(data=data1,
223
+ id="id",
224
+ row_index="rowi",
225
+ row_index_style="SEQUENCE",
226
+ payload_field=["approx", "detail"],
227
+ payload_content="MULTIVAR_REAL")
228
+
229
+ uaf_out = IDWT(data1=data_series_df,
230
+ wavelet='haar')
231
+
232
+ # Print the result DataFrame.
233
+ print(uaf_out.result)
234
+
235
+ """
236
+
@@ -0,0 +1,226 @@
1
+ def IDWT2D(data1=None, data1_filter_expr=None, data2=None,
2
+ data2_filter_expr=None, wavelet=None, mode="symmetric",
3
+ input_fmt_input_mode=None,
4
+ output_fmt_index_style="NUMERICAL_SEQUENCE",
5
+ **generic_arguments):
6
+ """
7
+ DESCRIPTION:
8
+ IDWT2D() function performs inverse discrete wavelet transform
9
+ (IDWT) for two-dimensional data. The algorithm is applied
10
+ first horizontally by row axis, then vertically by column
11
+ axis.
12
+
13
+ PARAMETERS:
14
+ data1:
15
+ Required Argument.
16
+ Specifies the input matrix. Multiple
17
+ payloads are supported, and each payload column is
18
+ transformed independently. Only MULTIVAR_REAL payload
19
+ content type is supported.
20
+ Types: TDMatrix
21
+
22
+ data1_filter_expr:
23
+ Optional Argument.
24
+ Specifies the filter expression for "data1".
25
+ Types: ColumnExpression
26
+
27
+ data2:
28
+ Optional Argument.
29
+ Specifies the input series. The series specifies the filter.
30
+ It should have two payload columns corresponding to low and high
31
+ pass filters. Only MULTIVAR_REAL payload content type is supported.
32
+ Types: TDSeries
33
+
34
+ data2_filter_expr:
35
+ Optional Argument.
36
+ Specifies the filter expression for "data2".
37
+ Types: ColumnExpression
38
+
39
+ wavelet:
40
+ Optional Argument.
41
+ Specifies the name of the wavelet.
42
+ Option families and names are:
43
+ * Daubechies: 'db1' or 'haar', 'db2', 'db3', .... ,'db38'
44
+ * Coiflets: 'coif1', 'coif2', ... , 'coif17'
45
+ * Symlets: 'sym2', 'sym3', ... ,' sym20'
46
+ * Discrete Meyer: 'dmey'
47
+ * Biorthogonal: 'bior1.1', 'bior1.3', 'bior1.5', 'bior2.2',
48
+ 'bior2.4', 'bior2.6', 'bior2.8', 'bior3.1',
49
+ 'bior3.3', 'bior3.5', 'bior3.7', 'bior3.9',
50
+ 'bior4.4', 'bior5.5', 'bior6.8'
51
+ * Reverse Biorthogonal: 'rbio1.1', 'rbio1.3', 'rbio1.5'
52
+ 'rbio2.2', 'rbio2.4', 'rbio2.6',
53
+ 'rbio2.8', 'rbio3.1', 'rbio3.3',
54
+ 'rbio3.5', 'rbio3.7','rbio3.9',
55
+ 'rbio4.4', 'rbio5.5', 'rbio6.8'
56
+ Note:
57
+ * If 'wavelet' is specified, do not include a second
58
+ input series for the function. Otherwise, include
59
+ a second input series to provide the filter.
60
+ * Data type is case-sensitive.
61
+ Types: str
62
+
63
+ mode:
64
+ Optional Argument.
65
+ Specifies the signal extension mode.
66
+ Data type is case-insensitive.
67
+ Permitted Values:
68
+ * symmetric, sym, symh
69
+ * reflect, symw
70
+ * smooth, spd, sp1
71
+ * constant, sp0
72
+ * zero, zpd
73
+ * periodic, ppd
74
+ * periodization, per
75
+ * antisymmetric, asym, asymh
76
+ * antireflect, asymw
77
+ Default Value: symmetric
78
+ Types: str
79
+
80
+ input_fmt_input_mode:
81
+ Optional Argument.
82
+ Specifies the input mode supported by the function.
83
+ When there are two input series, then the "input_fmt_input_mode" .
84
+ specification is mandatory.
85
+ Permitted Values:
86
+ * ONE2ONE: Both the primary and secondary series specifications
87
+ contain a series name which identifies the two series
88
+ in the function.
89
+ * MANY2ONE: The MANY specification is the primary series
90
+ declaration. The secondary series specification
91
+ contains a series name that identifies the single
92
+ secondary series.
93
+ * MATCH: Both series are defined by their respective series
94
+ specification instance name declarations.
95
+ Types: str
96
+
97
+ output_fmt_index_style:
98
+ Optional Argument.
99
+ Specifies the index style of the output format.
100
+ Permitted Values: NUMERICAL_SEQUENCE
101
+ Default Value: NUMERICAL_SEQUENCE
102
+ Types: str
103
+
104
+ **generic_arguments:
105
+ Specifies the generic keyword arguments of UAF functions.
106
+ Below are the generic keyword arguments:
107
+ persist:
108
+ Optional Argument.
109
+ Specifies whether to persist the results of the
110
+ function in a table or not. When set to True,
111
+ results are persisted in a table; otherwise,
112
+ results are garbage collected at the end of the
113
+ session.
114
+ Note that, when UAF function is executed, an
115
+ analytic result table (ART) is created.
116
+ Default Value: False
117
+ Types: bool
118
+
119
+ volatile:
120
+ Optional Argument.
121
+ Specifies whether to put the results of the
122
+ function in a volatile ART or not. When set to
123
+ True, results are stored in a volatile ART,
124
+ otherwise not.
125
+ Default Value: False
126
+ Types: bool
127
+
128
+ output_table_name:
129
+ Optional Argument.
130
+ Specifies the name of the table to store results.
131
+ If not specified, a unique table name is internally
132
+ generated.
133
+ Types: str
134
+
135
+ output_db_name:
136
+ Optional Argument.
137
+ Specifies the name of the database to create output
138
+ table into. If not specified, table is created into
139
+ database specified by the user at the time of context
140
+ creation or configuration parameter. Argument is ignored,
141
+ if "output_table_name" is not specified.
142
+ Types: str
143
+
144
+
145
+ RETURNS:
146
+ Instance of IDWT2D.
147
+ Output teradataml DataFrames can be accessed using attribute
148
+ references, such as IDWT2D_obj.<attribute_name>.
149
+ Output teradataml DataFrame attribute name is:
150
+ 1. result
151
+
152
+
153
+ RAISES:
154
+ TeradataMlException, TypeError, ValueError
155
+
156
+
157
+ EXAMPLES:
158
+ # Notes:
159
+ # 1. Get the connection to Vantage, before importing the
160
+ # function in user space.
161
+ # 2. User can import the function, if it is available on
162
+ # Vantage user is connected to.
163
+ # 3. To check the list of UAF analytic functions available
164
+ # on Vantage user connected to, use
165
+ # "display_analytic_functions()".
166
+
167
+ # Check the list of available UAF analytic functions.
168
+ display_analytic_functions(type="UAF")
169
+
170
+ # Import function IDWT2D.
171
+ from teradataml import IDWT2D
172
+
173
+ # Load the example data.
174
+ load_example_data("uaf", ["idwt2d_dataTable", "idwt_filterTable"])
175
+
176
+ # Create teradataml DataFrame objects.
177
+ data1 = DataFrame.from_table("idwt2d_dataTable")
178
+ data2 = DataFrame.from_table("idwt_filterTable")
179
+
180
+ # Create teradataml TDMatrix object.
181
+ data1_matrix_df = TDMatrix(data=data1,
182
+ id="id",
183
+ row_index="y",
184
+ row_index_style="SEQUENCE",
185
+ column_index="x",
186
+ column_index_style="SEQUENCE",
187
+ payload_field="v",
188
+ payload_content="REAL")
189
+
190
+ # Execute DWT2D
191
+ uaf_out = DWT2D(data1=data1_matrix_df,
192
+ wavelet='haar')
193
+
194
+ # Example 1: Perform inverse discrete wavelet transform using TDAnalyticResult
195
+ # from DWT2D() as input and wavelet as 'haar'
196
+
197
+ # Create teradataml TDAnalyticResult object.
198
+ art_df = TDAnalyticResult(data=uaf_out.result)
199
+
200
+ uaf_out = IDWT2D(data1=art_df,
201
+ wavelet='haar')
202
+
203
+ # Print the result DataFrame.
204
+ print(uaf_out.result)
205
+
206
+ # Example 1: Perform inverse discrete wavelet transform using TDAnalyticResult from DWT2D()
207
+ # and TDSeries as input.
208
+
209
+ # Create teradataml TDSeries object.
210
+ data2_series_df = TDSeries(data=data2,
211
+ id="id",
212
+ row_index="seq",
213
+ row_index_style="SEQUENCE",
214
+ payload_field=["lo", "hi"],
215
+ payload_content="MULTIVAR_REAL")
216
+
217
+ uaf_out = IDWT2D(data1=art_df,
218
+ data2=data2_series_df,
219
+ data2_filter_expr=data2.id==1,
220
+ input_fmt_input_mode='MANY2ONE')
221
+
222
+ # Print the result DataFrame.
223
+ print(uaf_out.result)
224
+
225
+ """
226
+
@@ -0,0 +1,134 @@
1
+ def IQR(data=None, data_filter_expr=None, stat_metrics=False,
2
+ output_fmt_index_style="NUMERICAL_SEQUENCE",
3
+ **generic_arguments):
4
+ """
5
+ DESCRIPTION:
6
+ Anomaly detection identifies data points, events and observations that
7
+ deviate from the normal behavior of the data set.
8
+ Anomalous data can indicate critical incidents, such as a change in
9
+ consumer behavior or observations that are suspicious.
10
+ Anomalies in data are also called standard deviations, outliers, noise,
11
+ novelties, and exceptions.
12
+
13
+ IQR() uses interquartile range for anomaly detection. Any data point
14
+ that falls outside of 1.5 times of an interquartile range below
15
+ the first quartile and above the third quartile is considered an outlier.
16
+ The IQR() function creates a two-layered ART table.
17
+
18
+
19
+ PARAMETERS:
20
+ data:
21
+ Required Argument.
22
+ Specifies the time series whose value can be REAL or MULTIVAR_REAL.
23
+ Types: TDSeries
24
+
25
+ data_filter_expr:
26
+ Optional Argument.
27
+ Specifies the filter expression for "data".
28
+ Types: ColumnExpression
29
+
30
+ stat_metrics:
31
+ Optional Argument.
32
+ Specifies the indicator for the secondary layer
33
+ to indicate the number of outliers.
34
+ Default Value: False
35
+ Types: bool
36
+
37
+ output_fmt_index_style:
38
+ Optional Argument.
39
+ Specifies the INDEX_STYLE of the output format.
40
+ Permitted Values: NUMERICAL_SEQUENCE
41
+ Default Value: NUMERICAL_SEQUENCE
42
+ Types: str
43
+
44
+ **generic_arguments:
45
+ Specifies the generic keyword arguments of UAF functions.
46
+ Below are the generic keyword arguments:
47
+ persist:
48
+ Optional Argument.
49
+ Specifies whether to persist the results of the
50
+ function in a table or not. When set to True,
51
+ results are persisted in a table; otherwise,
52
+ results are garbage collected at the end of the
53
+ session.
54
+ Note that, when UAF function is executed, an
55
+ analytic result table (ART) is created.
56
+ Default Value: False
57
+ Types: bool
58
+
59
+ volatile:
60
+ Optional Argument.
61
+ Specifies whether to put the results of the
62
+ function in a volatile ART or not. When set to
63
+ True, results are stored in a volatile ART,
64
+ otherwise not.
65
+ Default Value: False
66
+ Types: bool
67
+
68
+ output_table_name:
69
+ Optional Argument.
70
+ Specifies the name of the table to store results.
71
+ If not specified, a unique table name is internally
72
+ generated.
73
+ Types: str
74
+
75
+ output_db_name:
76
+ Optional Argument.
77
+ Specifies the name of the database to create output
78
+ table into. If not specified, table is created into
79
+ database specified by the user at the time of context
80
+ creation or configuration parameter. Argument is ignored,
81
+ if "output_table_name" is not specified.
82
+ Types: str
83
+
84
+
85
+ RETURNS:
86
+ Instance of IQR.
87
+ Output teradataml DataFrames can be accessed using attribute
88
+ references, such as IQR_obj.<attribute_name>.
89
+ Output teradataml DataFrame attribute names are:
90
+ 1. result
91
+ 2. statsdata
92
+ 3. fitmetadata
93
+
94
+
95
+ RAISES:
96
+ TeradataMlException, TypeError, ValueError
97
+
98
+
99
+ EXAMPLES:
100
+ # Notes:
101
+ # 1. Get the connection to Vantage, before importing the
102
+ # function in user space.
103
+ # 2. User can import the function, if it is available on
104
+ # Vantage user is connected to.
105
+ # 3. To check the list of UAF analytic functions available
106
+ # on Vantage user connected to, use
107
+ # "display_analytic_functions()".
108
+
109
+ # Check the list of available UAF analytic functions.
110
+ display_analytic_functions(type="UAF")
111
+
112
+ # Load the example data.
113
+ load_example_data("uaf", ["real_values"])
114
+
115
+ # Create teradataml DataFrame object.
116
+ data = DataFrame.from_table("real_values")
117
+
118
+ # Create teradataml TDSeries object.
119
+ data_series_df = TDSeries(data=data,
120
+ id="id",
121
+ row_index="TD_TIMECODE",
122
+ payload_field="val",
123
+ payload_content="REAL")
124
+
125
+ # Example 1: Detect which and how many values are considered outliers.
126
+ uaf_out = IQR(data=data_series_df,
127
+ stat_metrics=True)
128
+
129
+ # Print the result DataFrames.
130
+ print(uaf_out.result)
131
+ print(uaf_out.statsdata)
132
+
133
+ """
134
+
@@ -10,7 +10,7 @@ def LineSpec(data=None, data_filter_expr=None, freq_style="K_INTEGRAL",
10
10
  2. Use ArimaValidate() to validate spectral candidates.
11
11
  3. Use LineSpec() with "freq_style" parameter set to K_PERIODICITY
12
12
  to perform spectral analysis.
13
- 4. Use Plot() to plot the results.
13
+ 4. Use DataFrame.plot() to plot the results.
14
14
  5. Compute the test statistic.
15
15
  6. Use SignifPeriodicities() on the periodicities of interest.
16
16
  More than one periodicity can be entered using the "periodicities"
@@ -24,8 +24,8 @@ def LinearRegr(data=None, data_filter_expr=None, variables_count=2,
24
24
  data:
25
25
  Required Argument.
26
26
  Specifies an input time series with the following payload characteristics:
27
- * CONTENT value is MULTIVAR_REAL.
28
- * FIELDS has two required fields (response variable and
27
+ * "payload_content" value is MULTIVAR_REAL.
28
+ * "payload_fields" has two required fields (response variable and
29
29
  explanatory variable, in that order) and one optional
30
30
  field (weights).
31
31
  Types: TDSeries
@@ -52,8 +52,8 @@ def MAMean(data=None, data_filter_expr=None, forecast_periods=None,
52
52
  fit_metrics:
53
53
  Optional Argument.
54
54
  Specifies a flag to generate the secondary result set that contains the model metadata
55
- statistics. when set to True, function generate the secondary result set,otherwise
56
- not.The generated result set can be retrieved using the attribute fitmetadata of
55
+ statistics. When set to True, function generate the secondary result set, otherwise
56
+ not. The generated result set can be retrieved using the attribute fitmetadata of
57
57
  the function output.
58
58
  Default Value: False
59
59
  Types: bool
@@ -61,7 +61,7 @@ def MAMean(data=None, data_filter_expr=None, forecast_periods=None,
61
61
  residuals:
62
62
  Optional Argument.
63
63
  Specifies a flag to generate the tertiary result set that contains the model residuals.
64
- when set to True, means generate the tertiary result set, otherwise not.
64
+ When set to True, means generate the tertiary result set, otherwise not.
65
65
  The generated result set can be retrieved using the attribute fitresiduals of
66
66
  the function output.
67
67
  Default Value: False