# #19 place solution I only trained on the rows from week 9. I used Apache Spark to create 12 features for those rows and XGBoost to train the model Avg demand for this client Avg demand for thhis product Weighted average demand for this product, weighted by total demand for each client Avg demand for this product in this city Avg demand for this product at this client Avg demand one weeks ago for this product at this client Avg demand two weeks ago for this product at this client Avg demand three weeks ago for this product at this client Avg demand four weeks ago for this product at this client Avg demand five weeks ago for this product at this client Predicted demand for this week by linear regression FTRL model using the following features: For every row in week 9, I calculated the historic average demand (before week 9) that that client had sold. Then I made tuples of the type (This_product_id,previously_sold_product_id) and hashed them. The feature value was the average demand of the previously sold product. I also hashed the ID's in the row and gave them the feature value 1.0 The output value was the demand for the given row. Predicted demand for this week by linear regression FTRL model using the following features: For all rows before week 9, I hashed all IDs and gave them the value 1.0. I also used poly4 interaction of the IDs and gave them the value 1.0 The output value was the demand for the given row.