Google_TrainedmodelsServiceResource

The "trainedmodels" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api/src/contrib/Google_PredictionService.php  
  1. class Google_TrainedmodelsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Submit model id and request a prediction (trainedmodels.predict) 
  6. * @param string $id The unique name for the predictive model. 
  7. * @param Google_Input $postBody 
  8. * @param array $optParams Optional parameters. 
  9. * @return Google_Output 
  10. */ 
  11. public function predict($id, Google_Input $postBody, $optParams = array()) { 
  12. $params = array('id' => $id, 'postBody' => $postBody); 
  13. $params = array_merge($params, $optParams); 
  14. $data = $this->__call('predict', array($params)); 
  15. if ($this->useObjects()) { 
  16. return new Google_Output($data); 
  17. } else { 
  18. return $data; 
  19. /** 
  20. * Begin training your model. (trainedmodels.insert) 
  21. * @param Google_Training $postBody 
  22. * @param array $optParams Optional parameters. 
  23. * @return Google_Training 
  24. */ 
  25. public function insert(Google_Training $postBody, $optParams = array()) { 
  26. $params = array('postBody' => $postBody); 
  27. $params = array_merge($params, $optParams); 
  28. $data = $this->__call('insert', array($params)); 
  29. if ($this->useObjects()) { 
  30. return new Google_Training($data); 
  31. } else { 
  32. return $data; 
  33. /** 
  34. * Check training status of your model. (trainedmodels.get) 
  35. * @param string $id The unique name for the predictive model. 
  36. * @param array $optParams Optional parameters. 
  37. * @return Google_Training 
  38. */ 
  39. public function get($id, $optParams = array()) { 
  40. $params = array('id' => $id); 
  41. $params = array_merge($params, $optParams); 
  42. $data = $this->__call('get', array($params)); 
  43. if ($this->useObjects()) { 
  44. return new Google_Training($data); 
  45. } else { 
  46. return $data; 
  47. /** 
  48. * Add new data to a trained model. (trainedmodels.update) 
  49. * @param string $id The unique name for the predictive model. 
  50. * @param Google_Update $postBody 
  51. * @param array $optParams Optional parameters. 
  52. * @return Google_Training 
  53. */ 
  54. public function update($id, Google_Update $postBody, $optParams = array()) { 
  55. $params = array('id' => $id, 'postBody' => $postBody); 
  56. $params = array_merge($params, $optParams); 
  57. $data = $this->__call('update', array($params)); 
  58. if ($this->useObjects()) { 
  59. return new Google_Training($data); 
  60. } else { 
  61. return $data; 
  62. /** 
  63. * Delete a trained model. (trainedmodels.delete) 
  64. * @param string $id The unique name for the predictive model. 
  65. * @param array $optParams Optional parameters. 
  66. */ 
  67. public function delete($id, $optParams = array()) { 
  68. $params = array('id' => $id); 
  69. $params = array_merge($params, $optParams); 
  70. $data = $this->__call('delete', array($params)); 
  71. return $data;