teradataml 20.0.0.0__py3-none-any.whl → 20.0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of teradataml might be problematic. Click here for more details.
- teradataml/LICENSE-3RD-PARTY.pdf +0 -0
- teradataml/LICENSE.pdf +0 -0
- teradataml/README.md +183 -0
- teradataml/__init__.py +6 -3
- teradataml/_version.py +2 -2
- teradataml/analytics/__init__.py +3 -2
- teradataml/analytics/analytic_function_executor.py +275 -40
- teradataml/analytics/analytic_query_generator.py +92 -0
- teradataml/analytics/byom/__init__.py +3 -2
- teradataml/analytics/json_parser/metadata.py +1 -0
- teradataml/analytics/json_parser/utils.py +17 -21
- teradataml/analytics/meta_class.py +40 -1
- teradataml/analytics/sqle/DecisionTreePredict.py +1 -1
- teradataml/analytics/sqle/__init__.py +10 -2
- teradataml/analytics/table_operator/__init__.py +3 -2
- teradataml/analytics/uaf/__init__.py +21 -2
- teradataml/analytics/utils.py +62 -1
- teradataml/analytics/valib.py +1 -1
- teradataml/automl/__init__.py +1553 -319
- teradataml/automl/custom_json_utils.py +139 -61
- teradataml/automl/data_preparation.py +276 -319
- teradataml/automl/data_transformation.py +163 -81
- teradataml/automl/feature_engineering.py +402 -239
- teradataml/automl/feature_exploration.py +9 -2
- teradataml/automl/model_evaluation.py +48 -51
- teradataml/automl/model_training.py +291 -189
- teradataml/catalog/byom.py +8 -8
- teradataml/catalog/model_cataloging_utils.py +1 -1
- teradataml/clients/auth_client.py +133 -0
- teradataml/clients/pkce_client.py +1 -1
- teradataml/common/aed_utils.py +3 -2
- teradataml/common/constants.py +48 -6
- teradataml/common/deprecations.py +13 -7
- teradataml/common/garbagecollector.py +156 -120
- teradataml/common/messagecodes.py +6 -1
- teradataml/common/messages.py +3 -1
- teradataml/common/sqlbundle.py +1 -1
- teradataml/common/utils.py +103 -11
- teradataml/common/wrapper_utils.py +1 -1
- teradataml/context/context.py +121 -31
- teradataml/data/advertising.csv +201 -0
- teradataml/data/bank_marketing.csv +11163 -0
- teradataml/data/bike_sharing.csv +732 -0
- teradataml/data/boston2cols.csv +721 -0
- teradataml/data/breast_cancer.csv +570 -0
- teradataml/data/complaints_test_tokenized.csv +353 -0
- teradataml/data/complaints_tokens_model.csv +348 -0
- teradataml/data/covid_confirm_sd.csv +83 -0
- teradataml/data/customer_segmentation_test.csv +2628 -0
- teradataml/data/customer_segmentation_train.csv +8069 -0
- teradataml/data/dataframe_example.json +10 -0
- teradataml/data/docs/sqle/docs_17_10/OneHotEncodingFit.py +3 -1
- teradataml/data/docs/sqle/docs_17_10/OneHotEncodingTransform.py +6 -0
- teradataml/data/docs/sqle/docs_17_10/OutlierFilterTransform.py +5 -1
- teradataml/data/docs/sqle/docs_17_20/ANOVA.py +61 -1
- teradataml/data/docs/sqle/docs_17_20/CFilter.py +132 -0
- teradataml/data/docs/sqle/docs_17_20/ColumnTransformer.py +2 -0
- teradataml/data/docs/sqle/docs_17_20/FTest.py +105 -26
- teradataml/data/docs/sqle/docs_17_20/GLM.py +162 -1
- teradataml/data/docs/sqle/docs_17_20/GetFutileColumns.py +5 -3
- teradataml/data/docs/sqle/docs_17_20/KMeans.py +48 -1
- teradataml/data/docs/sqle/docs_17_20/NaiveBayes.py +162 -0
- teradataml/data/docs/sqle/docs_17_20/NonLinearCombineFit.py +3 -2
- teradataml/data/docs/sqle/docs_17_20/OneHotEncodingFit.py +5 -0
- teradataml/data/docs/sqle/docs_17_20/OneHotEncodingTransform.py +6 -0
- teradataml/data/docs/sqle/docs_17_20/OutlierFilterFit.py +2 -0
- teradataml/data/docs/sqle/docs_17_20/Pivoting.py +279 -0
- teradataml/data/docs/sqle/docs_17_20/ROC.py +3 -2
- teradataml/data/docs/sqle/docs_17_20/SVMPredict.py +13 -2
- teradataml/data/docs/sqle/docs_17_20/ScaleFit.py +119 -1
- teradataml/data/docs/sqle/docs_17_20/ScaleTransform.py +93 -1
- teradataml/data/docs/sqle/docs_17_20/Shap.py +197 -0
- teradataml/data/docs/sqle/docs_17_20/TDGLMPredict.py +163 -1
- teradataml/data/docs/sqle/docs_17_20/TDNaiveBayesPredict.py +189 -0
- teradataml/data/docs/sqle/docs_17_20/TFIDF.py +142 -0
- teradataml/data/docs/sqle/docs_17_20/Unpivoting.py +216 -0
- teradataml/data/docs/sqle/docs_17_20/XGBoost.py +12 -4
- teradataml/data/docs/sqle/docs_17_20/XGBoostPredict.py +7 -1
- teradataml/data/docs/sqle/docs_17_20/ZTest.py +72 -7
- teradataml/data/docs/uaf/docs_17_20/ACF.py +1 -10
- teradataml/data/docs/uaf/docs_17_20/ArimaEstimate.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/ArimaForecast.py +35 -5
- teradataml/data/docs/uaf/docs_17_20/ArimaValidate.py +3 -1
- teradataml/data/docs/uaf/docs_17_20/ArimaXEstimate.py +293 -0
- teradataml/data/docs/uaf/docs_17_20/AutoArima.py +354 -0
- teradataml/data/docs/uaf/docs_17_20/BreuschGodfrey.py +3 -2
- teradataml/data/docs/uaf/docs_17_20/BreuschPaganGodfrey.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/Convolve.py +13 -10
- teradataml/data/docs/uaf/docs_17_20/Convolve2.py +4 -1
- teradataml/data/docs/uaf/docs_17_20/CumulPeriodogram.py +5 -4
- teradataml/data/docs/uaf/docs_17_20/DFFT2Conv.py +4 -4
- teradataml/data/docs/uaf/docs_17_20/DWT.py +235 -0
- teradataml/data/docs/uaf/docs_17_20/DWT2D.py +214 -0
- teradataml/data/docs/uaf/docs_17_20/DurbinWatson.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/ExtractResults.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/FilterFactory1d.py +160 -0
- teradataml/data/docs/uaf/docs_17_20/GenseriesSinusoids.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/GoldfeldQuandt.py +9 -31
- teradataml/data/docs/uaf/docs_17_20/HoltWintersForecaster.py +4 -2
- teradataml/data/docs/uaf/docs_17_20/IDFFT2.py +1 -8
- teradataml/data/docs/uaf/docs_17_20/IDWT.py +236 -0
- teradataml/data/docs/uaf/docs_17_20/IDWT2D.py +226 -0
- teradataml/data/docs/uaf/docs_17_20/IQR.py +134 -0
- teradataml/data/docs/uaf/docs_17_20/LineSpec.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/LinearRegr.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/MAMean.py +3 -3
- teradataml/data/docs/uaf/docs_17_20/Matrix2Image.py +297 -0
- teradataml/data/docs/uaf/docs_17_20/MatrixMultiply.py +15 -6
- teradataml/data/docs/uaf/docs_17_20/PACF.py +0 -1
- teradataml/data/docs/uaf/docs_17_20/Portman.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/PowerSpec.py +2 -2
- teradataml/data/docs/uaf/docs_17_20/Resample.py +9 -1
- teradataml/data/docs/uaf/docs_17_20/SAX.py +246 -0
- teradataml/data/docs/uaf/docs_17_20/SeasonalNormalize.py +17 -10
- teradataml/data/docs/uaf/docs_17_20/SignifPeriodicities.py +1 -1
- teradataml/data/docs/uaf/docs_17_20/WhitesGeneral.py +3 -1
- teradataml/data/docs/uaf/docs_17_20/WindowDFFT.py +368 -0
- teradataml/data/dwt2d_dataTable.csv +65 -0
- teradataml/data/dwt_dataTable.csv +8 -0
- teradataml/data/dwt_filterTable.csv +3 -0
- teradataml/data/finance_data4.csv +13 -0
- teradataml/data/glm_example.json +28 -1
- teradataml/data/grocery_transaction.csv +19 -0
- teradataml/data/housing_train_segment.csv +201 -0
- teradataml/data/idwt2d_dataTable.csv +5 -0
- teradataml/data/idwt_dataTable.csv +8 -0
- teradataml/data/idwt_filterTable.csv +3 -0
- teradataml/data/insect2Cols.csv +61 -0
- teradataml/data/interval_data.csv +5 -0
- teradataml/data/jsons/paired_functions.json +14 -0
- teradataml/data/jsons/sqle/17.20/TD_ANOVA.json +99 -27
- teradataml/data/jsons/sqle/17.20/TD_CFilter.json +118 -0
- teradataml/data/jsons/sqle/17.20/TD_FTest.json +166 -83
- teradataml/data/jsons/sqle/17.20/TD_GLM.json +90 -14
- teradataml/data/jsons/sqle/17.20/TD_GLMPREDICT.json +48 -5
- teradataml/data/jsons/sqle/17.20/TD_GetFutileColumns.json +5 -3
- teradataml/data/jsons/sqle/17.20/TD_KMeans.json +31 -11
- teradataml/data/jsons/sqle/17.20/TD_NaiveBayes.json +193 -0
- teradataml/data/jsons/sqle/17.20/TD_NaiveBayesPredict.json +212 -0
- teradataml/data/jsons/sqle/17.20/TD_NonLinearCombineFit.json +3 -2
- teradataml/data/jsons/sqle/17.20/TD_OneClassSVM.json +9 -9
- teradataml/data/jsons/sqle/17.20/TD_Pivoting.json +280 -0
- teradataml/data/jsons/sqle/17.20/TD_ROC.json +2 -1
- teradataml/data/jsons/sqle/17.20/TD_SVM.json +16 -16
- teradataml/data/jsons/sqle/17.20/TD_SVMPredict.json +19 -1
- teradataml/data/jsons/sqle/17.20/TD_ScaleFit.json +168 -15
- teradataml/data/jsons/sqle/17.20/TD_ScaleTransform.json +50 -1
- teradataml/data/jsons/sqle/17.20/TD_Shap.json +222 -0
- teradataml/data/jsons/sqle/17.20/TD_TFIDF.json +162 -0
- teradataml/data/jsons/sqle/17.20/TD_Unpivoting.json +235 -0
- teradataml/data/jsons/sqle/17.20/TD_XGBoost.json +25 -7
- teradataml/data/jsons/sqle/17.20/TD_XGBoostPredict.json +17 -4
- teradataml/data/jsons/sqle/17.20/TD_ZTest.json +157 -80
- teradataml/data/jsons/storedprocedure/17.20/TD_FILTERFACTORY1D.json +150 -0
- teradataml/data/jsons/uaf/17.20/TD_ACF.json +1 -18
- teradataml/data/jsons/uaf/17.20/TD_ARIMAESTIMATE.json +3 -16
- teradataml/data/jsons/uaf/17.20/TD_ARIMAFORECAST.json +0 -3
- teradataml/data/jsons/uaf/17.20/TD_ARIMAVALIDATE.json +5 -3
- teradataml/data/jsons/uaf/17.20/TD_ARIMAXESTIMATE.json +362 -0
- teradataml/data/jsons/uaf/17.20/TD_AUTOARIMA.json +469 -0
- teradataml/data/jsons/uaf/17.20/TD_BINARYMATRIXOP.json +0 -3
- teradataml/data/jsons/uaf/17.20/TD_BINARYSERIESOP.json +0 -2
- teradataml/data/jsons/uaf/17.20/TD_BREUSCH_GODFREY.json +2 -1
- teradataml/data/jsons/uaf/17.20/TD_BREUSCH_PAGAN_GODFREY.json +2 -5
- teradataml/data/jsons/uaf/17.20/TD_CONVOLVE.json +3 -6
- teradataml/data/jsons/uaf/17.20/TD_CONVOLVE2.json +1 -3
- teradataml/data/jsons/uaf/17.20/TD_CUMUL_PERIODOGRAM.json +0 -5
- teradataml/data/jsons/uaf/17.20/TD_DFFT.json +1 -4
- teradataml/data/jsons/uaf/17.20/TD_DFFT2.json +2 -7
- teradataml/data/jsons/uaf/17.20/TD_DFFT2CONV.json +1 -2
- teradataml/data/jsons/uaf/17.20/TD_DFFTCONV.json +0 -2
- teradataml/data/jsons/uaf/17.20/TD_DTW.json +3 -6
- teradataml/data/jsons/uaf/17.20/TD_DWT.json +173 -0
- teradataml/data/jsons/uaf/17.20/TD_DWT2D.json +160 -0
- teradataml/data/jsons/uaf/17.20/TD_FITMETRICS.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_GOLDFELD_QUANDT.json +16 -30
- teradataml/data/jsons/uaf/17.20/{TD_HOLT_WINTERS_FORECAST.json → TD_HOLT_WINTERS_FORECASTER.json} +1 -2
- teradataml/data/jsons/uaf/17.20/TD_IDFFT2.json +1 -15
- teradataml/data/jsons/uaf/17.20/TD_IDWT.json +162 -0
- teradataml/data/jsons/uaf/17.20/TD_IDWT2D.json +149 -0
- teradataml/data/jsons/uaf/17.20/TD_IQR.json +117 -0
- teradataml/data/jsons/uaf/17.20/TD_LINEAR_REGR.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_LINESPEC.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_MAMEAN.json +1 -3
- teradataml/data/jsons/uaf/17.20/TD_MATRIX2IMAGE.json +209 -0
- teradataml/data/jsons/uaf/17.20/TD_PACF.json +2 -2
- teradataml/data/jsons/uaf/17.20/TD_POWERSPEC.json +5 -5
- teradataml/data/jsons/uaf/17.20/TD_RESAMPLE.json +48 -28
- teradataml/data/jsons/uaf/17.20/TD_SAX.json +208 -0
- teradataml/data/jsons/uaf/17.20/TD_SEASONALNORMALIZE.json +12 -6
- teradataml/data/jsons/uaf/17.20/TD_SIMPLEEXP.json +0 -1
- teradataml/data/jsons/uaf/17.20/TD_TRACKINGOP.json +8 -8
- teradataml/data/jsons/uaf/17.20/TD_UNDIFF.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_UNNORMALIZE.json +1 -1
- teradataml/data/jsons/uaf/17.20/TD_WINDOWDFFT.json +400 -0
- teradataml/data/kmeans_example.json +5 -0
- teradataml/data/kmeans_table.csv +10 -0
- teradataml/data/load_example_data.py +8 -2
- teradataml/data/naivebayestextclassifier_example.json +1 -1
- teradataml/data/naivebayestextclassifierpredict_example.json +11 -0
- teradataml/data/onehot_encoder_train.csv +4 -0
- teradataml/data/openml_example.json +29 -0
- teradataml/data/peppers.png +0 -0
- teradataml/data/real_values.csv +14 -0
- teradataml/data/sax_example.json +8 -0
- teradataml/data/scale_attributes.csv +3 -0
- teradataml/data/scale_example.json +52 -1
- teradataml/data/scale_input_part_sparse.csv +31 -0
- teradataml/data/scale_input_partitioned.csv +16 -0
- teradataml/data/scale_input_sparse.csv +11 -0
- teradataml/data/scale_parameters.csv +3 -0
- teradataml/data/scripts/deploy_script.py +21 -2
- teradataml/data/scripts/sklearn/sklearn_fit.py +40 -37
- teradataml/data/scripts/sklearn/sklearn_fit_predict.py +22 -30
- teradataml/data/scripts/sklearn/sklearn_function.template +42 -24
- teradataml/data/scripts/sklearn/sklearn_model_selection_split.py +23 -33
- teradataml/data/scripts/sklearn/sklearn_neighbors.py +19 -28
- teradataml/data/scripts/sklearn/sklearn_score.py +32 -32
- teradataml/data/scripts/sklearn/sklearn_transform.py +85 -42
- teradataml/data/star_pivot.csv +8 -0
- teradataml/data/templates/open_source_ml.json +2 -1
- teradataml/data/teradataml_example.json +97 -1
- teradataml/data/timestamp_data.csv +4 -0
- teradataml/data/titanic_dataset_unpivoted.csv +19 -0
- teradataml/data/uaf_example.json +55 -1
- teradataml/data/unpivot_example.json +15 -0
- teradataml/data/url_data.csv +9 -0
- teradataml/data/windowdfft.csv +16 -0
- teradataml/data/ztest_example.json +16 -0
- teradataml/dataframe/copy_to.py +9 -4
- teradataml/dataframe/data_transfer.py +125 -64
- teradataml/dataframe/dataframe.py +575 -57
- teradataml/dataframe/dataframe_utils.py +47 -9
- teradataml/dataframe/fastload.py +273 -90
- teradataml/dataframe/functions.py +339 -0
- teradataml/dataframe/row.py +160 -0
- teradataml/dataframe/setop.py +2 -2
- teradataml/dataframe/sql.py +740 -18
- teradataml/dataframe/window.py +1 -1
- teradataml/dbutils/dbutils.py +324 -18
- teradataml/geospatial/geodataframe.py +1 -1
- teradataml/geospatial/geodataframecolumn.py +1 -1
- teradataml/hyperparameter_tuner/optimizer.py +13 -13
- teradataml/lib/aed_0_1.dll +0 -0
- teradataml/opensource/sklearn/_sklearn_wrapper.py +254 -122
- teradataml/options/__init__.py +16 -5
- teradataml/options/configure.py +39 -6
- teradataml/options/display.py +2 -2
- teradataml/plot/axis.py +4 -4
- teradataml/scriptmgmt/UserEnv.py +26 -19
- teradataml/scriptmgmt/lls_utils.py +120 -16
- teradataml/table_operators/Script.py +4 -5
- teradataml/table_operators/TableOperator.py +160 -26
- teradataml/table_operators/table_operator_util.py +88 -41
- teradataml/table_operators/templates/dataframe_udf.template +63 -0
- teradataml/telemetry_utils/__init__.py +0 -0
- teradataml/telemetry_utils/queryband.py +52 -0
- teradataml/utils/validators.py +41 -3
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/METADATA +191 -6
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/RECORD +263 -185
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/WHEEL +0 -0
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/top_level.txt +0 -0
- {teradataml-20.0.0.0.dist-info → teradataml-20.0.0.2.dist-info}/zip-safe +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
def TDNaiveBayesPredict(data = None, object = None, id_column = None,
|
|
2
|
+
numeric_inputs = None, categorical_inputs = None,
|
|
3
|
+
attribute_name_column = None, attribute_value_column = None,
|
|
4
|
+
responses = None, output_prob = False, accumulate = None,
|
|
5
|
+
**generic_arguments):
|
|
6
|
+
"""
|
|
7
|
+
DESCRIPTION:
|
|
8
|
+
Function predicts classification label using model generated by NaiveBayes function
|
|
9
|
+
for a test set of data.
|
|
10
|
+
|
|
11
|
+
PARAMETERS:
|
|
12
|
+
data:
|
|
13
|
+
Required Argument.
|
|
14
|
+
Specifies the input teradataml DataFrame.
|
|
15
|
+
Types: teradataml DataFrame
|
|
16
|
+
|
|
17
|
+
object:
|
|
18
|
+
Required Argument.
|
|
19
|
+
Specifies the teradataml DataFrame containing the model data
|
|
20
|
+
or instance of NaiveBayes.
|
|
21
|
+
Types: teradataml DataFrame or NaiveBayes
|
|
22
|
+
|
|
23
|
+
id_column:
|
|
24
|
+
Required Argument.
|
|
25
|
+
Specifies the name of the column that uniquely identifies an
|
|
26
|
+
observation in the "data".
|
|
27
|
+
Types: str
|
|
28
|
+
|
|
29
|
+
numeric_inputs:
|
|
30
|
+
Optional Argument.
|
|
31
|
+
Specifies the name of the columns in "data" containing numeric attributes values.
|
|
32
|
+
Types: str OR list of Strings (str)
|
|
33
|
+
|
|
34
|
+
categorical_inputs:
|
|
35
|
+
Optional Argument.
|
|
36
|
+
Specifies the name of the columns in "data" containing categorical attributes values.
|
|
37
|
+
Types: str OR list of Strings (str)
|
|
38
|
+
|
|
39
|
+
attribute_name_column:
|
|
40
|
+
Optional Argument.
|
|
41
|
+
Specifies the name of the columns in "data" containing attributes names.
|
|
42
|
+
Types: str
|
|
43
|
+
|
|
44
|
+
attribute_value_column:
|
|
45
|
+
Optional Argument.
|
|
46
|
+
Specifies the name of the columns in "data" containing attributes values.
|
|
47
|
+
Types: str
|
|
48
|
+
|
|
49
|
+
responses:
|
|
50
|
+
Optional Argument.
|
|
51
|
+
Specifies a list of responses to output.
|
|
52
|
+
Types: str OR list of strs
|
|
53
|
+
|
|
54
|
+
output_prob:
|
|
55
|
+
Optional Argument.
|
|
56
|
+
Specifies whether to output the probability for each response.
|
|
57
|
+
Default Value: False
|
|
58
|
+
Types: bool
|
|
59
|
+
|
|
60
|
+
accumulate:
|
|
61
|
+
Optional Argument.
|
|
62
|
+
Specify the names of the columns in "data" that need to be copied
|
|
63
|
+
from the input to output teradataml DataFrame.
|
|
64
|
+
Types: str OR list of Strings (str)
|
|
65
|
+
|
|
66
|
+
**generic_arguments:
|
|
67
|
+
Specifies the generic keyword arguments SQLE functions accept. Below
|
|
68
|
+
are the generic keyword arguments:
|
|
69
|
+
persist:
|
|
70
|
+
Optional Argument.
|
|
71
|
+
Specifies whether to persist the results of the
|
|
72
|
+
function in a table or not. When set to True,
|
|
73
|
+
results are persisted in a table; otherwise,
|
|
74
|
+
results are garbage collected at the end of the
|
|
75
|
+
session.
|
|
76
|
+
Default Value: False
|
|
77
|
+
Types: bool
|
|
78
|
+
|
|
79
|
+
volatile:
|
|
80
|
+
Optional Argument.
|
|
81
|
+
Specifies whether to put the results of the
|
|
82
|
+
function in a volatile table or not. When set to
|
|
83
|
+
True, results are stored in a volatile table,
|
|
84
|
+
otherwise not.
|
|
85
|
+
Default Value: False
|
|
86
|
+
Types: bool
|
|
87
|
+
|
|
88
|
+
Function allows the user to partition, hash, order or local
|
|
89
|
+
order the input data. These generic arguments are available
|
|
90
|
+
for each argument that accepts teradataml DataFrame as
|
|
91
|
+
input and can be accessed as:
|
|
92
|
+
* "<input_data_arg_name>_partition_column" accepts str or
|
|
93
|
+
list of str (Strings)
|
|
94
|
+
* "<input_data_arg_name>_hash_column" accepts str or list
|
|
95
|
+
of str (Strings)
|
|
96
|
+
* "<input_data_arg_name>_order_column" accepts str or list
|
|
97
|
+
of str (Strings)
|
|
98
|
+
* "local_order_<input_data_arg_name>" accepts boolean
|
|
99
|
+
Note:
|
|
100
|
+
These generic arguments are supported by teradataml if
|
|
101
|
+
the underlying SQL Engine function supports, else an
|
|
102
|
+
exception is raised.
|
|
103
|
+
|
|
104
|
+
RETURNS:
|
|
105
|
+
Instance of NaiveBayesPredict.
|
|
106
|
+
Output teradataml DataFrames can be accessed using attribute
|
|
107
|
+
references, such as NaiveBayesPredictObj.<attribute_name>.
|
|
108
|
+
Output teradataml DataFrame attribute name is:
|
|
109
|
+
result
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
RAISES:
|
|
113
|
+
TeradataMlException, TypeError, ValueError
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
EXAMPLES:
|
|
117
|
+
# Notes:
|
|
118
|
+
# 1. Get the connection to Vantage, before importing the
|
|
119
|
+
# function in user space.
|
|
120
|
+
# 2. User can import the function, if it is available on
|
|
121
|
+
# Vantage user is connected to.
|
|
122
|
+
# 3. To check the list of analytic functions available on
|
|
123
|
+
# Vantage user connected to, use
|
|
124
|
+
# "display_analytic_functions()".
|
|
125
|
+
|
|
126
|
+
# Load the example data.
|
|
127
|
+
load_example_data("decisionforestpredict", ["housing_train", "housing_test"])
|
|
128
|
+
|
|
129
|
+
# Create teradataml DataFrame objects.
|
|
130
|
+
housing_train = DataFrame.from_table("housing_train")
|
|
131
|
+
housing_test = DataFrame.from_table("housing_test")
|
|
132
|
+
|
|
133
|
+
# Check the list of available analytic functions.
|
|
134
|
+
display_analytic_functions()
|
|
135
|
+
|
|
136
|
+
# Import function NaiveBayesPredict.
|
|
137
|
+
from teradataml import NaiveBayesPredict
|
|
138
|
+
|
|
139
|
+
# Example 1: NaiveBayesPredict function to predict the classification label using Dense input.
|
|
140
|
+
NaiveBayes_out = NaiveBayes(data=housing_train, response_column='homestyle',
|
|
141
|
+
numeric_inputs=['price','lotsize','bedrooms','bathrms','stories','garagepl'],
|
|
142
|
+
categorical_inputs=['driveway','recroom','fullbase','gashw','airco','prefarea'])
|
|
143
|
+
|
|
144
|
+
NaiveBayesPredict_out = TDNaiveBayesPredict(data=housing_test, object=NaiveBayes_out.result, id_column='sn',
|
|
145
|
+
numeric_inputs=['price','lotsize','bedrooms','bathrms','stories','garagepl'],
|
|
146
|
+
categorical_inputs=['driveway','recroom','fullbase','gashw','airco','prefarea'],
|
|
147
|
+
responses=['Classic', 'Eclectic', 'bungalow'],
|
|
148
|
+
accumulate='homestyle',
|
|
149
|
+
output_prob=True
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
# Print the result DataFrame.
|
|
153
|
+
print( NaiveBayesPredict_out.result)
|
|
154
|
+
|
|
155
|
+
# Example 2: NaiveBayesPredict function to predict the classification label using Sparse input.
|
|
156
|
+
|
|
157
|
+
# Unpivoting the data for sparse input to naive bayes.
|
|
158
|
+
upvt_train = Unpivoting(data = housing_train, id_column = 'sn',
|
|
159
|
+
target_columns = ['price','lotsize','bedrooms','bathrms','stories','garagepl',
|
|
160
|
+
'driveway','recroom','fullbase','gashw','airco','prefarea'],
|
|
161
|
+
attribute_column = "AttributeName",
|
|
162
|
+
value_column = "AttributeValue",
|
|
163
|
+
accumulate = 'homestyle')
|
|
164
|
+
|
|
165
|
+
upvt_test = Unpivoting(data = housing_test, id_column = 'sn',
|
|
166
|
+
target_columns = ['price','lotsize','bedrooms','bathrms','stories','garagepl','driveway',
|
|
167
|
+
'recroom','fullbase','gashw','airco','prefarea'],
|
|
168
|
+
attribute_column = "AttributeName", value_column = "AttributeValue",
|
|
169
|
+
accumulate = 'homestyle')
|
|
170
|
+
|
|
171
|
+
NaiveBayes_out1 = NaiveBayes(data=upvt_train.result,
|
|
172
|
+
response_column='homestyle',
|
|
173
|
+
attribute_name_column='AttributeName',
|
|
174
|
+
attribute_value_column='AttributeValue',
|
|
175
|
+
numeric_attributes=['price','lotsize','bedrooms','bathrms','stories','garagepl'],
|
|
176
|
+
categorical_attributes=['driveway','recroom','fullbase','gashw','airco','prefarea'])
|
|
177
|
+
|
|
178
|
+
NaiveBayesPredict_out1 = TDNaiveBayesPredict(data=upvt_test.result, object=NaiveBayes_out1, id_column='sn',
|
|
179
|
+
attribute_name_column='AttributeName',
|
|
180
|
+
attribute_value_column='AttributeValue',
|
|
181
|
+
responses=['Classic', 'Eclectic', 'bungalow'],
|
|
182
|
+
accumulate='homestyle',
|
|
183
|
+
output_prob=True
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
# Print the result DataFrame.
|
|
187
|
+
print( NaiveBayesPredict_out1.result)
|
|
188
|
+
|
|
189
|
+
"""
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
def TFIDF(data = None, doc_id_column = None, token_column = None,
|
|
2
|
+
tf_normalization = "NORMAL", idf_normalization = "LOG",
|
|
3
|
+
regularization = "NONE", accumulate = None,
|
|
4
|
+
**generic_arguments):
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
DESCRIPTION:
|
|
8
|
+
Function takes any document set and computes the Term Frequency (TF),
|
|
9
|
+
Inverse Document Frequency (IDF), and Term Frequency Inverse Document
|
|
10
|
+
Frequency (TF-IDF) scores for each term.
|
|
11
|
+
|
|
12
|
+
PARAMETERS:
|
|
13
|
+
data:
|
|
14
|
+
Required Argument.
|
|
15
|
+
Specifies the input teradataml DataFrame that contains
|
|
16
|
+
the document id and the term.
|
|
17
|
+
Types: teradataml DataFrame
|
|
18
|
+
|
|
19
|
+
doc_id_column:
|
|
20
|
+
Required Argument.
|
|
21
|
+
Specifies the name of the column in "data" that contains the
|
|
22
|
+
document identifier.
|
|
23
|
+
Types: str
|
|
24
|
+
|
|
25
|
+
token_column:
|
|
26
|
+
Required Argument.
|
|
27
|
+
Specifies the name of the column in "data" that contains the tokens.
|
|
28
|
+
Types: str
|
|
29
|
+
|
|
30
|
+
tf_normalization:
|
|
31
|
+
Optional Argument.
|
|
32
|
+
Specifies the normalization method for calculating the term frequency (TF).
|
|
33
|
+
Default Value: "NORMAL"
|
|
34
|
+
Permitted Values: BOOL, COUNT, NORMAL, LOG, AUGMENT
|
|
35
|
+
Types: str
|
|
36
|
+
|
|
37
|
+
idf_normalization:
|
|
38
|
+
Optional Argument.
|
|
39
|
+
Specifies the normalization method for calculating the inverse
|
|
40
|
+
document frequency (IDF).
|
|
41
|
+
Default Value: "LOG"
|
|
42
|
+
Permitted Values: UNARY, LOG, LOGNORM, SMOOTH
|
|
43
|
+
Types: str
|
|
44
|
+
|
|
45
|
+
regularization:
|
|
46
|
+
Optional Argument.
|
|
47
|
+
Specifies the regularization method for calculating the TF-IDF score.
|
|
48
|
+
Default Value: "NONE"
|
|
49
|
+
Permitted Values: L2, L1, NONE
|
|
50
|
+
Types: str
|
|
51
|
+
|
|
52
|
+
accumulate:
|
|
53
|
+
Optional Argument.
|
|
54
|
+
Specifies the name(s) of input teradataml DataFrame column(s) to copy to the
|
|
55
|
+
output.
|
|
56
|
+
Types: str OR list of Strings (str)
|
|
57
|
+
|
|
58
|
+
**generic_arguments:
|
|
59
|
+
Specifies the generic keyword arguments SQLE functions accept. Below
|
|
60
|
+
are the generic keyword arguments:
|
|
61
|
+
persist:
|
|
62
|
+
Optional Argument.
|
|
63
|
+
Specifies whether to persist the results of the
|
|
64
|
+
function in a table or not. When set to True,
|
|
65
|
+
results are persisted in a table; otherwise,
|
|
66
|
+
results are garbage collected at the end of the
|
|
67
|
+
session.
|
|
68
|
+
Default Value: False
|
|
69
|
+
Types: bool
|
|
70
|
+
|
|
71
|
+
volatile:
|
|
72
|
+
Optional Argument.
|
|
73
|
+
Specifies whether to put the results of the
|
|
74
|
+
function in a volatile table or not. When set to
|
|
75
|
+
True, results are stored in a volatile table,
|
|
76
|
+
otherwise not.
|
|
77
|
+
Default Value: False
|
|
78
|
+
Types: bool
|
|
79
|
+
|
|
80
|
+
Function allows the user to partition, hash, order or local
|
|
81
|
+
order the input data. These generic arguments are available
|
|
82
|
+
for each argument that accepts teradataml DataFrame as
|
|
83
|
+
input and can be accessed as:
|
|
84
|
+
* "<input_data_arg_name>_partition_column" accepts str or
|
|
85
|
+
list of str (Strings)
|
|
86
|
+
* "<input_data_arg_name>_hash_column" accepts str or list
|
|
87
|
+
of str (Strings)
|
|
88
|
+
* "<input_data_arg_name>_order_column" accepts str or list
|
|
89
|
+
of str (Strings)
|
|
90
|
+
* "local_order_<input_data_arg_name>" accepts boolean
|
|
91
|
+
Note:
|
|
92
|
+
These generic arguments are supported by teradataml if
|
|
93
|
+
the underlying SQL Engine function supports, else an
|
|
94
|
+
exception is raised.
|
|
95
|
+
|
|
96
|
+
RETURNS:
|
|
97
|
+
Instance of TFIDF.
|
|
98
|
+
Output teradataml DataFrames can be accessed using attribute
|
|
99
|
+
references, such as TFIDFObj.<attribute_name>.
|
|
100
|
+
Output teradataml DataFrame attribute name is:
|
|
101
|
+
result
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
RAISES:
|
|
105
|
+
TeradataMlException, TypeError, ValueError
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
EXAMPLES:
|
|
109
|
+
# Notes:
|
|
110
|
+
# 1. Get the connection to Vantage, before importing the
|
|
111
|
+
# function in user space.
|
|
112
|
+
# 2. User can import the function, if it is available on
|
|
113
|
+
# Vantage user is connected to.
|
|
114
|
+
# 3. To check the list of analytic functions available on
|
|
115
|
+
# Vantage user connected to, use
|
|
116
|
+
# "display_analytic_functions()".
|
|
117
|
+
|
|
118
|
+
# Load the example data.
|
|
119
|
+
load_example_data('naivebayestextclassifier',"token_table")
|
|
120
|
+
|
|
121
|
+
# Create teradataml DataFrame objects.
|
|
122
|
+
inp = DataFrame.from_table('token_table')
|
|
123
|
+
|
|
124
|
+
# Check the list of available analytic functions.
|
|
125
|
+
display_analytic_functions()
|
|
126
|
+
|
|
127
|
+
# Import function TFIDF.
|
|
128
|
+
from teradataml import TFIDF
|
|
129
|
+
|
|
130
|
+
# Example 1 : Compute the TF, IDF and TF-IDF scores
|
|
131
|
+
# for each term in the input data.
|
|
132
|
+
TFIDF_out = TFIDF(data=inp,
|
|
133
|
+
doc_id_column='doc_id',
|
|
134
|
+
token_column='token',
|
|
135
|
+
tf_normalization = "LOG",
|
|
136
|
+
idf_normalization = "SMOOTH",
|
|
137
|
+
regularization = "L2",
|
|
138
|
+
accumulate=['category'])
|
|
139
|
+
|
|
140
|
+
# Print the result DataFrame.
|
|
141
|
+
print(TFIDF_out.result)
|
|
142
|
+
"""
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
def Unpivoting(data = None, id_column = None, target_columns = None,
|
|
2
|
+
alias_names = None, attribute_column = "AttributeName", value_column = "AttributeValue",
|
|
3
|
+
accumulate = None, include_nulls = False, input_types = False, output_varchar = False,
|
|
4
|
+
indexed_attribute = False, include_datatypes = False,
|
|
5
|
+
**generic_arguments):
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
DESCRIPTION:
|
|
9
|
+
Function unpivots the data, that is, changes the data from
|
|
10
|
+
dense format to sparse format.
|
|
11
|
+
|
|
12
|
+
PARAMETERS:
|
|
13
|
+
data:
|
|
14
|
+
Required Argument.
|
|
15
|
+
Specifies the input teradataml DataFrame.
|
|
16
|
+
Types: teradataml DataFrame
|
|
17
|
+
|
|
18
|
+
id_column:
|
|
19
|
+
Required Argument.
|
|
20
|
+
Specifies the name of the column in "data" which contains the input data identifier.
|
|
21
|
+
Types: str
|
|
22
|
+
|
|
23
|
+
target_columns:
|
|
24
|
+
Required Argument.
|
|
25
|
+
Specifies the name(s) of input teradataml DataFrame column(s) which contains the data for
|
|
26
|
+
unpivoting.
|
|
27
|
+
Types: str OR list of Strings (str)
|
|
28
|
+
|
|
29
|
+
Optional Argument.
|
|
30
|
+
Specifies alternate names for the values in the 'attribute_column'.
|
|
31
|
+
Types: str OR list of strs
|
|
32
|
+
|
|
33
|
+
alias_names:
|
|
34
|
+
Optional Argument.
|
|
35
|
+
Specifies alternate names for the values in the 'attribute_column'.
|
|
36
|
+
column.
|
|
37
|
+
Types: str OR list of strs
|
|
38
|
+
|
|
39
|
+
attribute_column:
|
|
40
|
+
Optional Argument.
|
|
41
|
+
Specifies the name of the column in the output DataFrame, which holds the names of pivoted columns.
|
|
42
|
+
Default Value: "AttributeName"
|
|
43
|
+
Types: str
|
|
44
|
+
|
|
45
|
+
value_column:
|
|
46
|
+
Optional Argument.
|
|
47
|
+
Specifies the name of the column in the output DataFrame, which holds the values of pivoted columns.
|
|
48
|
+
Default Value: "AttributeValue"
|
|
49
|
+
Types: str
|
|
50
|
+
|
|
51
|
+
accumulate:
|
|
52
|
+
Optional Argument.
|
|
53
|
+
Specifies the name(s) of input teradataml DataFrame column(s) to copy to the output.
|
|
54
|
+
By default, the function copies no input teradataml DataFrame columns to the output.
|
|
55
|
+
Types: str OR list of Strings (str)
|
|
56
|
+
|
|
57
|
+
include_nulls:
|
|
58
|
+
Optional Argument.
|
|
59
|
+
Specifies whether or not to include nulls in the transformation.
|
|
60
|
+
Default Value: False
|
|
61
|
+
Types: bool
|
|
62
|
+
|
|
63
|
+
input_types:
|
|
64
|
+
Optional Argument.
|
|
65
|
+
Specifies whether attribute values should be organized into multiple columns based on data type groups.
|
|
66
|
+
Note:
|
|
67
|
+
* 'input_types' argument cannot be used when output_varchar is set to True.
|
|
68
|
+
Default Value: False
|
|
69
|
+
Types: bool
|
|
70
|
+
|
|
71
|
+
output_varchar:
|
|
72
|
+
Optional Argument.
|
|
73
|
+
Specifies whether to output the 'value_column' in varchar format regardless of its data type.
|
|
74
|
+
Note:
|
|
75
|
+
* 'output_varchar' argument cannot be used when input_types is set to True.
|
|
76
|
+
Default Value: False
|
|
77
|
+
Types: bool
|
|
78
|
+
|
|
79
|
+
indexed_attribute:
|
|
80
|
+
Optional Argument.
|
|
81
|
+
Specifies whether to output the column indexes instead of column names in AttributeName column.
|
|
82
|
+
When set to True, outputs the column indexes instead of column names.
|
|
83
|
+
Default Value: False
|
|
84
|
+
Types: bool
|
|
85
|
+
|
|
86
|
+
include_datatypes:
|
|
87
|
+
Optional Argument.
|
|
88
|
+
Specifies whether to output the original datatype name. When set to True,
|
|
89
|
+
outputs the original datatype name.
|
|
90
|
+
Default Value: False
|
|
91
|
+
Types: bool
|
|
92
|
+
|
|
93
|
+
**generic_arguments:
|
|
94
|
+
Specifies the generic keyword arguments SQLE functions accept. Below
|
|
95
|
+
are the generic keyword arguments:
|
|
96
|
+
persist:
|
|
97
|
+
Optional Argument.
|
|
98
|
+
Specifies whether to persist the results of the
|
|
99
|
+
function in a table or not. When set to True,
|
|
100
|
+
results are persisted in a table; otherwise,
|
|
101
|
+
results are garbage collected at the end of the
|
|
102
|
+
session.
|
|
103
|
+
Default Value: False
|
|
104
|
+
Types: bool
|
|
105
|
+
|
|
106
|
+
volatile:
|
|
107
|
+
Optional Argument.
|
|
108
|
+
Specifies whether to put the results of the
|
|
109
|
+
function in a volatile table or not. When set to
|
|
110
|
+
True, results are stored in a volatile table,
|
|
111
|
+
otherwise not.
|
|
112
|
+
Default Value: False
|
|
113
|
+
Types: bool
|
|
114
|
+
|
|
115
|
+
Function allows the user to partition, hash, order or local
|
|
116
|
+
order the input data. These generic arguments are available
|
|
117
|
+
for each argument that accepts teradataml DataFrame as
|
|
118
|
+
input and can be accessed as:
|
|
119
|
+
* "<input_data_arg_name>_partition_column" accepts str or
|
|
120
|
+
list of str (Strings)
|
|
121
|
+
* "<input_data_arg_name>_hash_column" accepts str or list
|
|
122
|
+
of str (Strings)
|
|
123
|
+
* "<input_data_arg_name>_order_column" accepts str or list
|
|
124
|
+
of str (Strings)
|
|
125
|
+
* "local_order_<input_data_arg_name>" accepts boolean
|
|
126
|
+
Note:
|
|
127
|
+
These generic arguments are supported by teradataml if
|
|
128
|
+
the underlying SQL Engine function supports, else an
|
|
129
|
+
exception is raised.
|
|
130
|
+
|
|
131
|
+
RETURNS:
|
|
132
|
+
Instance of Unpivoting.
|
|
133
|
+
Output teradataml DataFrames can be accessed using attribute
|
|
134
|
+
references, such as UnpivotingObj.<attribute_name>.
|
|
135
|
+
Output teradataml DataFrame attribute name is:
|
|
136
|
+
result
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
RAISES:
|
|
140
|
+
TeradataMlException, TypeError, ValueError
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
EXAMPLES:
|
|
144
|
+
# Notes:
|
|
145
|
+
# 1. Get the connection to Vantage, before importing the
|
|
146
|
+
# function in user space.
|
|
147
|
+
# 2. User can import the function, if it is available on
|
|
148
|
+
# Vantage user is connected to.
|
|
149
|
+
# 3. To check the list of analytic functions available on
|
|
150
|
+
# Vantage user connected to, use
|
|
151
|
+
# "display_analytic_functions()".
|
|
152
|
+
|
|
153
|
+
# Load the example data.
|
|
154
|
+
load_example_data('unpivot', 'unpivot_input')
|
|
155
|
+
|
|
156
|
+
# Create teradataml DataFrame objects.
|
|
157
|
+
upvt_inp = DataFrame('unpivot_input')
|
|
158
|
+
|
|
159
|
+
# Check the list of available analytic functions.
|
|
160
|
+
display_analytic_functions()
|
|
161
|
+
|
|
162
|
+
# Import function Unpivoting.
|
|
163
|
+
from teradataml import Unpivoting
|
|
164
|
+
|
|
165
|
+
# Example 1 : Unpivot the data.
|
|
166
|
+
upvt1 = Unpivoting(data = upvt_inp,
|
|
167
|
+
id_column = 'sn',
|
|
168
|
+
target_columns = 'city',
|
|
169
|
+
accumulate = 'week',
|
|
170
|
+
include_nulls = True)
|
|
171
|
+
|
|
172
|
+
# Print the result DataFrame.
|
|
173
|
+
print( upvt1.result)
|
|
174
|
+
|
|
175
|
+
# Example 2 : Unpivot the data with alternate names for the values in
|
|
176
|
+
# the AttributeName output column.
|
|
177
|
+
upvt2= Unpivoting(data = upvt_inp,
|
|
178
|
+
id_column = 'sn',
|
|
179
|
+
target_columns = 'city',
|
|
180
|
+
alias_names = 'city_us',
|
|
181
|
+
attribute_column = "Attribute",
|
|
182
|
+
value_column = "value",
|
|
183
|
+
accumulate = 'week',
|
|
184
|
+
include_nulls = True)
|
|
185
|
+
|
|
186
|
+
# Print the result DataFrame.
|
|
187
|
+
print( upvt2.result)
|
|
188
|
+
|
|
189
|
+
# Example 3 : Unpivot the data with multiple target columns and output
|
|
190
|
+
# data types.
|
|
191
|
+
upvt3 = Unpivoting(data = upvt_inp,
|
|
192
|
+
id_column = 'sn',
|
|
193
|
+
target_columns = ['city','pressure'],
|
|
194
|
+
attribute_column = "Attribute",
|
|
195
|
+
value_column = "value",
|
|
196
|
+
accumulate = 'week',
|
|
197
|
+
include_nulls = True,
|
|
198
|
+
indexed_attribute = True,
|
|
199
|
+
include_datatypes = True)
|
|
200
|
+
|
|
201
|
+
# Print the result DataFrame.
|
|
202
|
+
print( upvt3.result)
|
|
203
|
+
|
|
204
|
+
# Example 4 : Unpivot the data with multiple target columns and output
|
|
205
|
+
# the input types.
|
|
206
|
+
upvt4 = Unpivoting(data = upvt_inp,
|
|
207
|
+
id_column = 'sn',
|
|
208
|
+
target_columns = ['city','temp'],
|
|
209
|
+
accumulate = 'week',
|
|
210
|
+
include_nulls = True,
|
|
211
|
+
input_types = True)
|
|
212
|
+
|
|
213
|
+
# Print the result DataFrame.
|
|
214
|
+
print( upvt4.result)
|
|
215
|
+
|
|
216
|
+
"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
def XGBoost(formula=None, data=None, input_columns=None, response_column=None, max_depth=5,
|
|
2
2
|
num_boosted_trees=-1, min_node_size=1, seed=1, model_type='REGRESSION',
|
|
3
|
-
coverage_factor=1.0, min_impurity=0.0, lambda1=
|
|
4
|
-
|
|
3
|
+
coverage_factor=1.0, min_impurity=0.0, lambda1=1, shrinkage_factor=0.5,
|
|
4
|
+
column_sampling=1.0, iter_num=10, tree_size=-1, base_score=0.0,
|
|
5
5
|
**generic_arguments):
|
|
6
6
|
"""
|
|
7
7
|
DESCRIPTION:
|
|
@@ -174,7 +174,7 @@ def XGBoost(formula=None, data=None, input_columns=None, response_column=None, m
|
|
|
174
174
|
Notes:
|
|
175
175
|
* The "lambda1" must be in the range [0, 100000].
|
|
176
176
|
* The value 0 specifies no regularization.
|
|
177
|
-
Default Value:
|
|
177
|
+
Default Value: 1
|
|
178
178
|
Types: float OR int
|
|
179
179
|
|
|
180
180
|
shrinkage_factor:
|
|
@@ -185,7 +185,7 @@ def XGBoost(formula=None, data=None, input_columns=None, response_column=None, m
|
|
|
185
185
|
Notes:
|
|
186
186
|
* The "shrinkage_factor" is a DOUBLE PRECISION value in the range (0, 1].
|
|
187
187
|
* The value 1 specifies no shrinkage.
|
|
188
|
-
Default Value: 0.
|
|
188
|
+
Default Value: 0.5
|
|
189
189
|
Types: float
|
|
190
190
|
|
|
191
191
|
column_sampling:
|
|
@@ -217,6 +217,14 @@ def XGBoost(formula=None, data=None, input_columns=None, response_column=None, m
|
|
|
217
217
|
Default Value: -1
|
|
218
218
|
Types: int
|
|
219
219
|
|
|
220
|
+
base_score:
|
|
221
|
+
Optional Argument.
|
|
222
|
+
Specifies the initial prediction value for all data points.
|
|
223
|
+
Note:
|
|
224
|
+
* The "base_score" must be in the range [-1e50, 1e50].
|
|
225
|
+
Default Value: 0.0
|
|
226
|
+
Types: float
|
|
227
|
+
|
|
220
228
|
**generic_arguments:
|
|
221
229
|
Specifies the generic keyword arguments SQLE functions accept. Below
|
|
222
230
|
are the generic keyword arguments:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
def XGBoostPredict(newdata=None, object=None, id_column=None, num_boosted_tree=1000,
|
|
2
2
|
iter_num=3, accumulate=None, output_prob=False, model_type="REGRESSION",
|
|
3
|
-
output_responses=None,
|
|
3
|
+
output_responses=None, detailed=False, **generic_arguments):
|
|
4
4
|
"""
|
|
5
5
|
DESCRIPTION:
|
|
6
6
|
The XGBoostPredict() function runs the predictive algorithm based on the model generated
|
|
@@ -123,6 +123,12 @@ def XGBoostPredict(newdata=None, object=None, id_column=None, num_boosted_tree=1
|
|
|
123
123
|
'Classification'.
|
|
124
124
|
Types: str OR list of str(s)
|
|
125
125
|
|
|
126
|
+
detailed:
|
|
127
|
+
Optional Argument.
|
|
128
|
+
Specifies whether to output detailed information of each prediction.
|
|
129
|
+
Default Value: False
|
|
130
|
+
Types: bool
|
|
131
|
+
|
|
126
132
|
**generic_arguments:
|
|
127
133
|
Specifies the generic keyword arguments SQLE functions accept. Below
|
|
128
134
|
are the generic keyword arguments:
|