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,348 @@
1
+ token,category,prob
2
+ what,no_crash,0.117647058823529
3
+ can't,no_crash,0.117647058823529
4
+ 97v017000,no_crash,0.117647058823529
5
+ ,no_crash,0.941176470588235
6
+ impact,crash,0.285714285714286
7
+ one,crash,0.285714285714286
8
+ time,no_crash,0.176470588235294
9
+ ,crash,0.857142857142857
10
+ 1998,no_crash,0.117647058823529
11
+ hous,no_crash,0.117647058823529
12
+ move,no_crash,0.117647058823529
13
+ 66900,no_crash,0.117647058823529
14
+ inflat,crash,0.285714285714286
15
+ 99v029000,no_crash,0.117647058823529
16
+ perform,no_crash,0.117647058823529
17
+ passeng,crash,0.571428571428571
18
+ car,crash,0.285714285714286
19
+ also,no_crash,0.235294117647059
20
+ recal,no_crash,0.235294117647059
21
+ happen,no_crash,0.117647058823529
22
+ caus,no_crash,0.235294117647059
23
+ check,no_crash,0.117647058823529
24
+ 65,crash,0.285714285714286
25
+ occur,no_crash,0.117647058823529
26
+ caus,crash,0.285714285714286
27
+ lower,no_crash,0.117647058823529
28
+ reimburs,no_crash,0.117647058823529
29
+ dealer,no_crash,0.294117647058824
30
+ own,no_crash,0.117647058823529
31
+ pedal,no_crash,0.117647058823529
32
+ rain,no_crash,0.117647058823529
33
+ dealer,crash,0.285714285714286
34
+ defect,no_crash,0.235294117647059
35
+ with,crash,0.285714285714286
36
+ light,no_crash,0.117647058823529
37
+ down,no_crash,0.176470588235294
38
+ engin,no_crash,0.176470588235294
39
+ slip,no_crash,0.117647058823529
40
+ inform,no_crash,0.235294117647059
41
+ was,no_crash,0.411764705882353
42
+ engin,crash,0.285714285714286
43
+ 50,crash,0.285714285714286
44
+ his,crash,0.285714285714286
45
+ was,crash,0.428571428571429
46
+ reinspect,no_crash,0.117647058823529
47
+ stop,no_crash,0.117647058823529
48
+ 35,crash,0.285714285714286
49
+ replac,no_crash,0.235294117647059
50
+ by,no_crash,0.235294117647059
51
+ yh,no_crash,0.117647058823529
52
+ coil,no_crash,0.117647058823529
53
+ not,no_crash,0.294117647058824
54
+ by,crash,0.285714285714286
55
+ cover,crash,0.285714285714286
56
+ periodc,no_crash,0.117647058823529
57
+ not,crash,0.571428571428571
58
+ wheel,no_crash,0.176470588235294
59
+ injuriesdeal,crash,0.285714285714286
60
+ that,no_crash,0.176470588235294
61
+ involv,crash,0.285714285714286
62
+ wheel,crash,0.285714285714286
63
+ of,no_crash,0.235294117647059
64
+ wiper,no_crash,0.176470588235294
65
+ will,no_crash,0.235294117647059
66
+ press,no_crash,0.117647058823529
67
+ sustain,crash,0.285714285714286
68
+ inclin,no_crash,0.117647058823529
69
+ wear,no_crash,0.117647058823529
70
+ forward,crash,0.285714285714286
71
+ pull,no_crash,0.117647058823529
72
+ upon,crash,0.285714285714286
73
+ cruis,no_crash,0.117647058823529
74
+ leak,no_crash,0.176470588235294
75
+ if,no_crash,0.117647058823529
76
+ has,no_crash,0.352941176470588
77
+ modul,no_crash,0.117647058823529
78
+ vehicl,no_crash,0.588235294117647
79
+ make,crash,0.285714285714286
80
+ has,crash,0.285714285714286
81
+ ford,crash,0.285714285714286
82
+ vehicl,crash,0.571428571428571
83
+ malfunct,no_crash,0.117647058823529
84
+ mphand,crash,0.285714285714286
85
+ which,no_crash,0.176470588235294
86
+ neck,crash,0.285714285714286
87
+ total,no_crash,0.176470588235294
88
+ hit,no_crash,0.117647058823529
89
+ high,crash,0.285714285714286
90
+ controlc,no_crash,0.117647058823529
91
+ total,crash,0.285714285714286
92
+ hit,crash,0.571428571428571
93
+ condit,crash,0.285714285714286
94
+ becom,no_crash,0.117647058823529
95
+ burn,no_crash,0.117647058823529
96
+ sit,no_crash,0.117647058823529
97
+ and,no_crash,0.529411764705882
98
+ 2,no_crash,0.117647058823529
99
+ doe,no_crash,0.117647058823529
100
+ blew,no_crash,0.117647058823529
101
+ and,crash,0.714285714285714
102
+ excess,no_crash,0.117647058823529
103
+ but,no_crash,0.117647058823529
104
+ result,no_crash,0.117647058823529
105
+ is,no_crash,0.352941176470588
106
+ around,no_crash,0.117647058823529
107
+ but,crash,0.285714285714286
108
+ steer,no_crash,0.117647058823529
109
+ speedomet,no_crash,0.117647058823529
110
+ lurch,crash,0.285714285714286
111
+ hour,no_crash,0.117647058823529
112
+ steer,crash,0.285714285714286
113
+ driver,no_crash,0.117647058823529
114
+ increasedit,no_crash,0.117647058823529
115
+ shut,no_crash,0.176470588235294
116
+ deer,crash,0.285714285714286
117
+ driver,crash,0.714285714285714
118
+ incid,crash,0.285714285714286
119
+ intermitt,no_crash,0.117647058823529
120
+ power,no_crash,0.117647058823529
121
+ itself,no_crash,0.117647058823529
122
+ it,no_crash,0.176470588235294
123
+ gear,no_crash,0.117647058823529
124
+ occas,crash,0.285714285714286
125
+ idl,crash,0.285714285714286
126
+ it,crash,0.285714285714286
127
+ &,no_crash,0.176470588235294
128
+ follow,no_crash,0.117647058823529
129
+ still,no_crash,0.176470588235294
130
+ case,no_crash,0.117647058823529
131
+ broke,no_crash,0.176470588235294
132
+ keep,no_crash,0.117647058823529
133
+ still,crash,0.285714285714286
134
+ truck,no_crash,0.117647058823529
135
+ 68000,no_crash,0.117647058823529
136
+ to,no_crash,0.470588235294118
137
+ mph,crash,0.571428571428571
138
+ truck,crash,0.285714285714286
139
+ bag,crash,0.571428571428571
140
+ to,crash,0.428571428571429
141
+ fail,no_crash,0.117647058823529
142
+ about,no_crash,0.117647058823529
143
+ head,no_crash,0.117647058823529
144
+ refer,no_crash,0.117647058823529
145
+ determin,no_crash,0.176470588235294
146
+ about,crash,0.285714285714286
147
+ side,no_crash,0.117647058823529
148
+ transmiss,no_crash,0.176470588235294
149
+ determin,crash,0.285714285714286
150
+ embank,crash,0.285714285714286
151
+ side,crash,0.571428571428571
152
+ smoke,no_crash,0.117647058823529
153
+ windshield,no_crash,0.176470588235294
154
+ manufactur,no_crash,0.352941176470588
155
+ saw,no_crash,0.117647058823529
156
+ brake,no_crash,0.176470588235294
157
+ windshield,crash,0.285714285714286
158
+ almost,no_crash,0.117647058823529
159
+ complet,no_crash,0.117647058823529
160
+ when,no_crash,0.352941176470588
161
+ start,no_crash,0.176470588235294
162
+ week,crash,0.285714285714286
163
+ cabl,no_crash,0.117647058823529
164
+ when,crash,0.285714285714286
165
+ nois,no_crash,0.117647058823529
166
+ at,no_crash,0.235294117647059
167
+ consum,no_crash,0.352941176470588
168
+ further,no_crash,0.117647058823529
169
+ had,no_crash,0.235294117647059
170
+ at,crash,0.428571428571429
171
+ consum,crash,0.428571428571429
172
+ referenc,no_crash,0.117647058823529
173
+ had,crash,0.285714285714286
174
+ airbag,no_crash,0.117647058823529
175
+ themselv,no_crash,0.117647058823529
176
+ head-on,crash,0.571428571428571
177
+ chang,no_crash,0.117647058823529
178
+ airbag,crash,0.571428571428571
179
+ alternator/,no_crash,0.117647058823529
180
+ stall,no_crash,0.176470588235294
181
+ owner,no_crash,0.235294117647059
182
+ knee,crash,0.285714285714286
183
+ storm,no_crash,0.117647058823529
184
+ NAIVE_BAYES_PRIOR_PROBABILITY,no_crash,0.75
185
+ two,crash,0.285714285714286
186
+ 10mph,no_crash,0.117647058823529
187
+ over,no_crash,0.117647058823529
188
+ NAIVE_BAYES_PRIOR_PROBABILITY,crash,0.25
189
+ compart,no_crash,0.117647058823529
190
+ inop,no_crash,0.117647058823529
191
+ made,no_crash,0.117647058823529
192
+ awar,no_crash,0.117647058823529
193
+ approxim,crash,0.571428571428571
194
+ transfer,no_crash,0.117647058823529
195
+ without,no_crash,0.117647058823529
196
+ have,no_crash,0.176470588235294
197
+ repair,no_crash,0.235294117647059
198
+ electr,no_crash,0.117647058823529
199
+ rpms,no_crash,0.117647058823529
200
+ eard,no_crash,0.117647058823529
201
+ travel,no_crash,0.117647058823529
202
+ dealership,no_crash,0.117647058823529
203
+ whi,crash,0.285714285714286
204
+ under,no_crash,0.176470588235294
205
+ travel,crash,0.285714285714286
206
+ rear,no_crash,0.117647058823529
207
+ factori,no_crash,0.117647058823529
208
+ off,no_crash,0.176470588235294
209
+ notifi,no_crash,0.176470588235294
210
+ rear,crash,0.285714285714286
211
+ be,no_crash,0.176470588235294
212
+ then,no_crash,0.117647058823529
213
+ for,no_crash,0.117647058823529
214
+ stuck,no_crash,0.117647058823529
215
+ a,no_crash,0.294117647058824
216
+ then,crash,0.285714285714286
217
+ for,crash,0.285714285714286
218
+ would,no_crash,0.235294117647059
219
+ a,crash,0.714285714285714
220
+ ran,crash,0.285714285714286
221
+ injuri,crash,0.428571428571429
222
+ recker,no_crash,0.117647058823529
223
+ unexpect,no_crash,0.117647058823529
224
+ ignit,no_crash,0.176470588235294
225
+ NAIVE_BAYES_TEXT_MODEL_TYPE,BERNOULLI,1.0
226
+ sunroof,no_crash,0.117647058823529
227
+ ball,no_crash,0.117647058823529
228
+ expens,no_crash,0.117647058823529
229
+ rearend,crash,0.285714285714286
230
+ notfi,no_crash,0.117647058823529
231
+ back,no_crash,0.117647058823529
232
+ do,no_crash,0.117647058823529
233
+ batteri,no_crash,0.117647058823529
234
+ come,no_crash,0.117647058823529
235
+ back,crash,0.285714285714286
236
+ deploy,crash,0.714285714285714
237
+ mile,no_crash,0.176470588235294
238
+ hill,no_crash,0.117647058823529
239
+ on,no_crash,0.352941176470588
240
+ or,crash,0.285714285714286
241
+ 3,no_crash,0.176470588235294
242
+ slow,no_crash,0.117647058823529
243
+ on,crash,0.428571428571429
244
+ could,no_crash,0.117647058823529
245
+ off/on,no_crash,0.117647058823529
246
+ slow,crash,0.285714285714286
247
+ walnut,no_crash,0.117647058823529
248
+ did,crash,0.571428571428571
249
+ 45,crash,0.285714285714286
250
+ jiggl,no_crash,0.117647058823529
251
+ mechan,no_crash,0.117647058823529
252
+ from,no_crash,0.176470588235294
253
+ driveshaft,no_crash,0.117647058823529
254
+ 4,no_crash,0.117647058823529
255
+ r&r,no_crash,0.117647058823529
256
+ problem,no_crash,0.294117647058824
257
+ bumper,crash,0.285714285714286
258
+ provid,no_crash,0.117647058823529
259
+ work,no_crash,0.235294117647059
260
+ after,no_crash,0.176470588235294
261
+ 1,no_crash,0.117647058823529
262
+ proper,no_crash,0.117647058823529
263
+ fold,crash,0.285714285714286
264
+ into,no_crash,0.117647058823529
265
+ loss,no_crash,0.117647058823529
266
+ four,no_crash,0.117647058823529
267
+ receiv,crash,0.285714285714286
268
+ into,crash,0.428571428571429
269
+ front,no_crash,0.176470588235294
270
+ 70mph,crash,0.285714285714286
271
+ accur,no_crash,0.117647058823529
272
+ f350,crash,0.285714285714286
273
+ front,crash,0.428571428571429
274
+ left,no_crash,0.176470588235294
275
+ pump,no_crash,0.117647058823529
276
+ were,no_crash,0.117647058823529
277
+ up,no_crash,0.176470588235294
278
+ left,crash,0.285714285714286
279
+ 80,crash,0.285714285714286
280
+ motor,no_crash,0.117647058823529
281
+ while,no_crash,0.176470588235294
282
+ side/,crash,0.285714285714286
283
+ ea02-025,no_crash,0.117647058823529
284
+ NAIVE_BAYES_MISSING_TOKEN_PROBABILITY,no_crash,0.0588235294117647
285
+ while,crash,0.285714285714286
286
+ open,crash,0.285714285714286
287
+ NAIVE_BAYES_MISSING_TOKEN_PROBABILITY,crash,0.142857142857143
288
+ son,no_crash,0.117647058823529
289
+ want,no_crash,0.117647058823529
290
+ park,no_crash,0.117647058823529
291
+ air,crash,0.571428571428571
292
+ belts/spe,no_crash,0.117647058823529
293
+ park,crash,0.285714285714286
294
+ the,no_crash,0.705882352941177
295
+ separ,no_crash,0.117647058823529
296
+ hurt,crash,0.285714285714286
297
+ the,crash,0.428571428571429
298
+ thousand,no_crash,0.117647058823529
299
+ pleas,no_crash,0.117647058823529
300
+ bear,no_crash,0.117647058823529
301
+ fenc,crash,0.285714285714286
302
+ correct,no_crash,0.117647058823529
303
+ crash,no_crash,0.117647058823529
304
+ this,no_crash,0.176470588235294
305
+ both,no_crash,0.117647058823529
306
+ crash,crash,0.428571428571429
307
+ out,no_crash,0.176470588235294
308
+ build,crash,0.285714285714286
309
+ shift,no_crash,0.117647058823529
310
+ turn,no_crash,0.117647058823529
311
+ anoth,crash,0.428571428571429
312
+ cannot,no_crash,0.117647058823529
313
+ turn,crash,0.285714285714286
314
+ switch,no_crash,0.176470588235294
315
+ shop,crash,0.285714285714286
316
+ speed,no_crash,0.117647058823529
317
+ joint,no_crash,0.117647058823529
318
+ roll,no_crash,0.117647058823529
319
+ outward,crash,0.285714285714286
320
+ drive,no_crash,0.235294117647059
321
+ fire,no_crash,0.117647058823529
322
+ race,crash,0.285714285714286
323
+ drive,crash,0.285714285714286
324
+ starter,no_crash,0.117647058823529
325
+ shorten,no_crash,0.117647058823529
326
+ dual,crash,0.285714285714286
327
+ frame,no_crash,0.117647058823529
328
+ took,no_crash,0.117647058823529
329
+ *ml,no_crash,0.117647058823529
330
+ tune,no_crash,0.117647058823529
331
+ first,no_crash,0.117647058823529
332
+ end,crash,0.285714285714286
333
+ experienc,no_crash,0.117647058823529
334
+ smell,no_crash,0.117647058823529
335
+ due,no_crash,0.117647058823529
336
+ an,no_crash,0.176470588235294
337
+ stay,no_crash,0.117647058823529
338
+ an,crash,0.285714285714286
339
+ in,no_crash,0.294117647058824
340
+ neither,crash,0.285714285714286
341
+ in,crash,0.428571428571429
342
+ been,no_crash,0.235294117647059
343
+ been,crash,0.285714285714286
344
+ control,no_crash,0.176470588235294
345
+ just,no_crash,0.117647058823529
346
+ gasket,no_crash,0.117647058823529
347
+ foot,no_crash,0.117647058823529
348
+ prior,crash,0.285714285714286
@@ -0,0 +1,83 @@
1
+ city,row_axis,cnumber
2
+ SanDiego,1,2
3
+ SanDiego,2,2
4
+ SanDiego,3,2
5
+ SanDiego,4,2
6
+ SanDiego,5,3
7
+ SanDiego,6,3
8
+ SanDiego,7,3
9
+ SanDiego,8,3
10
+ SanDiego,9,3
11
+ SanDiego,10,3
12
+ SanDiego,11,3
13
+ SanDiego,12,5
14
+ SanDiego,13,8
15
+ SanDiego,14,10
16
+ SanDiego,15,16
17
+ SanDiego,16,55
18
+ SanDiego,17,55
19
+ SanDiego,18,60
20
+ SanDiego,19,80
21
+ SanDiego,20,127
22
+ SanDiego,21,127
23
+ SanDiego,22,155
24
+ SanDiego,23,201
25
+ SanDiego,24,226
26
+ SanDiego,25,238
27
+ SanDiego,26,293
28
+ SanDiego,27,341
29
+ SanDiego,28,413
30
+ SanDiego,29,484
31
+ SanDiego,30,515
32
+ SanDiego,31,603
33
+ SanDiego,32,733
34
+ SanDiego,33,849
35
+ SanDiego,34,966
36
+ SanDiego,35,1112
37
+ SanDiego,36,1209
38
+ SanDiego,37,1326
39
+ SanDiego,38,1404
40
+ SanDiego,39,1454
41
+ SanDiego,40,1530
42
+ SanDiego,41,1628
43
+ SanDiego,42,1693
44
+ SanDiego,43,1761
45
+ SanDiego,44,1804
46
+ SanDiego,45,1847
47
+ SanDiego,46,1930
48
+ SanDiego,47,2012
49
+ SanDiego,48,2087
50
+ SanDiego,49,2158
51
+ SanDiego,50,2213
52
+ SanDiego,51,2268
53
+ SanDiego,52,2325
54
+ SanDiego,53,2491
55
+ SanDiego,54,2643
56
+ SanDiego,55,2826
57
+ SanDiego,56,2943
58
+ SanDiego,57,2943
59
+ SanDiego,58,3043
60
+ SanDiego,59,3141
61
+ SanDiego,60,3432
62
+ SanDiego,61,3432
63
+ SanDiego,62,3564
64
+ SanDiego,63,3711
65
+ SanDiego,64,3927
66
+ SanDiego,65,3927
67
+ SanDiego,66,4020
68
+ SanDiego,67,4319
69
+ SanDiego,68,4319
70
+ SanDiego,69,4429
71
+ SanDiego,70,4662
72
+ SanDiego,71,4776
73
+ SanDiego,72,5065
74
+ SanDiego,73,5161
75
+ SanDiego,74,5161
76
+ SanDiego,75,5391
77
+ SanDiego,76,5391
78
+ SanDiego,77,5662
79
+ SanDiego,78,5836
80
+ SanDiego,79,5836
81
+ SanDiego,80,6026
82
+ SanDiego,81,6140
83
+ SanDiego,82,6140
@@ -143,5 +143,15 @@
143
143
  "smoker" : "varchar(4)",
144
144
  "region" : "varchar(12)",
145
145
  "charges" : "real"
146
+ },
147
+ "grocery_transaction":{
148
+ "tranid" : "integer",
149
+ "period" : "varchar(20)",
150
+ "storeid" : "integer",
151
+ "region" : "varchar(20)",
152
+ "item" : "varchar(20)",
153
+ "sku" : "integer",
154
+ "category" : "varchar(20)"
155
+
146
156
  }
147
157
  }
@@ -0,0 +1,132 @@
1
+ def CFilter(data = None, target_column = None, transaction_id_columns = None,
2
+ partition_columns = None, max_distinct_items = 100,
3
+ **generic_arguments):
4
+
5
+ """
6
+ DESCRIPTION:
7
+ Function calculates several statistical measures of how likely
8
+ each pair of items is to be purchased together.
9
+
10
+ PARAMETERS:
11
+ data:
12
+ Required Argument.
13
+ Specifies the input teradataml DataFrame.
14
+ Types: teradataml DataFrame
15
+
16
+ target_column:
17
+ Required Argument.
18
+ Specifies name of the column from the "data" containing data for filtration.
19
+ Types: str
20
+
21
+ transaction_id_columns:
22
+ Required Argument.
23
+ Specifies the name of the columns in "data" containing transaction id that defines the groups of items listed
24
+ in the input columns that are purchased together.
25
+ Types: str OR list of Strings (str)
26
+
27
+ partition_columns:
28
+ Optional Argument.
29
+ Specifies the name of the column in "data" to partition the data on.
30
+ Types: str OR list of Strings (str)
31
+
32
+ max_distinct_items:
33
+ Optional Argument.
34
+ Specifies the maximum size of the item set.
35
+ Default Value: 100
36
+ Types: int
37
+
38
+ **generic_arguments:
39
+ Specifies the generic keyword arguments SQLE functions accept. Below
40
+ are the generic keyword arguments:
41
+ persist:
42
+ Optional Argument.
43
+ Specifies whether to persist the results of the
44
+ function in a table or not. When set to True,
45
+ results are persisted in a table; otherwise,
46
+ results are garbage collected at the end of the
47
+ session.
48
+ Default Value: False
49
+ Types: bool
50
+
51
+ volatile:
52
+ Optional Argument.
53
+ Specifies whether to put the results of the
54
+ function in a volatile table or not. When set to
55
+ True, results are stored in a volatile table,
56
+ otherwise not.
57
+ Default Value: False
58
+ Types: bool
59
+
60
+ Function allows the user to partition, hash, order or local
61
+ order the input data. These generic arguments are available
62
+ for each argument that accepts teradataml DataFrame as
63
+ input and can be accessed as:
64
+ * "<input_data_arg_name>_partition_column" accepts str or
65
+ list of str (Strings)
66
+ * "<input_data_arg_name>_hash_column" accepts str or list
67
+ of str (Strings)
68
+ * "<input_data_arg_name>_order_column" accepts str or list
69
+ of str (Strings)
70
+ * "local_order_<input_data_arg_name>" accepts boolean
71
+ Note:
72
+ These generic arguments are supported by teradataml if
73
+ the underlying SQL Engine function supports, else an
74
+ exception is raised.
75
+
76
+ RETURNS:
77
+ Instance of CFilter.
78
+ Output teradataml DataFrames can be accessed using attribute
79
+ references, such as CFilterObj.<attribute_name>.
80
+ Output teradataml DataFrame attribute name is:
81
+ result
82
+
83
+
84
+ RAISES:
85
+ TeradataMlException, TypeError, ValueError
86
+
87
+
88
+ EXAMPLES:
89
+ # Notes:
90
+ # 1. Get the connection to Vantage, before importing the
91
+ # function in user space.
92
+ # 2. User can import the function, if it is available on
93
+ # Vantage user is connected to.
94
+ # 3. To check the list of analytic functions available on
95
+ # Vantage user connected to, use
96
+ # "display_analytic_functions()".
97
+
98
+ # Load the example data.
99
+ load_example_data("dataframe", ["grocery_transaction"])
100
+
101
+ # Create teradataml DataFrame objects.
102
+ df = DataFrame.from_table("grocery_transaction")
103
+
104
+ # Check the list of available analytic functions.
105
+ display_analytic_functions()
106
+
107
+ # Import function CFilter.
108
+ from teradataml import CFilter
109
+
110
+ # Example 1: CFilter function to calculate the statistical measures
111
+ # of how likely each pair of items is to be purchased together, without
112
+ # specifying the partition_columns.
113
+ CFilter_out = CFilter(data=df,
114
+ target_column='item',
115
+ transaction_id_columns = 'tranid',
116
+ max_distinct_items=100)
117
+
118
+ # Print the result DataFrame.
119
+ print(CFilter_out.result)
120
+
121
+ # Example 2: CFilter function to calculate the statistical measures
122
+ # of how likely each pair of items is to be purchased together,
123
+ # specifying the partition_columns.
124
+ CFilter_out2 = CFilter(data=df,
125
+ target_column='item',
126
+ transaction_id_columns = 'tranid',
127
+ partiton_columns='storeid',
128
+ max_distinct_items=100)
129
+
130
+ # Print the result DataFrame.
131
+ print(CFilter_out2.result)
132
+ """