I am currently have a big table to run a polynomial fit.
1. The goal: generate polynomial fit parameters and export it as a table.
2. The problem: using below JSL, it takes too long time to run the whole table. so I can only subset the table into small groups to run to avoid PC crush.
3. The reason: Below table need to fit the polynominal curve first, then generate the summary table, finally export all classes into 1 table.
Assuming there are 100k classes, it will take a long time to fit the polynominal curve, then export to table.
4. Help needed: Can someone help me to modify the JSL? Make it to fit for each class with polynomial curve, then export to table, then close the polynominal curve window. This will save the DDR SDRAM to keep running all 100k classes adding up only exporting a table of 100k classes, without generating a plots window of 100k.
Thanks for the help.
dt = Current Data Table();
biv = Bivariate( Y( :weight ), X( :age ), Fit Polynomial( 2, {Line Color( {47, 193, 29} )} ), By( :class ) );
rbiv = biv << report;
Summarize( groups = by( class ) ); // A list of all by-groups
n = N Items( groups );
//Create output table and fill with estimates
dtOut = New Table( "Polynominal parameters",
New Column( "class", Character ),
New Column( "T", numeric ),
New Column( "T2", numeric ),
addrows( n )
);
For( j = 1, j <= n, j++,
Estimates = rbiv[j]["Polynomial Fit Degree=2"]["Parameter Estimates"][1][3] << get as matrix;
:class[j] = groups[j];
:T[j] = Estimates[2];
:T2[j] = Estimates[3];
);