TD_RandomProjectionFit Example | RandomProjectionFit - TD_RandomProjectionFit 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-04-06
dita:mapPath
gjn1627595495337.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
jmh1512506877710
Product Category
Teradata Vantageā„¢

TD_RandomProjectionFit 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		

TD_RandomProjectionFit SQL Call

SELECT * FROM TD_RandomProjectionFit(
ON stock_movement as InputTable
OUT PERMANENT TABLE OutputTable(rand_proj_fit_tbl_ex)
USING
TargetColumns('[1:]')
NumComponents(353)
Seed(0)
Epsilon(0.25)
ProjectionMethod('GAUSSIAN')
) as dt ORDER BY 1,2;

Output Table

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