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
|
@@ -93,6 +93,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
93
93
|
self.verbose = verbose
|
|
94
94
|
self.target_column_ind = target_column_ind
|
|
95
95
|
self.table_name_mapping = table_name_mapping
|
|
96
|
+
self.data_node_id = data._nodeid
|
|
97
|
+
self.table_name_mapping[self.data_node_id] = {}
|
|
96
98
|
|
|
97
99
|
def data_transformation(self):
|
|
98
100
|
"""
|
|
@@ -356,7 +358,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
356
358
|
"data" : self.data,
|
|
357
359
|
"object" : custom_eql_bincode_fit_object,
|
|
358
360
|
"accumulate" : accumulate_columns,
|
|
359
|
-
"persist" : True,
|
|
361
|
+
"persist" : True,
|
|
362
|
+
"display_table_name" : False
|
|
360
363
|
}
|
|
361
364
|
self.data = BincodeTransform(**eql_transform_params).result
|
|
362
365
|
# Adding transformed data containing table to garbage collector
|
|
@@ -377,7 +380,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
377
380
|
"object" : custom_var_bincode_fit_object,
|
|
378
381
|
"object_order_column" : "TD_MinValue_BINFIT",
|
|
379
382
|
"accumulate" : accumulate_columns,
|
|
380
|
-
"persist" : True
|
|
383
|
+
"persist" : True,
|
|
384
|
+
"display_table_name" : False
|
|
381
385
|
}
|
|
382
386
|
self.data = BincodeTransform(**var_transform_params).result
|
|
383
387
|
# Adding transformed data containing table to garbage collector
|
|
@@ -418,7 +422,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
418
422
|
"data" : self.data,
|
|
419
423
|
"object" : fit_obj,
|
|
420
424
|
"is_input_dense" : True,
|
|
421
|
-
"persist" : True
|
|
425
|
+
"persist" : True,
|
|
426
|
+
"display_table_name" : False
|
|
422
427
|
}
|
|
423
428
|
# Performing one hot encoding transformation
|
|
424
429
|
self.data = OneHotEncodingTransform(**transform_params).result
|
|
@@ -449,7 +454,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
449
454
|
"data" : self.data,
|
|
450
455
|
"object" : custom_ord_encoding_fit_obj,
|
|
451
456
|
"accumulate" : accumulate_columns,
|
|
452
|
-
"persist" : True
|
|
457
|
+
"persist" : True,
|
|
458
|
+
"display_table_name" : False
|
|
453
459
|
}
|
|
454
460
|
# Performing ordinal encoding transformation
|
|
455
461
|
self.data = OrdinalEncodingTransform(**transform_params).result
|
|
@@ -467,7 +473,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
467
473
|
"data" : self.data,
|
|
468
474
|
"object" : tar_fit_obj,
|
|
469
475
|
"accumulate" : accumulate_columns,
|
|
470
|
-
"persist" : True
|
|
476
|
+
"persist" : True,
|
|
477
|
+
"display_table_name" : False
|
|
471
478
|
}
|
|
472
479
|
# Performing target encoding transformation
|
|
473
480
|
self.data = TargetEncodingTransform(**transform_params).result
|
|
@@ -514,7 +521,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
514
521
|
"data" : self.data,
|
|
515
522
|
"object" : custom_numerical_transformation_fit_object,
|
|
516
523
|
"id_columns" : custom_numerical_transformation_id_columns,
|
|
517
|
-
"persist" :True
|
|
524
|
+
"persist" :True,
|
|
525
|
+
"display_table_name" : False
|
|
518
526
|
}
|
|
519
527
|
# Peforming transformation on target columns
|
|
520
528
|
self.data = Transform(**transform_params).result
|
|
@@ -540,7 +548,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
540
548
|
"data" : self.data,
|
|
541
549
|
"object" : fit_obj,
|
|
542
550
|
"accumulate" : self.data.columns,
|
|
543
|
-
"persist" : True
|
|
551
|
+
"persist" : True,
|
|
552
|
+
"display_table_name" : False
|
|
544
553
|
}
|
|
545
554
|
# Performing transformation
|
|
546
555
|
self.data = NonLinearCombineTransform(**transform_params).result
|
|
@@ -592,7 +601,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
592
601
|
"target_columns" : round_columns,
|
|
593
602
|
"precision_digit" : 4,
|
|
594
603
|
"accumulate" : accumulate_columns,
|
|
595
|
-
"persist" : True
|
|
604
|
+
"persist" : True,
|
|
605
|
+
"display_table_name" : False}
|
|
596
606
|
self.data = RoundColumns(**fit_params).result
|
|
597
607
|
# Adding transformed data containing table to garbage collector
|
|
598
608
|
GarbageCollector._add_to_garbagecollector(self.data._table_name)
|
|
@@ -616,7 +626,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
616
626
|
"data" : self.data,
|
|
617
627
|
"object" : target_col_ord_encoding_fit_obj,
|
|
618
628
|
"accumulate" : accumulate_columns,
|
|
619
|
-
"persist" : True
|
|
629
|
+
"persist" : True,
|
|
630
|
+
"display_table_name" : False
|
|
620
631
|
}
|
|
621
632
|
# Performing ordinal encoding transformation
|
|
622
633
|
self.data = OrdinalEncodingTransform(**transform_params).result
|
|
@@ -695,7 +706,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
695
706
|
# Uploading lasso dataset to table for further use
|
|
696
707
|
table_name = UtilFuncs._generate_temp_table_name(prefix="lasso_new_test",
|
|
697
708
|
table_type = TeradataConstants.TERADATA_TABLE)
|
|
698
|
-
|
|
709
|
+
# Storing table name mapping for lasso dataset
|
|
710
|
+
self.table_name_mapping[self.data_node_id]["lasso_new_test"] = table_name
|
|
699
711
|
copy_to_sql(df = lasso_df, table_name= table_name, if_exists="replace")
|
|
700
712
|
|
|
701
713
|
def _feature_selection_rfe_transformation(self):
|
|
@@ -732,7 +744,8 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
732
744
|
# Uploading rfe dataset to table for further use
|
|
733
745
|
table_name = UtilFuncs._generate_temp_table_name(prefix="rfe_new_test",
|
|
734
746
|
table_type = TeradataConstants.TERADATA_TABLE)
|
|
735
|
-
|
|
747
|
+
# Storing table name mapping for rfe dataset
|
|
748
|
+
self.table_name_mapping[self.data_node_id]["rfe_new_test"] = table_name
|
|
736
749
|
copy_to_sql(df = rfe_df, table_name= table_name, if_exists="replace")
|
|
737
750
|
|
|
738
751
|
def _feature_selection_pca_transformation(self):
|
|
@@ -758,12 +771,18 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
758
771
|
pca_scaled_pd = pca_scaled_df.to_pandas()
|
|
759
772
|
# Extracting pca fit instance for applying pca
|
|
760
773
|
pca_fit_instance = self.data_transformation_params.get("pca_fit_instance", None)
|
|
774
|
+
# Extracting columns for applying pca
|
|
775
|
+
pca_fit_columns = self.data_transformation_params.get("pca_fit_columns", None)
|
|
761
776
|
|
|
762
777
|
# drop id column and target column if present
|
|
763
778
|
drop_col = ['id']
|
|
764
779
|
if self.target_column_ind:
|
|
765
780
|
drop_col.append(self.data_target_column)
|
|
766
781
|
pca_df = pca_scaled_pd.drop(columns=drop_col, axis=1)
|
|
782
|
+
|
|
783
|
+
# Rearranging columns to match the order used during PCA fitting to
|
|
784
|
+
# avoid issues during PCA transformation.
|
|
785
|
+
pca_df = pca_df[pca_fit_columns]
|
|
767
786
|
|
|
768
787
|
# Applying pca on scaled dataset
|
|
769
788
|
pca_df = pca_fit_instance.transform(pca_df)
|
|
@@ -785,5 +804,6 @@ class _DataTransformation(_FeatureExplore, _FeatureEngineering):
|
|
|
785
804
|
# Uploading pca dataset to table for further use
|
|
786
805
|
table_name = UtilFuncs._generate_temp_table_name(prefix="pca_new_test",
|
|
787
806
|
table_type = TeradataConstants.TERADATA_TABLE)
|
|
788
|
-
|
|
807
|
+
# Storing table name mapping for pca dataset
|
|
808
|
+
self.table_name_mapping[self.data_node_id]["pca_new_test"] = table_name
|
|
789
809
|
copy_to_sql(df = pca_df, table_name=table_name, if_exists="replace")
|