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
- class Google_TrainedmodelsServiceResource extends Google_ServiceResource {
- /**
- * Submit model id and request a prediction (trainedmodels.predict)
- *
- * @param string $id The unique name for the predictive model.
- * @param Google_Input $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Output
- */
- public function predict($id, Google_Input $postBody, $optParams = array()) {
- $params = array('id' => $id, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('predict', array($params));
- if ($this->useObjects()) {
- return new Google_Output($data);
- } else {
- return $data;
- }
- }
- /**
- * Begin training your model. (trainedmodels.insert)
- *
- * @param Google_Training $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Training
- */
- public function insert(Google_Training $postBody, $optParams = array()) {
- $params = array('postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Training($data);
- } else {
- return $data;
- }
- }
- /**
- * Check training status of your model. (trainedmodels.get)
- *
- * @param string $id The unique name for the predictive model.
- * @param array $optParams Optional parameters.
- * @return Google_Training
- */
- public function get($id, $optParams = array()) {
- $params = array('id' => $id);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Training($data);
- } else {
- return $data;
- }
- }
- /**
- * Add new data to a trained model. (trainedmodels.update)
- *
- * @param string $id The unique name for the predictive model.
- * @param Google_Update $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Training
- */
- public function update($id, Google_Update $postBody, $optParams = array()) {
- $params = array('id' => $id, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_Training($data);
- } else {
- return $data;
- }
- }
- /**
- * Delete a trained model. (trainedmodels.delete)
- *
- * @param string $id The unique name for the predictive model.
- * @param array $optParams Optional parameters.
- */
- public function delete($id, $optParams = array()) {
- $params = array('id' => $id);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- }