teradataml 20.0.0.1__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.

Files changed (200) hide show
  1. teradataml/LICENSE.pdf +0 -0
  2. teradataml/README.md +112 -0
  3. teradataml/__init__.py +6 -3
  4. teradataml/_version.py +1 -1
  5. teradataml/analytics/__init__.py +3 -2
  6. teradataml/analytics/analytic_function_executor.py +224 -16
  7. teradataml/analytics/analytic_query_generator.py +92 -0
  8. teradataml/analytics/byom/__init__.py +3 -2
  9. teradataml/analytics/json_parser/metadata.py +1 -0
  10. teradataml/analytics/json_parser/utils.py +6 -4
  11. teradataml/analytics/meta_class.py +40 -1
  12. teradataml/analytics/sqle/DecisionTreePredict.py +1 -1
  13. teradataml/analytics/sqle/__init__.py +10 -2
  14. teradataml/analytics/table_operator/__init__.py +3 -2
  15. teradataml/analytics/uaf/__init__.py +21 -2
  16. teradataml/analytics/utils.py +62 -1
  17. teradataml/analytics/valib.py +1 -1
  18. teradataml/automl/__init__.py +1502 -323
  19. teradataml/automl/custom_json_utils.py +139 -61
  20. teradataml/automl/data_preparation.py +245 -306
  21. teradataml/automl/data_transformation.py +32 -12
  22. teradataml/automl/feature_engineering.py +313 -82
  23. teradataml/automl/model_evaluation.py +44 -35
  24. teradataml/automl/model_training.py +109 -146
  25. teradataml/catalog/byom.py +8 -8
  26. teradataml/clients/pkce_client.py +1 -1
  27. teradataml/common/constants.py +37 -0
  28. teradataml/common/deprecations.py +13 -7
  29. teradataml/common/garbagecollector.py +151 -120
  30. teradataml/common/messagecodes.py +4 -1
  31. teradataml/common/messages.py +2 -1
  32. teradataml/common/sqlbundle.py +1 -1
  33. teradataml/common/utils.py +97 -11
  34. teradataml/common/wrapper_utils.py +1 -1
  35. teradataml/context/context.py +72 -2
  36. teradataml/data/complaints_test_tokenized.csv +353 -0
  37. teradataml/data/complaints_tokens_model.csv +348 -0
  38. teradataml/data/covid_confirm_sd.csv +83 -0
  39. teradataml/data/dataframe_example.json +10 -0
  40. teradataml/data/docs/sqle/docs_17_20/CFilter.py +132 -0
  41. teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +162 -0
  42. teradataml/data/docs/sqle/docs_17_20/OutlierFilterFit.py +2 -0
  43. teradataml/data/docs/sqle/docs_17_20/Pivoting.py +279 -0
  44. teradataml/data/docs/sqle/docs_17_20/Shap.py +197 -0
  45. teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +189 -0
  46. teradataml/data/docs/sqle/docs_17_20/TFIDF.py +142 -0
  47. teradataml/data/docs/sqle/docs_17_20/Unpivoting.py +216 -0
  48. teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -10
  49. teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +1 -1
  50. teradataml/data/docs/uaf/docs_17_20/ArimaForecast.py +35 -5
  51. teradataml/data/docs/uaf/docs_17_20/ArimaValidate.py +3 -1
  52. teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +293 -0
  53. teradataml/data/docs/uaf/docs_17_20/AutoArima.py +354 -0
  54. teradataml/data/docs/uaf/docs_17_20/BreuschGodfrey.py +3 -2
  55. teradataml/data/docs/uaf/docs_17_20/BreuschPaganGodfrey.py +1 -1
  56. teradataml/data/docs/uaf/docs_17_20/Convolve.py +13 -10
  57. teradataml/data/docs/uaf/docs_17_20/Convolve2.py +4 -1
  58. teradataml/data/docs/uaf/docs_17_20/CumulPeriodogram.py +5 -4
  59. teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +4 -4
  60. teradataml/data/docs/uaf/docs_17_20/DWT.py +235 -0
  61. teradataml/data/docs/uaf/docs_17_20/DWT2D.py +214 -0
  62. teradataml/data/docs/uaf/docs_17_20/DurbinWatson.py +1 -1
  63. teradataml/data/docs/uaf/docs_17_20/ExtractResults.py +1 -1
  64. teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +160 -0
  65. teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +1 -1
  66. teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +9 -31
  67. teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +4 -2
  68. teradataml/data/docs/uaf/docs_17_20/IDFFT2.py +1 -8
  69. teradataml/data/docs/uaf/docs_17_20/IDWT.py +236 -0
  70. teradataml/data/docs/uaf/docs_17_20/IDWT2D.py +226 -0
  71. teradataml/data/docs/uaf/docs_17_20/IQR.py +134 -0
  72. teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
  73. teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +2 -2
  74. teradataml/data/docs/uaf/docs_17_20/MAMean.py +3 -3
  75. teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +297 -0
  76. teradataml/data/docs/uaf/docs_17_20/MatrixMultiply.py +15 -6
  77. teradataml/data/docs/uaf/docs_17_20/PACF.py +0 -1
  78. teradataml/data/docs/uaf/docs_17_20/Portman.py +2 -2
  79. teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
  80. teradataml/data/docs/uaf/docs_17_20/Resample.py +9 -1
  81. teradataml/data/docs/uaf/docs_17_20/SAX.py +246 -0
  82. teradataml/data/docs/uaf/docs_17_20/SeasonalNormalize.py +17 -10
  83. teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
  84. teradataml/data/docs/uaf/docs_17_20/WhitesGeneral.py +3 -1
  85. teradataml/data/docs/uaf/docs_17_20/WindowDFFT.py +368 -0
  86. teradataml/data/dwt2d_dataTable.csv +65 -0
  87. teradataml/data/dwt_dataTable.csv +8 -0
  88. teradataml/data/dwt_filterTable.csv +3 -0
  89. teradataml/data/finance_data4.csv +13 -0
  90. teradataml/data/grocery_transaction.csv +19 -0
  91. teradataml/data/idwt2d_dataTable.csv +5 -0
  92. teradataml/data/idwt_dataTable.csv +8 -0
  93. teradataml/data/idwt_filterTable.csv +3 -0
  94. teradataml/data/interval_data.csv +5 -0
  95. teradataml/data/jsons/paired_functions.json +14 -0
  96. teradataml/data/jsons/sqle/17.20/TD_CFilter.json +118 -0
  97. teradataml/data/jsons/sqle/17.20/TD_NaiveBayes.json +193 -0
  98. teradataml/data/jsons/sqle/17.20/TD_NaiveBayesPredict.json +212 -0
  99. teradataml/data/jsons/sqle/17.20/TD_OneClassSVM.json +9 -9
  100. teradataml/data/jsons/sqle/17.20/TD_Pivoting.json +280 -0
  101. teradataml/data/jsons/sqle/17.20/TD_Shap.json +222 -0
  102. teradataml/data/jsons/sqle/17.20/TD_TFIDF.json +162 -0
  103. teradataml/data/jsons/sqle/17.20/TD_Unpivoting.json +235 -0
  104. teradataml/data/jsons/storedprocedure/17.20/TD_FILTERFACTORY1D.json +150 -0
  105. teradataml/data/jsons/uaf/17.20/TD_ACF.json +1 -18
  106. teradataml/data/jsons/uaf/17.20/TD_ARIMAESTIMATE.json +3 -16
  107. teradataml/data/jsons/uaf/17.20/TD_ARIMAFORECAST.json +0 -3
  108. teradataml/data/jsons/uaf/17.20/TD_ARIMAVALIDATE.json +5 -3
  109. teradataml/data/jsons/uaf/17.20/TD_ARIMAXESTIMATE.json +362 -0
  110. teradataml/data/jsons/uaf/17.20/TD_AUTOARIMA.json +469 -0
  111. teradataml/data/jsons/uaf/17.20/TD_BINARYMATRIXOP.json +0 -3
  112. teradataml/data/jsons/uaf/17.20/TD_BINARYSERIESOP.json +0 -2
  113. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_GODFREY.json +2 -1
  114. teradataml/data/jsons/uaf/17.20/TD_BREUSCH_PAGAN_GODFREY.json +2 -5
  115. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE.json +3 -6
  116. teradataml/data/jsons/uaf/17.20/TD_CONVOLVE2.json +1 -3
  117. teradataml/data/jsons/uaf/17.20/TD_CUMUL_PERIODOGRAM.json +0 -5
  118. teradataml/data/jsons/uaf/17.20/TD_DFFT.json +1 -4
  119. teradataml/data/jsons/uaf/17.20/TD_DFFT2.json +2 -7
  120. teradataml/data/jsons/uaf/17.20/TD_DFFT2CONV.json +1 -2
  121. teradataml/data/jsons/uaf/17.20/TD_DFFTCONV.json +0 -2
  122. teradataml/data/jsons/uaf/17.20/TD_DTW.json +3 -6
  123. teradataml/data/jsons/uaf/17.20/TD_DWT.json +173 -0
  124. teradataml/data/jsons/uaf/17.20/TD_DWT2D.json +160 -0
  125. teradataml/data/jsons/uaf/17.20/TD_FITMETRICS.json +1 -1
  126. teradataml/data/jsons/uaf/17.20/TD_GOLDFELD_QUANDT.json +16 -30
  127. teradataml/data/jsons/uaf/17.20/{TD_HOLT_WINTERS_FORECAST.json → TD_HOLT_WINTERS_FORECASTER.json} +1 -2
  128. teradataml/data/jsons/uaf/17.20/TD_IDFFT2.json +1 -15
  129. teradataml/data/jsons/uaf/17.20/TD_IDWT.json +162 -0
  130. teradataml/data/jsons/uaf/17.20/TD_IDWT2D.json +149 -0
  131. teradataml/data/jsons/uaf/17.20/TD_IQR.json +117 -0
  132. teradataml/data/jsons/uaf/17.20/TD_LINEAR_REGR.json +1 -1
  133. teradataml/data/jsons/uaf/17.20/TD_LINESPEC.json +1 -1
  134. teradataml/data/jsons/uaf/17.20/TD_MAMEAN.json +1 -3
  135. teradataml/data/jsons/uaf/17.20/TD_MATRIX2IMAGE.json +209 -0
  136. teradataml/data/jsons/uaf/17.20/TD_PACF.json +2 -2
  137. teradataml/data/jsons/uaf/17.20/TD_POWERSPEC.json +5 -5
  138. teradataml/data/jsons/uaf/17.20/TD_RESAMPLE.json +48 -28
  139. teradataml/data/jsons/uaf/17.20/TD_SAX.json +208 -0
  140. teradataml/data/jsons/uaf/17.20/TD_SEASONALNORMALIZE.json +12 -6
  141. teradataml/data/jsons/uaf/17.20/TD_SIMPLEEXP.json +0 -1
  142. teradataml/data/jsons/uaf/17.20/TD_TRACKINGOP.json +8 -8
  143. teradataml/data/jsons/uaf/17.20/TD_UNDIFF.json +1 -1
  144. teradataml/data/jsons/uaf/17.20/TD_UNNORMALIZE.json +1 -1
  145. teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +400 -0
  146. teradataml/data/load_example_data.py +8 -2
  147. teradataml/data/naivebayestextclassifier_example.json +1 -1
  148. teradataml/data/naivebayestextclassifierpredict_example.json +11 -0
  149. teradataml/data/peppers.png +0 -0
  150. teradataml/data/real_values.csv +14 -0
  151. teradataml/data/sax_example.json +8 -0
  152. teradataml/data/scripts/deploy_script.py +1 -1
  153. teradataml/data/scripts/sklearn/sklearn_fit.py +17 -10
  154. teradataml/data/scripts/sklearn/sklearn_fit_predict.py +2 -2
  155. teradataml/data/scripts/sklearn/sklearn_function.template +30 -7
  156. teradataml/data/scripts/sklearn/sklearn_neighbors.py +1 -1
  157. teradataml/data/scripts/sklearn/sklearn_score.py +12 -3
  158. teradataml/data/scripts/sklearn/sklearn_transform.py +55 -4
  159. teradataml/data/star_pivot.csv +8 -0
  160. teradataml/data/templates/open_source_ml.json +2 -1
  161. teradataml/data/teradataml_example.json +20 -1
  162. teradataml/data/timestamp_data.csv +4 -0
  163. teradataml/data/titanic_dataset_unpivoted.csv +19 -0
  164. teradataml/data/uaf_example.json +55 -1
  165. teradataml/data/unpivot_example.json +15 -0
  166. teradataml/data/url_data.csv +9 -0
  167. teradataml/data/windowdfft.csv +16 -0
  168. teradataml/dataframe/copy_to.py +1 -1
  169. teradataml/dataframe/data_transfer.py +5 -3
  170. teradataml/dataframe/dataframe.py +474 -41
  171. teradataml/dataframe/fastload.py +3 -3
  172. teradataml/dataframe/functions.py +339 -0
  173. teradataml/dataframe/row.py +160 -0
  174. teradataml/dataframe/setop.py +2 -2
  175. teradataml/dataframe/sql.py +658 -20
  176. teradataml/dataframe/window.py +1 -1
  177. teradataml/dbutils/dbutils.py +322 -16
  178. teradataml/geospatial/geodataframe.py +1 -1
  179. teradataml/geospatial/geodataframecolumn.py +1 -1
  180. teradataml/hyperparameter_tuner/optimizer.py +13 -13
  181. teradataml/lib/aed_0_1.dll +0 -0
  182. teradataml/opensource/sklearn/_sklearn_wrapper.py +154 -69
  183. teradataml/options/__init__.py +3 -1
  184. teradataml/options/configure.py +14 -2
  185. teradataml/options/display.py +2 -2
  186. teradataml/plot/axis.py +4 -4
  187. teradataml/scriptmgmt/UserEnv.py +10 -6
  188. teradataml/scriptmgmt/lls_utils.py +3 -2
  189. teradataml/table_operators/Script.py +2 -2
  190. teradataml/table_operators/TableOperator.py +106 -20
  191. teradataml/table_operators/table_operator_util.py +88 -41
  192. teradataml/table_operators/templates/dataframe_udf.template +63 -0
  193. teradataml/telemetry_utils/__init__.py +0 -0
  194. teradataml/telemetry_utils/queryband.py +52 -0
  195. teradataml/utils/validators.py +1 -1
  196. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.2.dist-info}/METADATA +115 -2
  197. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.2.dist-info}/RECORD +200 -140
  198. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.2.dist-info}/WHEEL +0 -0
  199. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.2.dist-info}/top_level.txt +0 -0
  200. {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.2.dist-info}/zip-safe +0 -0
@@ -0,0 +1,160 @@
1
+ def FilterFactory1d(filter_id=None, filter_type=None,
2
+ window_type=None, filter_length=None,
3
+ transition_bandwidth=None, low_cutoff=None,
4
+ high_cutoff=None, sampling_frequency=None,
5
+ filter_description=None, **generic_arguments):
6
+ """
7
+ DESCRIPTION:
8
+ FilterFactory1d() function creates finite impulse response (FIR)
9
+ filter coefficients. The filters are based on certain parameters
10
+ and stored into a common table for reuse.
11
+ Note:
12
+ User needs EXECUTE PROCEDURE privelge on SYSLIB
13
+
14
+ PARAMETERS:
15
+ filter_id:
16
+ Required Argument.
17
+ Specifies the filter identifier, based on filter coefficients
18
+ stored in the table.
19
+ Types: int
20
+
21
+ filter_type:
22
+ Required Argument.
23
+ Specifies the type of filter to generate.
24
+ Permitted Values:
25
+ * LOWPASS - To remove frequencies above low_cutoff.
26
+ * HIGHPASS - To remove frequencies below high_cutoff.
27
+ * BANDPASS - To remove frequencies below low_cutoff and
28
+ above high_cutoff.
29
+ * BANDSTOP - To remove frequencies between low_cutoff
30
+ and high_cutoff.
31
+ Types: str
32
+
33
+ window_type:
34
+ Optional Argument.
35
+ Specifies the window function to the filter that maintains a
36
+ smooth drop-off to zero, and avoids extra artifacts in the
37
+ frequency domain. The default is to leave the filter
38
+ coefficients as they are, and not apply any windowing function.
39
+ Permitted Values: BLACKMAN, HAMMING, HANNING, BARTLETT
40
+ Types: str
41
+
42
+ filter_length:
43
+ Optional Argument.
44
+ Specifies the length of the filter to generate.
45
+ Overrides "transition_bandwidth" argument if both are supplied,
46
+ and renders the other an optional argument.
47
+ Default is approximately 4/("transition_bandwidth"/
48
+ "sampling_frequency").
49
+ Types: int
50
+
51
+ transition_bandwidth:
52
+ Optional Argument.
53
+ Specifies the maximum allowed size for the range of
54
+ frequencies for filter transitions between a passband and stopband.
55
+ This also determines the number of coefficients to be generated.
56
+ Value must be greater than 0.
57
+ A smaller value produces faster drop off at the cost of more coefficients.
58
+ Not used when "filter_length" is supplied.
59
+ Default is bandwidth from "filter_length".
60
+ Types: float
61
+
62
+ low_cutoff:
63
+ Optional Argument.
64
+ Specifies the lower frequency that change between a passband
65
+ and stopband occurs. It must be greater
66
+ than 0. It is not used by default with 'HIGHPASS' filter.
67
+ Types: float
68
+
69
+ high_cutoff:
70
+ Optional Argument.
71
+ Specifies the higher frequency that change
72
+ between a passband and stopband occurs. It must be greater
73
+ than 0 and not used by default with 'LOWPASS' filter.
74
+ Types: float
75
+
76
+ sampling_frequency:
77
+ Required Argument.
78
+ Specifies the frequency that the data to be filtered was
79
+ sampled. It must be greater than 0.
80
+ Types: float
81
+
82
+ filter_description:
83
+ Optional Argument.
84
+ Specifies the description for the filter coefficients
85
+ that contain the same filter ID. Description is only
86
+ written to one row for each filter generated, and
87
+ ROW_I is 0. Default is a string describing parameters.
88
+ Types: str
89
+
90
+ **generic_arguments:
91
+ Specifies the generic keyword arguments of UAF functions.
92
+ Below are the generic keyword arguments:
93
+ persist:
94
+ Optional Argument.
95
+ Specifies whether to persist the results of the
96
+ function in a table or not. When set to True,
97
+ results are persisted in a table; otherwise,
98
+ results are garbage collected at the end of the
99
+ session.
100
+ Note that, when UAF function is executed, an
101
+ analytic result table (ART) is created.
102
+ Default Value: False
103
+ Types: bool
104
+
105
+ volatile:
106
+ Optional Argument.
107
+ Specifies whether to put the results of the
108
+ function in a volatile ART or not. When set to
109
+ True, results are stored in a volatile ART,
110
+ otherwise not.
111
+ Default Value: False
112
+ Types: bool
113
+
114
+ output_table_name:
115
+ Optional Argument.
116
+ Specifies the name of the table to store results.
117
+ If not specified, a unique table name is internally
118
+ generated.
119
+ Types: str
120
+
121
+ output_db_name:
122
+ Optional Argument.
123
+ Specifies the name of the database to create output
124
+ table into. If not specified, table is created into
125
+ database specified by the user at the time of context
126
+ creation or configuration parameter. Argument is ignored,
127
+ if "output_table_name" is not specified.
128
+ Types: str
129
+
130
+ RAISES:
131
+ TeradataMlException, TypeError, ValueError
132
+
133
+
134
+ EXAMPLES:
135
+ # Notes:
136
+ # 1. Get the connection to Vantage, before importing the
137
+ # function in user space.
138
+ # 2. User can import the function, if it is available on
139
+ # Vantage user is connected to.
140
+ # 3. To check the list of UAF analytic functions available
141
+ # on Vantage user connected to, use
142
+ # "display_analytic_functions()".
143
+
144
+ # Check the list of available UAF analytic functions.
145
+ display_analytic_functions(type="UAF")
146
+
147
+ # Import function FilterFactory1d.
148
+ from teradataml import FilterFactory1d
149
+
150
+ # Example 1: Create finite impulse response (FIR) filter coefficients.
151
+ res = FilterFactory1d(filter_id = 33,
152
+ filter_type = 'lowpass',
153
+ window_type = 'blackman',
154
+ transition_bandwidth = 20.0,
155
+ low_cutoff = 40.0,
156
+ sampling_frequency = 200)
157
+ print(res.result)
158
+
159
+ """
160
+
@@ -19,7 +19,7 @@ def GenseriesSinusoids(data=None, data_filter_expr=None, periodicities=None,
19
19
  exclude from the data set.
20
20
  * Use the BinarySeriesOp() function to subtract the generated series
21
21
  from the original series using "mathop" argument value as 'SUB'.
22
- * User the PowerSpec() function to verify that target periodicities
22
+ * Use the PowerSpec() function to verify that target periodicities
23
23
  have been removed from the original series.
24
24
 
25
25
 
@@ -1,6 +1,6 @@
1
1
  def GoldfeldQuandt(data=None, data_filter_expr=None,
2
- orig_regr_paramcnt=None, weights=False, formula=None,
3
- algorithm=None, start_idx=None, omit=None,
2
+ const_term=True, algorithm=None,
3
+ start_idx=None, omit=None,
4
4
  significance_level=None, test="GREATER",
5
5
  **generic_arguments):
6
6
  """
@@ -24,35 +24,15 @@ def GoldfeldQuandt(data=None, data_filter_expr=None,
24
24
  Specifies the filter expression for "data".
25
25
  Types: ColumnExpression
26
26
 
27
- orig_regr_paramcnt:
28
- Required Argument.
29
- Specifies the number of responses and explanatory variables
30
- present in the original regression.
31
- Types: int
32
-
33
- weights:
27
+ const_term:
34
28
  Optional Argument.
35
- Specifies whether the last series found in the payload
36
- is to be interpreted as a series of weights that can
37
- be used to perform a weighted least squares regression
38
- solution. When set to True, the last series is interpreted
39
- as series of weights, otherwise not.
40
- Default Value: False
29
+ Specifies the indicator of whether the regression performed should
30
+ use a Y-intercept coefficient.
31
+ When set to True, means the regression is performed on “Y=C+aX1+bX2+…”.
32
+ When set to False, means the regression is performed on “Y=aX1+bX2+…”.
33
+ Default Value: True
41
34
  Types: bool
42
35
 
43
- formula:
44
- Required Argument.
45
- Specifies the formula used in the regression operation.
46
- The name of the response variable must always be Y,
47
- and the name of the explanatory variable must always be X1.
48
- For example, "Y = B0 + B1 * X1".
49
- Notes:
50
- * The "formula" argument must be specified along with the
51
- "algorithm" argument.
52
- * Use the following link to refer the formula rules:
53
- "https://docs.teradata.com/r/Enterprise_IntelliFlex_VMware/Teradata-VantageTM-Unbounded-Array-Framework-Time-Series-Reference-17.20/Mathematic-Operators-and-Functions/Formula-Rules"
54
- Types: str
55
-
56
36
  algorithm:
57
37
  Required Argument.
58
38
  Specifies the algorithm used for the regression.
@@ -205,12 +185,10 @@ def GoldfeldQuandt(data=None, data_filter_expr=None,
205
185
  payload_field=["y1", "x1"],
206
186
  payload_content="MULTIVAR_REAL")
207
187
 
208
- # Execute GoldfeldQuandt for TDGenSeries.
188
+ # Execute GoldfeldQuandt.
209
189
  uaf_out = GoldfeldQuandt(data=data_series_df,
210
- formula="Y = B0 + B1*X1",
211
190
  omit=2.0,
212
191
  significance_level=0.05,
213
- orig_regr_paramcnt=2,
214
192
  algorithm="QR")
215
193
 
216
194
  # Print the result DataFrame.
@@ -1,5 +1,5 @@
1
1
  def HoltWintersForecaster(data=None, data_filter_expr=None, forecast_periods=None,
2
- alpha=None, beta=None, gamma=None, seasonal_periods=1,
2
+ alpha=None, beta=None, gamma=None, seasonal_periods=None,
3
3
  init_level=None, init_trend=None, init_season=None,
4
4
  model=None, fit_percentage=100,
5
5
  prediction_intervals="BOTH", fit_metrics=False,
@@ -67,7 +67,6 @@ def HoltWintersForecaster(data=None, data_filter_expr=None, forecast_periods=Non
67
67
  parameter is 3. Value must be greater than or equal to 1.
68
68
  Note:
69
69
  Required when "gamma" or "init_season" is specified.
70
- Default Value: 1
71
70
  Types: int
72
71
 
73
72
  init_level:
@@ -248,10 +247,13 @@ def HoltWintersForecaster(data=None, data_filter_expr=None, forecast_periods=Non
248
247
 
249
248
  # Print the result DataFrames.
250
249
  print(uaf_out.result)
250
+
251
251
  # Print the model statistics result.
252
252
  print(uaf_out.fitmetadata)
253
+
253
254
  # Print the selection metrics result.
254
255
  print(uaf_out.selmetrics)
256
+
255
257
  # Print the residuals statistics result.
256
258
  print(uaf_out.fitresiduals)
257
259
 
@@ -1,5 +1,5 @@
1
1
  def IDFFT2(data=None, data_filter_expr=None, human_readable=True,
2
- output_fmt_content=None, output_fmt_row_major=1,
2
+ output_fmt_content=None,
3
3
  **generic_arguments):
4
4
  """
5
5
  DESCRIPTION:
@@ -71,13 +71,6 @@ def IDFFT2(data=None, data_filter_expr=None, human_readable=True,
71
71
  MULTIVAR_AMPL_PHASE
72
72
  Types: str
73
73
 
74
- output_fmt_row_major:
75
- Optional Argument.
76
- Specifies whether the matrix output should be in a row-major-centric
77
- or column-major-centric manner.
78
- Default Value: True
79
- Types: bool
80
-
81
74
  **generic_arguments:
82
75
  Specifies the generic keyword arguments of UAF functions.
83
76
  Below are the generic keyword arguments:
@@ -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
+