A data scientist uses the following SAS code: DATA scored; SET new_customers; ARRAY wts{5} w1-w5; pred = 0; DO i = 1 TO 5; pred + wts{i} * input{i}; END; DROP i; RUN; What is this DATA step implementing?
Select an answer to reveal the explanation.
Short Explanation
Here's the deal — this DATA step is scoring a linear model by hand because it loops over five saved weights and five inputs, adding each weight-input product to pred. That accumulation is a dot product, exactly how you apply coefficients to new customer rows without a SAS procedure.
Full Explanation
The correct implementation is a manual weighted linear combination, or dot product, for scoring a linear model using saved weights. The DATA step creates an array of five weights, initializes pred to zero, loops over five inputs, and adds each weight-input product to pred. That accumulation applies coefficients to new rows, scoring linear or logistic regression without a SAS procedure. The nearest neighbor scoring option is wrong because it computes distances to neighbors, not a weighted sum of coefficients. The random forest voting option is wrong because it sums tree predictions, not multiplies weights by features. The cross-validation fold assignment option is wrong because it partitions rows into folds and does not compute this weighted sum.