neuralNet annScore

High-Volume Batch Scoring of E-commerce Product Recommendations

Scénario de test & Cas d'usage

Business Context

An e-commerce platform needs to refresh product recommendations for its entire user base overnight. This involves scoring a very large table of user-product pairs against a recommendation model. The primary success criterion is the ability to process millions of records reliably and efficiently within the batch window.
About the Set : neuralNet

Training of classical artificial neural networks.

Discover all actions of neuralNet
Data Preparation

Generates a large table `user_product_pairs` with 1 million rows to simulate a realistic batch scoring workload. A pre-trained `recommendation_model` is assumed to exist.

Copied!
1DATA mycas.user_product_pairs(promote=yes);
2 DO UserID = 1 to 10000;
3 DO ProductID = 1 to 100;
4 UserAge = 18 + floor(rand('uniform')*50);
5 ProductCategory = ceil(rand('uniform')*10);
6 OUTPUT;
7 END;
8 END;
9RUN;

Étapes de réalisation

1
Execute the `annScore` action on the large-scale dataset. No complex parameters are used; the focus is on raw throughput and stability.
Copied!
1PROC CAS;
2 neuralNet.annScore /
3 TABLE={name='user_product_pairs'},
4 modelTable={name='recommendation_model'},
5 casOut={name='recommendation_scores', replace=true};
6RUN;
7QUIT;
2
Perform a quick verification by checking the row count of the output table to ensure it matches the input table's row count.
Copied!
1PROC CAS;
2 TABLE.tableInfo / TABLE='recommendation_scores';
3RUN;
4QUIT;

Expected Result


The action should complete successfully without timeout or memory errors. The resulting table `mycas.recommendation_scores` must contain exactly 1,000,000 rows, corresponding to the input data. The log should indicate a successful run, and the output table will contain the original data plus a new column (e.g., `_NN_Pred_`) with the recommendation score for each user-product pair.