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.
- teradataml/LICENSE-3RD-PARTY.pdf +0 -0
- teradataml/LICENSE.pdf +0 -0
- teradataml/README.md +306 -0
- teradataml/__init__.py +10 -3
- teradataml/_version.py +1 -1
- teradataml/analytics/__init__.py +3 -2
- teradataml/analytics/analytic_function_executor.py +299 -16
- teradataml/analytics/analytic_query_generator.py +92 -0
- teradataml/analytics/byom/__init__.py +3 -2
- teradataml/analytics/json_parser/metadata.py +13 -3
- teradataml/analytics/json_parser/utils.py +13 -6
- teradataml/analytics/meta_class.py +40 -1
- teradataml/analytics/sqle/DecisionTreePredict.py +1 -1
- teradataml/analytics/sqle/__init__.py +11 -2
- teradataml/analytics/table_operator/__init__.py +4 -3
- teradataml/analytics/uaf/__init__.py +21 -2
- teradataml/analytics/utils.py +66 -1
- teradataml/analytics/valib.py +1 -1
- teradataml/automl/__init__.py +1502 -323
- teradataml/automl/custom_json_utils.py +139 -61
- teradataml/automl/data_preparation.py +247 -307
- teradataml/automl/data_transformation.py +32 -12
- teradataml/automl/feature_engineering.py +325 -86
- teradataml/automl/model_evaluation.py +44 -35
- teradataml/automl/model_training.py +122 -153
- teradataml/catalog/byom.py +8 -8
- teradataml/clients/pkce_client.py +1 -1
- teradataml/common/__init__.py +2 -1
- teradataml/common/constants.py +72 -0
- teradataml/common/deprecations.py +13 -7
- teradataml/common/garbagecollector.py +152 -120
- teradataml/common/messagecodes.py +11 -2
- teradataml/common/messages.py +4 -1
- teradataml/common/sqlbundle.py +26 -4
- teradataml/common/utils.py +225 -14
- teradataml/common/wrapper_utils.py +1 -1
- teradataml/context/context.py +82 -2
- teradataml/data/SQL_Fundamentals.pdf +0 -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/dataframe_example.json +27 -1
- teradataml/data/docs/sqle/docs_17_20/CFilter.py +132 -0
- teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +162 -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/Shap.py +203 -0
- 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/TextParser.py +3 -3
- teradataml/data/docs/sqle/docs_17_20/Unpivoting.py +216 -0
- teradataml/data/docs/tableoperator/docs_17_20/Image2Matrix.py +118 -0
- 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/CopyArt.py +145 -0
- 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/DickeyFuller.py +18 -21
- 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/grocery_transaction.csv +19 -0
- teradataml/data/idwt2d_dataTable.csv +5 -0
- teradataml/data/idwt_dataTable.csv +8 -0
- teradataml/data/idwt_filterTable.csv +3 -0
- teradataml/data/interval_data.csv +5 -0
- teradataml/data/jsons/paired_functions.json +14 -0
- teradataml/data/jsons/sqle/17.20/TD_CFilter.json +118 -0
- 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_OneClassSVM.json +9 -9
- teradataml/data/jsons/sqle/17.20/TD_Pivoting.json +280 -0
- 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_TextParser.json +1 -1
- teradataml/data/jsons/sqle/17.20/TD_Unpivoting.json +235 -0
- teradataml/data/jsons/sqle/20.00/TD_KMeans.json +250 -0
- teradataml/data/jsons/sqle/20.00/TD_SMOTE.json +266 -0
- teradataml/data/jsons/sqle/20.00/TD_VectorDistance.json +278 -0
- teradataml/data/jsons/storedprocedure/17.20/TD_COPYART.json +71 -0
- teradataml/data/jsons/storedprocedure/17.20/TD_FILTERFACTORY1D.json +150 -0
- teradataml/data/jsons/tableoperator/17.20/IMAGE2MATRIX.json +53 -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_DICKEY_FULLER.json +10 -19
- 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 +210 -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 +410 -0
- teradataml/data/load_example_data.py +8 -2
- teradataml/data/medical_readings.csv +101 -0
- teradataml/data/naivebayestextclassifier_example.json +1 -1
- teradataml/data/naivebayestextclassifierpredict_example.json +11 -0
- teradataml/data/patient_profile.csv +101 -0
- teradataml/data/peppers.png +0 -0
- teradataml/data/real_values.csv +14 -0
- teradataml/data/sax_example.json +8 -0
- teradataml/data/scripts/deploy_script.py +1 -1
- teradataml/data/scripts/lightgbm/dataset.template +157 -0
- teradataml/data/scripts/lightgbm/lightgbm_class_functions.template +247 -0
- teradataml/data/scripts/lightgbm/lightgbm_function.template +216 -0
- teradataml/data/scripts/lightgbm/lightgbm_sklearn.template +159 -0
- teradataml/data/scripts/sklearn/sklearn_fit.py +194 -160
- teradataml/data/scripts/sklearn/sklearn_fit_predict.py +136 -115
- teradataml/data/scripts/sklearn/sklearn_function.template +34 -16
- teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +155 -137
- teradataml/data/scripts/sklearn/sklearn_neighbors.py +1 -1
- teradataml/data/scripts/sklearn/sklearn_score.py +12 -3
- teradataml/data/scripts/sklearn/sklearn_transform.py +162 -24
- teradataml/data/star_pivot.csv +8 -0
- teradataml/data/target_udt_data.csv +8 -0
- teradataml/data/templates/open_source_ml.json +3 -1
- teradataml/data/teradataml_example.json +20 -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/vectordistance_example.json +4 -0
- teradataml/data/windowdfft.csv +16 -0
- teradataml/dataframe/copy_to.py +1 -1
- teradataml/dataframe/data_transfer.py +5 -3
- teradataml/dataframe/dataframe.py +1002 -201
- teradataml/dataframe/fastload.py +3 -3
- teradataml/dataframe/functions.py +867 -0
- teradataml/dataframe/row.py +160 -0
- teradataml/dataframe/setop.py +2 -2
- teradataml/dataframe/sql.py +840 -33
- teradataml/dataframe/window.py +1 -1
- teradataml/dbutils/dbutils.py +878 -34
- teradataml/dbutils/filemgr.py +48 -1
- 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/__init__.py +1 -1
- teradataml/opensource/{sklearn/_class.py → _class.py} +102 -17
- teradataml/opensource/_lightgbm.py +950 -0
- teradataml/opensource/{sklearn/_wrapper_utils.py → _wrapper_utils.py} +1 -2
- teradataml/opensource/{sklearn/constants.py → constants.py} +13 -10
- teradataml/opensource/sklearn/__init__.py +0 -1
- teradataml/opensource/sklearn/_sklearn_wrapper.py +1019 -574
- teradataml/options/__init__.py +9 -23
- teradataml/options/configure.py +42 -4
- teradataml/options/display.py +2 -2
- teradataml/plot/axis.py +4 -4
- teradataml/scriptmgmt/UserEnv.py +13 -9
- teradataml/scriptmgmt/lls_utils.py +77 -23
- teradataml/store/__init__.py +13 -0
- teradataml/store/feature_store/__init__.py +0 -0
- teradataml/store/feature_store/constants.py +291 -0
- teradataml/store/feature_store/feature_store.py +2223 -0
- teradataml/store/feature_store/models.py +1505 -0
- teradataml/store/vector_store/__init__.py +1586 -0
- teradataml/table_operators/Script.py +2 -2
- teradataml/table_operators/TableOperator.py +106 -20
- teradataml/table_operators/query_generator.py +3 -0
- teradataml/table_operators/table_operator_query_generator.py +3 -1
- teradataml/table_operators/table_operator_util.py +102 -56
- teradataml/table_operators/templates/dataframe_register.template +69 -0
- 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/dtypes.py +4 -2
- teradataml/utils/validators.py +34 -2
- {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/METADATA +311 -3
- {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/RECORD +240 -157
- {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/WHEEL +0 -0
- {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/top_level.txt +0 -0
- {teradataml-20.0.0.1.dist-info → teradataml-20.0.0.3.dist-info}/zip-safe +0 -0
|
@@ -192,6 +192,45 @@ def _common_init(self, function_type, **kwargs):
|
|
|
192
192
|
elif function_type == 'byom':
|
|
193
193
|
from teradataml.analytics.analytic_function_executor import _BYOMFunctionExecutor
|
|
194
194
|
self.obj = _BYOMFunctionExecutor(self.__class__.__name__)._execute_function(**kwargs)
|
|
195
|
+
elif function_type == 'stored_procedure':
|
|
196
|
+
from teradataml.analytics.analytic_function_executor import _StoredProcedureExecutor
|
|
197
|
+
self.obj = _StoredProcedureExecutor(self.__class__.__name__)._execute_function(**kwargs)
|
|
195
198
|
else:
|
|
196
199
|
from teradataml.analytics.analytic_function_executor import _TableOperatorExecutor
|
|
197
|
-
self.obj = _TableOperatorExecutor(self.__class__.__name__)._execute_function(**kwargs)
|
|
200
|
+
self.obj = _TableOperatorExecutor(self.__class__.__name__)._execute_function(**kwargs)
|
|
201
|
+
|
|
202
|
+
def _common_dir(self):
|
|
203
|
+
"""
|
|
204
|
+
DESCRIPTION:
|
|
205
|
+
Function returns the attributes and/or names of the methods of the
|
|
206
|
+
Analytic function.
|
|
207
|
+
|
|
208
|
+
PARAMETERS:
|
|
209
|
+
None
|
|
210
|
+
|
|
211
|
+
RETURNS:
|
|
212
|
+
list
|
|
213
|
+
|
|
214
|
+
RAISES:
|
|
215
|
+
None
|
|
216
|
+
|
|
217
|
+
Examples:
|
|
218
|
+
# Load the data.
|
|
219
|
+
titanic_data = DataFrame.from_table("titanic")
|
|
220
|
+
bin_fit_ip = DataFrame.from_table("bin_fit_ip")
|
|
221
|
+
|
|
222
|
+
# Run the function.
|
|
223
|
+
bin_code_1 = BincodeFit(data=titanic_data,
|
|
224
|
+
fit_data=bin_fit_ip,
|
|
225
|
+
fit_data_order_column = ['minVal', 'maxVal'],
|
|
226
|
+
target_columns='age',
|
|
227
|
+
minvalue_column='minVal',
|
|
228
|
+
maxvalue_column='maxVal',
|
|
229
|
+
label_column='label',
|
|
230
|
+
method_type='Variable-Width',
|
|
231
|
+
label_prefix='label_prefix'
|
|
232
|
+
)
|
|
233
|
+
# Run dir on the function.
|
|
234
|
+
dir(bin_code_1)
|
|
235
|
+
"""
|
|
236
|
+
return [attr for attr in super(self.__class__, self).__dir__() if attr != 'obj']
|
|
@@ -223,7 +223,7 @@ class DecisionTreePredict:
|
|
|
223
223
|
|
|
224
224
|
# Check to make sure input table types are strings or data frame objects or of valid type.
|
|
225
225
|
self.__awu._validate_input_table_datatype(self.newdata, "newdata", None)
|
|
226
|
-
self.__awu._validate_input_table_datatype(self.object, "object",
|
|
226
|
+
self.__awu._validate_input_table_datatype(self.object, "object", reference_function_name=None)
|
|
227
227
|
|
|
228
228
|
# Check whether the input columns passed to the argument are not empty.
|
|
229
229
|
# Also check whether the input columns passed to the argument valid or not.
|
|
@@ -2,7 +2,7 @@ from teradataml.analytics.sqle.DecisionTreePredict import DecisionTreePredict
|
|
|
2
2
|
from teradataml.analytics.sqle.NaiveBayesPredict import NaiveBayesPredict
|
|
3
3
|
|
|
4
4
|
from teradataml.analytics.meta_class import _AnalyticFunction
|
|
5
|
-
from teradataml.analytics.meta_class import _common_init
|
|
5
|
+
from teradataml.analytics.meta_class import _common_init, _common_dir
|
|
6
6
|
from teradataml.analytics.json_parser.utils import _get_associated_parent_classes
|
|
7
7
|
|
|
8
8
|
_sqle_functions = ['ANOVA',
|
|
@@ -11,6 +11,7 @@ _sqle_functions = ['ANOVA',
|
|
|
11
11
|
'BincodeFit',
|
|
12
12
|
'BincodeTransform',
|
|
13
13
|
'CategoricalSummary',
|
|
14
|
+
'CFilter',
|
|
14
15
|
'ChiSq',
|
|
15
16
|
'ClassificationEvaluator',
|
|
16
17
|
'ColumnSummary',
|
|
@@ -33,6 +34,8 @@ _sqle_functions = ['ANOVA',
|
|
|
33
34
|
'KMeansPredict',
|
|
34
35
|
'KNN',
|
|
35
36
|
'MovingAverage',
|
|
37
|
+
'NaiveBayes',
|
|
38
|
+
'TDNaiveBayesPredict',
|
|
36
39
|
'NaiveBayesTextClassifierPredict',
|
|
37
40
|
'NaiveBayesTextClassifierTrainer',
|
|
38
41
|
'NGramSplitter',
|
|
@@ -49,6 +52,7 @@ _sqle_functions = ['ANOVA',
|
|
|
49
52
|
'OutlierFilterFit',
|
|
50
53
|
'OutlierFilterTransform',
|
|
51
54
|
'Pack',
|
|
55
|
+
'Pivoting',
|
|
52
56
|
'PolynomialFeaturesFit',
|
|
53
57
|
'PolynomialFeaturesTransform',
|
|
54
58
|
'QQNorm',
|
|
@@ -67,20 +71,24 @@ _sqle_functions = ['ANOVA',
|
|
|
67
71
|
'Silhouette',
|
|
68
72
|
'SimpleImputeFit',
|
|
69
73
|
'SimpleImputeTransform',
|
|
74
|
+
'SMOTE',
|
|
70
75
|
'StrApply',
|
|
71
76
|
'StringSimilarity',
|
|
72
77
|
'SVM',
|
|
73
78
|
'SVMPredict',
|
|
74
79
|
'SVMSparsePredict',
|
|
80
|
+
'Shap',
|
|
75
81
|
'TDGLMPredict',
|
|
76
82
|
'TDDecisionForestPredict',
|
|
77
83
|
'TargetEncodingFit',
|
|
78
84
|
'TargetEncodingTransform',
|
|
79
85
|
'TextParser',
|
|
86
|
+
'TFIDF',
|
|
80
87
|
'Transform',
|
|
81
88
|
'TrainTestSplit',
|
|
82
89
|
'UnivariateStatistics',
|
|
83
90
|
'Unpack',
|
|
91
|
+
'Unpivoting',
|
|
84
92
|
'VectorDistance',
|
|
85
93
|
'WhichMax',
|
|
86
94
|
'WhichMin',
|
|
@@ -95,4 +103,5 @@ for func in _sqle_functions:
|
|
|
95
103
|
for assoc_cl in _get_associated_parent_classes(func):
|
|
96
104
|
_c = _c + (assoc_cl, )
|
|
97
105
|
globals()[func] = type("{}".format(func), _c, {"__init__": lambda self, **kwargs: _common_init(self, 'sqle',
|
|
98
|
-
**kwargs), "__doc__": _AnalyticFunction.__doc__
|
|
106
|
+
**kwargs), "__doc__": _AnalyticFunction.__doc__,
|
|
107
|
+
"__dir__": _common_dir})
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
from teradataml.analytics.meta_class import _AnalyticFunction
|
|
2
|
-
from teradataml.analytics.meta_class import _common_init
|
|
2
|
+
from teradataml.analytics.meta_class import _common_init, _common_dir
|
|
3
3
|
|
|
4
|
-
_nos_functions = ['ReadNOS', 'WriteNOS']
|
|
4
|
+
_nos_functions = ['ReadNOS', 'WriteNOS', 'Image2Matrix']
|
|
5
5
|
|
|
6
6
|
for func in _nos_functions:
|
|
7
7
|
globals()[func] = type("{}".format(func), (_AnalyticFunction,),
|
|
8
8
|
{"__init__": lambda self, **kwargs: _common_init(self,
|
|
9
9
|
'nos', **kwargs),
|
|
10
|
-
"__doc__": _AnalyticFunction.__doc__
|
|
10
|
+
"__doc__": _AnalyticFunction.__doc__,
|
|
11
|
+
"__dir__": _common_dir})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from teradataml.analytics.meta_class import _AnalyticFunction
|
|
2
|
-
from teradataml.analytics.meta_class import _common_init
|
|
2
|
+
from teradataml.analytics.meta_class import _common_init, _common_dir
|
|
3
3
|
from teradataml.analytics.json_parser.utils import _get_associated_parent_classes
|
|
4
4
|
|
|
5
5
|
_uaf_functions = ['ACF',
|
|
@@ -51,7 +51,17 @@ _uaf_functions = ['ACF',
|
|
|
51
51
|
'InputValidator',
|
|
52
52
|
'MInfo',
|
|
53
53
|
'SInfo',
|
|
54
|
-
'TrackingOp'
|
|
54
|
+
'TrackingOp',
|
|
55
|
+
'AutoArima',
|
|
56
|
+
'ArimaXEstimate',
|
|
57
|
+
'DWT',
|
|
58
|
+
'DWT2D',
|
|
59
|
+
'IDWT',
|
|
60
|
+
'IDWT2D',
|
|
61
|
+
'IQR',
|
|
62
|
+
'Matrix2Image',
|
|
63
|
+
'SAX',
|
|
64
|
+
'WindowDFFT']
|
|
55
65
|
|
|
56
66
|
for func in _uaf_functions:
|
|
57
67
|
_c = (_AnalyticFunction,)
|
|
@@ -60,4 +70,13 @@ for func in _uaf_functions:
|
|
|
60
70
|
globals()[func] = type("{}".format(func), _c,
|
|
61
71
|
{"__init__": lambda self, **kwargs: _common_init(self,
|
|
62
72
|
'uaf', **kwargs),
|
|
73
|
+
"__doc__": _AnalyticFunction.__doc__,
|
|
74
|
+
"__dir__": _common_dir})
|
|
75
|
+
|
|
76
|
+
_stored_procedure = ['CopyArt', 'FilterFactory1d']
|
|
77
|
+
|
|
78
|
+
for func in _stored_procedure:
|
|
79
|
+
globals()[func] = type("{}".format(func), (_AnalyticFunction,),
|
|
80
|
+
{"__init__": lambda self, **kwargs: _common_init(self,
|
|
81
|
+
'stored_procedure', **kwargs),
|
|
63
82
|
"__doc__": _AnalyticFunction.__doc__})
|
teradataml/analytics/utils.py
CHANGED
|
@@ -434,7 +434,29 @@ class FuncSpecialCaseHandler():
|
|
|
434
434
|
"NPath": {"mode": self._avoid_quote_for_arg,
|
|
435
435
|
"symbols": self._avoid_quote_for_arg,
|
|
436
436
|
"result": self._avoid_quote_for_arg,
|
|
437
|
-
"filter": self._avoid_quote_for_arg}
|
|
437
|
+
"filter": self._avoid_quote_for_arg},
|
|
438
|
+
"Pivoting": {"combined_column_sizes": self._handle_multiple_datatype},
|
|
439
|
+
"FilterFactory1d": {"database_name": self._single_quote_arg,
|
|
440
|
+
"table_name": self._single_quote_arg,
|
|
441
|
+
"filter_type": self._single_quote_arg,
|
|
442
|
+
"window_type": self._single_quote_arg,
|
|
443
|
+
"filter_description": self._single_quote_arg},
|
|
444
|
+
"CopyArt":{"database_name": self._single_quote_arg,
|
|
445
|
+
"table_name": self._single_quote_arg,
|
|
446
|
+
"map_name": self._single_quote_arg,
|
|
447
|
+
"permanent_table": self._single_quote_arg},
|
|
448
|
+
"DWT": {"wavelet": self._single_quote_arg},
|
|
449
|
+
"IDWT": {"part": self._single_quote_arg,
|
|
450
|
+
"wavelet": self._single_quote_arg,
|
|
451
|
+
"mode": self._single_quote_arg},
|
|
452
|
+
"DWT2D": {"wavelet": self._single_quote_arg,
|
|
453
|
+
"mode": self._single_quote_arg},
|
|
454
|
+
"IDWT2D": {"wavelet": self._single_quote_arg,
|
|
455
|
+
"mode": self._single_quote_arg},
|
|
456
|
+
"Matrix2Image": {"type": self._single_quote_arg,
|
|
457
|
+
"colormap": self._single_quote_arg
|
|
458
|
+
}
|
|
459
|
+
}
|
|
438
460
|
|
|
439
461
|
# Setter method for argument.
|
|
440
462
|
def set_arg_name(self, argument):
|
|
@@ -691,4 +713,47 @@ class FuncSpecialCaseHandler():
|
|
|
691
713
|
if sep in value and "-" != value[0]:
|
|
692
714
|
arg_value[num] = "[{}]".format(arg_value[num])
|
|
693
715
|
break
|
|
716
|
+
return arg_value
|
|
717
|
+
|
|
718
|
+
def _handle_multiple_datatype(self, arg_value, *args, **kwargs):
|
|
719
|
+
|
|
720
|
+
"""
|
|
721
|
+
DESCRIPTION:
|
|
722
|
+
Function to handle multiple data types in "arg_value".
|
|
723
|
+
* Function returns the "arg_value" in sqle expected format.
|
|
724
|
+
|
|
725
|
+
PARAMETERS:
|
|
726
|
+
arg_value:
|
|
727
|
+
Required Argument.
|
|
728
|
+
Specifies the arg_value to handle multiple data types.
|
|
729
|
+
Types: int or str or list of str(s)
|
|
730
|
+
|
|
731
|
+
RETURNS:
|
|
732
|
+
arg_value converted into sqle expected format.
|
|
733
|
+
|
|
734
|
+
RAISES:
|
|
735
|
+
None
|
|
736
|
+
|
|
737
|
+
EXAMPLES:
|
|
738
|
+
# Scenario 1: convert list of string into sqle expected format.
|
|
739
|
+
self._handle_multiple_datatype(arg_value)
|
|
740
|
+
# returns "'col1:1234','col2:1144','col3:214'"
|
|
741
|
+
|
|
742
|
+
# Scenario 2: convert string into sqle expected format.
|
|
743
|
+
self._handle_multiple_datatype(arg_value)
|
|
744
|
+
# returns "'col1:1234'"
|
|
745
|
+
"""
|
|
746
|
+
# Datatype of arg_value already validated inside function.
|
|
747
|
+
|
|
748
|
+
# Convert the pass value into sqle expected format.
|
|
749
|
+
# If argument value is a list, convert into sqle expected string format.
|
|
750
|
+
# If argument value is a string, add single quote.
|
|
751
|
+
# If argument value is a integer, return as it is.
|
|
752
|
+
if isinstance(arg_value, list):
|
|
753
|
+
if all(isinstance(i, str) for i in arg_value):
|
|
754
|
+
arg_value = "'" + "','".join(arg_value) + "'"
|
|
755
|
+
elif isinstance(arg_value, str):
|
|
756
|
+
arg_value = [arg_value]
|
|
757
|
+
arg_value = "'" + "','".join(arg_value) + "'"
|
|
758
|
+
|
|
694
759
|
return arg_value
|
teradataml/analytics/valib.py
CHANGED
|
@@ -13,7 +13,7 @@ import time
|
|
|
13
13
|
import uuid
|
|
14
14
|
from math import floor
|
|
15
15
|
|
|
16
|
-
from
|
|
16
|
+
from teradataml.telemetry_utils.queryband import collect_queryband
|
|
17
17
|
from teradataml.common import messages
|
|
18
18
|
from teradataml.common.constants import TeradataConstants, ValibConstants as VC
|
|
19
19
|
from teradataml.common.exceptions import TeradataMlException
|