Big Data & Machine Learning Cloud OnBoard 1 2 1 Train the model on the collected data 3 2 5 3 6 model 5 7 4 6 Use 8 7 9 8 rain Predicted value 10 9 of taxicab 11 Max temp demand 10 … … 12 11 13 12 Cost 14 13 15 14 Update model based on True value of 16 15 Cost taxicab demand 1716 Neural network imageby Dake, Mysid [CC BY 1.0], via Wikimedia Commons 17 18 Big Data & Machine Learning Cloud OnBoard 1 2 1 Train the model on the collected data 3 2 5 3 6 5 input = pd.DataFrame.from_dict(data = 7 4 6 Use {'dayofweek' : [4, 5, 6], 8 'mintemp' : [60, 15, 60], 7 'maxtemp' : [80, 80, 65], 9 8 'rain' : [0, 0.8, 0]}) 10 9 11 10 12 # read trained model from /tmp/trained_model 11 estimator = DNNRegressor(model_dir='/tmp/trained_model', 13 12 hidden_units=[5]) 14 13 15 14 pred = estimator.predict(input.values) 16 print pred 15 1716 17 18 55
Google Cloud Manual Page 56 Page 58