|
I'm going through an algorithm that does regression on some training data. The training dataset X consists of n samples, where n = 10. Each sample x[i] from X is an array consisting of, say, 4 features. This means that X is a 2D array with 10 rows and 4 columns. One of the lines in the algorithm says, in the midst of a loop using iterator j:
This is Step (2)(a)(ii), on this algorithm: In this case, the index i represents the sample out of the n samples, and j is a loop iterator. My question is - how can g_j(x) be applied to a 2D array? What is the practical application of this formula on arrays? With 10 samples x 4 features each, will I end up calculating g_j(x) 10 times, and for each of those times, will each of the 4 features per sample also have their own g function? For a total of 40 g functions? |
