Simple Sales Prediction
 
08_coefficients
20160616
    val coeff_df= a6.select("shop","product","w0","w1").cache()

Here the final result:

coeff_df.orderBy("shop","product").show()

+----------+-------+------------------+--------------------+                    
|      shop|product|                w0|                  w1|
+----------+-------+------------------+--------------------+
|  megamart|  bread|  414.890872543012|   7.185967535361064|
|  megamart| cheese| 60.70096463022508| -0.6720257234726688|
|  megamart|   milk|27.585414585414583| 0.04695304695304696|
|  megamart|   nuts|         1320.4394|   3.265738461538462|
|  megamart| razors| 523.5143317937795| -0.5744354248425476|
|  megamart|   soap|               8.7|                -0.1|
|superstore|  bread| 371.2372241012408|   4.382494922243877|
|superstore| cheese| 56.37858805275407|0.003103180760279...|
|superstore|   milk| 33.67531219980788|-0.02401536983669545|
|superstore|   nuts|1374.4394045454546| -14.657339160839161|
|superstore| razors|365.28783636363636| -1.9930055944055944|
|superstore|   soap| 7.800000000000001|                -0.1|
+----------+-------+------------------+--------------------+
 
Notes by Data Munging Ninja. Generated on nini:/home/willem/sync/20151223_datamungingninja/simplesalesprediction at 2016-06-25 10:02