TD_RandomProjectionTransform Function Example | Teradata Vantage - TD_RandomProjectionTransform Example - Analytics Database

Database Analytic Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
lifecycle
latest
Product Category
Teradata Vantageā„¢

TD_RandomProjectionTransform Input Table

Each of the input data points in the following input table consists of 963 columns and a unique identifier of the data point:

company_id	date_2010_01_04	date_2010_01_05		....		date_2013_10_28		date_2013_10_29
1			0.58			-0.220005							0.840019		-19.589981
2			-0.640002		-0.65								-0.400002		0.66			
3			-2.350006		1.260009			....			-1.760009		3.740021
4			0.109997		0									0.040001		0.540001
5			0.459999		1.77				....			1.130005		0.309998				
6			0.45			0.460001							-0.06			-0.11					
7			0.18			0.220001			....			0.330002		1.150001		
8			0.73			0.369999							0.090001		-0.110001		
9			0.899997		0.700001			....			-0.220001		0.159996		
10			0.36			0.909996							1.070003		1.050003		

FITTable (Generated from TD_RandomProjectionFit)

td_rpj_feature_353_0	date_2010_01_04	date_2010_01_05	....	date_2013_10_28	date_2013_10_29
0						-0.068021509	-0.021542237	....	0.031534748		-0.021109446
1						0.076606803		0.033381927		....	0.047328448		0.039908753
2						-0.100981365	0.026625478		....	-0.035816093	-0.009469693
....					....			....			....		....			....
....					....			....			....		....			....
351						0.039755885		-0.040469189	....	0.046338113		0.018347439
352						0.040278453		0.072748211		....	-0.04456492		-0.031728421

TD_RandomProjectionTransform SQL Call

SELECT * FROM TD_RandomProjectionTransform(
ON stock_movement as InputTable
ON rand_proj_fit_tbl_ex as FitTable DIMENSION
USING
Accumulate('company_id')
) as dt ORDER BY 1,2;

TD_RandomProjectionTransform Output Table

company_id	td_rpj_feature_0	td_rpj_feature_1	....		td_rpj_feature_351	td_rpj_feature_352
1			5.545038445			-18.76927716					-4.260967918		1.729951186
2			0.38584145			-1.436265087		....		-0.666327415		-0.820435756
3			-2.173481389		-1.528033248					2.975176363			-4.719261735
4			-0.193832387		-1.093648166		....		0.07893702			0.923864022
5			-1.542301006		-1.794068037					-0.795435421		0.797221691
6			-0.344011761		-0.344862717		....		0.13398249			0.088007141
7			0.899506286			-1.592144274					-1.225987822		0.192506954
8			0.446963102			-0.736407073		....		0.133092795			0.192294245
9			-3.02747734			-3.933652254					-0.086266401		-2.545520414
10			1.937290638			0.498908831			....		-0.393961865		-0.88549645