Module Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Str attr Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Return Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num decorator_list If CompareEq NameLoad Str body Assign NameStore Call AttributeLoad Call AttributeLoad Call NameLoad attr Str attr Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults TupleLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpDiv Call AttributeLoad Call AttributeLoad Call AttributeLoad NameLoad attr Lambda arguments args TupleStore NameStore NameStore defaults BinOpPow BinOpSub NameLoad NameLoad Num attr Lambda arguments args NameParam NameParam defaults BinOpAdd NameLoad NameLoad attr Call AttributeLoad NameLoad attr Print BinOpAdd Str Call NameLoad NameLoad
N/A N/A csv numpy array StringIO StringIO pyspark SparkConf SparkContext pyspark.mllib.regression LabeledPoint LinearRegressionWithSGD parsePoint N/A N/A line N/A N/A N/A values N/A N/A N/A N/A csv reader N/A StringIO line delimiter ; next N/A values N/A N/A float x N/A x values N/A N/A LabeledPoint N/A values N/A -1 N/A values N/A -1 N/A N/A N/A __name__ __main__ N/A N/A conf N/A N/A N/A N/A N/A SparkConf setMaster local[*] setAppName Wine Regression N/A sc N/A SparkContext conf conf N/A wines N/A N/A sc textFile winequality-red.csv N/A parsedData N/A N/A wines map parsePoint N/A model N/A N/A LinearRegressionWithSGD train parsedData N/A valuesAndPreds N/A N/A parsedData map N/A N/A N/A p N/A N/A N/A p label N/A N/A model predict N/A p features N/A MSE N/A N/A N/A N/A N/A N/A N/A valuesAndPreds map N/A N/A N/A N/A v p N/A N/A N/A v p 2 reduce N/A N/A N/A x y N/A N/A x y count N/A N/A valuesAndPreds count N/A N/A Mean Squared Error =  N/A str MSE