Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

(no description)

File Size: 1228 lines (31 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 29 classes

Google_Service_Prediction:: (1 method):
  __construct()

Google_Service_Prediction_Hostedmodels_Resource:: (1 method):
  predict()

Google_Service_Prediction_Trainedmodels_Resource:: (7 methods):
  analyze()
  delete()
  get()
  insert()
  listTrainedmodels()
  predict()
  update()

Google_Service_Prediction_Analyze:: (12 methods):
  setDataDescription()
  getDataDescription()
  setErrors()
  getErrors()
  setId()
  getId()
  setKind()
  getKind()
  setModelDescription()
  getModelDescription()
  setSelfLink()
  getSelfLink()

Google_Service_Prediction_AnalyzeDataDescription:: (4 methods):
  setFeatures()
  getFeatures()
  setOutputFeature()
  getOutputFeature()

Google_Service_Prediction_AnalyzeDataDescriptionFeatures:: (8 methods):
  setCategorical()
  getCategorical()
  setIndex()
  getIndex()
  setNumeric()
  getNumeric()
  setText()
  getText()

Google_Service_Prediction_AnalyzeDataDescriptionFeaturesCategorical:: (4 methods):
  setCount()
  getCount()
  setValues()
  getValues()

Google_Service_Prediction_AnalyzeDataDescriptionFeaturesCategoricalValues:: (4 methods):
  setCount()
  getCount()
  setValue()
  getValue()

Google_Service_Prediction_AnalyzeDataDescriptionFeaturesNumeric:: (6 methods):
  setCount()
  getCount()
  setMean()
  getMean()
  setVariance()
  getVariance()

Google_Service_Prediction_AnalyzeDataDescriptionFeaturesText:: (2 methods):
  setCount()
  getCount()

Google_Service_Prediction_AnalyzeDataDescriptionOutputFeature:: (4 methods):
  setNumeric()
  getNumeric()
  setText()
  getText()

Google_Service_Prediction_AnalyzeDataDescriptionOutputFeatureNumeric:: (6 methods):
  setCount()
  getCount()
  setMean()
  getMean()
  setVariance()
  getVariance()

Google_Service_Prediction_AnalyzeDataDescriptionOutputFeatureText:: (4 methods):
  setCount()
  getCount()
  setValue()
  getValue()

Google_Service_Prediction_AnalyzeErrors:: (0 methods):

Google_Service_Prediction_AnalyzeModelDescription:: (6 methods):
  setConfusionMatrix()
  getConfusionMatrix()
  setConfusionMatrixRowTotals()
  getConfusionMatrixRowTotals()
  setModelinfo()
  getModelinfo()

Google_Service_Prediction_AnalyzeModelDescriptionConfusionMatrix:: (0 methods):

Google_Service_Prediction_AnalyzeModelDescriptionConfusionMatrixElement:: (0 methods):

Google_Service_Prediction_AnalyzeModelDescriptionConfusionMatrixRowTotals:: (0 methods):

Google_Service_Prediction_Input:: (2 methods):
  setInput()
  getInput()

Google_Service_Prediction_InputInput:: (2 methods):
  setCsvInstance()
  getCsvInstance()

Google_Service_Prediction_Insert:: (16 methods):
  setId()
  getId()
  setModelType()
  getModelType()
  setSourceModel()
  getSourceModel()
  setStorageDataLocation()
  getStorageDataLocation()
  setStoragePMMLLocation()
  getStoragePMMLLocation()
  setStoragePMMLModelLocation()
  getStoragePMMLModelLocation()
  setTrainingInstances()
  getTrainingInstances()
  setUtility()
  getUtility()

Google_Service_Prediction_Insert2:: (22 methods):
  setCreated()
  getCreated()
  setId()
  getId()
  setKind()
  getKind()
  setModelInfo()
  getModelInfo()
  setModelType()
  getModelType()
  setSelfLink()
  getSelfLink()
  setStorageDataLocation()
  getStorageDataLocation()
  setStoragePMMLLocation()
  getStoragePMMLLocation()
  setStoragePMMLModelLocation()
  getStoragePMMLModelLocation()
  setTrainingComplete()
  getTrainingComplete()
  setTrainingStatus()
  getTrainingStatus()

Google_Service_Prediction_Insert2ModelInfo:: (12 methods):
  setClassWeightedAccuracy()
  getClassWeightedAccuracy()
  setClassificationAccuracy()
  getClassificationAccuracy()
  setMeanSquaredError()
  getMeanSquaredError()
  setModelType()
  getModelType()
  setNumberInstances()
  getNumberInstances()
  setNumberLabels()
  getNumberLabels()

Google_Service_Prediction_InsertTrainingInstances:: (4 methods):
  setCsvInstance()
  getCsvInstance()
  setOutput()
  getOutput()

Google_Service_Prediction_InsertUtility:: (0 methods):

Google_Service_Prediction_Output:: (12 methods):
  setId()
  getId()
  setKind()
  getKind()
  setOutputLabel()
  getOutputLabel()
  setOutputMulti()
  getOutputMulti()
  setOutputValue()
  getOutputValue()
  setSelfLink()
  getSelfLink()

Google_Service_Prediction_OutputOutputMulti:: (4 methods):
  setLabel()
  getLabel()
  setScore()
  getScore()

Google_Service_Prediction_PredictionList:: (8 methods):
  setItems()
  getItems()
  setKind()
  getKind()
  setNextPageToken()
  getNextPageToken()
  setSelfLink()
  getSelfLink()

Google_Service_Prediction_Update:: (4 methods):
  setCsvInstance()
  getCsvInstance()
  setOutput()
  getOutput()


Class: Google_Service_Prediction  - X-Ref

Service definition for Prediction (v1.6).

<p>
Lets you access a cloud hosted machine learning service that makes it easy to
build smart apps</p>

<p>
For more information about this service, see the API
<a href="https://developers.google.com/prediction/docs/developer-guide" target="_blank">Documentation</a>
</p>

__construct(Google_Client $client)   X-Ref
Constructs the internal representation of the Prediction service.

param: Google_Client $client

Class: Google_Service_Prediction_Hostedmodels_Resource  - X-Ref

The "hostedmodels" collection of methods.
Typical usage is:
<code>
$predictionService = new Google_Service_Prediction(...);
$hostedmodels = $predictionService->hostedmodels;
</code>

predict($project, $hostedModelName, Google_Service_Prediction_Input $postBody, $optParams = array()   X-Ref
Submit input and request an output against a hosted model.
(hostedmodels.predict)

param: string $project The project associated with the model.
param: string $hostedModelName The name of a hosted model.
param: Google_Input $postBody
param: array $optParams Optional parameters.
return: Google_Service_Prediction_Output

Class: Google_Service_Prediction_Trainedmodels_Resource  - X-Ref

The "trainedmodels" collection of methods.
Typical usage is:
<code>
$predictionService = new Google_Service_Prediction(...);
$trainedmodels = $predictionService->trainedmodels;
</code>

analyze($project, $id, $optParams = array()   X-Ref
Get analysis of the model and the data the model was trained on.
(trainedmodels.analyze)

param: string $project The project associated with the model.
param: string $id The unique name for the predictive model.
param: array $optParams Optional parameters.
return: Google_Service_Prediction_Analyze

delete($project, $id, $optParams = array()   X-Ref
Delete a trained model. (trainedmodels.delete)

param: string $project The project associated with the model.
param: string $id The unique name for the predictive model.
param: array $optParams Optional parameters.

get($project, $id, $optParams = array()   X-Ref
Check training status of your model. (trainedmodels.get)

param: string $project The project associated with the model.
param: string $id The unique name for the predictive model.
param: array $optParams Optional parameters.
return: Google_Service_Prediction_Insert2

insert($project, Google_Service_Prediction_Insert $postBody, $optParams = array()   X-Ref
Train a Prediction API model. (trainedmodels.insert)

param: string $project The project associated with the model.
param: Google_Insert $postBody
param: array $optParams Optional parameters.
return: Google_Service_Prediction_Insert2

listTrainedmodels($project, $optParams = array()   X-Ref
List available models. (trainedmodels.listTrainedmodels)

param: string $project The project associated with the model.
param: array $optParams Optional parameters.
return: Google_Service_Prediction_PredictionList

predict($project, $id, Google_Service_Prediction_Input $postBody, $optParams = array()   X-Ref
Submit model id and request a prediction. (trainedmodels.predict)

param: string $project The project associated with the model.
param: string $id The unique name for the predictive model.
param: Google_Input $postBody
param: array $optParams Optional parameters.
return: Google_Service_Prediction_Output

update($project, $id, Google_Service_Prediction_Update $postBody, $optParams = array()   X-Ref
Add new data to a trained model. (trainedmodels.update)

param: string $project The project associated with the model.
param: string $id The unique name for the predictive model.
param: Google_Update $postBody
param: array $optParams Optional parameters.
return: Google_Service_Prediction_Insert2

Class: Google_Service_Prediction_Analyze  - X-Ref

setDataDescription(Google_Service_Prediction_AnalyzeDataDescription $dataDescription)   X-Ref
No description

getDataDescription()   X-Ref
No description

setErrors($errors)   X-Ref
No description

getErrors()   X-Ref
No description

setId($id)   X-Ref
No description

getId()   X-Ref
No description

setKind($kind)   X-Ref
No description

getKind()   X-Ref
No description

setModelDescription(Google_Service_Prediction_AnalyzeModelDescription $modelDescription)   X-Ref
No description

getModelDescription()   X-Ref
No description

setSelfLink($selfLink)   X-Ref
No description

getSelfLink()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescription  - X-Ref

setFeatures($features)   X-Ref
No description

getFeatures()   X-Ref
No description

setOutputFeature(Google_Service_Prediction_AnalyzeDataDescriptionOutputFeature $outputFeature)   X-Ref
No description

getOutputFeature()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescriptionFeatures  - X-Ref

setCategorical(Google_Service_Prediction_AnalyzeDataDescriptionFeaturesCategorical $categorical)   X-Ref
No description

getCategorical()   X-Ref
No description

setIndex($index)   X-Ref
No description

getIndex()   X-Ref
No description

setNumeric(Google_Service_Prediction_AnalyzeDataDescriptionFeaturesNumeric $numeric)   X-Ref
No description

getNumeric()   X-Ref
No description

setText(Google_Service_Prediction_AnalyzeDataDescriptionFeaturesText $text)   X-Ref
No description

getText()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescriptionFeaturesCategorical  - X-Ref

setCount($count)   X-Ref
No description

getCount()   X-Ref
No description

setValues($values)   X-Ref
No description

getValues()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescriptionFeaturesCategoricalValues  - X-Ref

setCount($count)   X-Ref
No description

getCount()   X-Ref
No description

setValue($value)   X-Ref
No description

getValue()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescriptionFeaturesNumeric  - X-Ref

setCount($count)   X-Ref
No description

getCount()   X-Ref
No description

setMean($mean)   X-Ref
No description

getMean()   X-Ref
No description

setVariance($variance)   X-Ref
No description

getVariance()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescriptionOutputFeature  - X-Ref

setNumeric(Google_Service_Prediction_AnalyzeDataDescriptionOutputFeatureNumeric $numeric)   X-Ref
No description

getNumeric()   X-Ref
No description

setText($text)   X-Ref
No description

getText()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescriptionOutputFeatureNumeric  - X-Ref

setCount($count)   X-Ref
No description

getCount()   X-Ref
No description

setMean($mean)   X-Ref
No description

getMean()   X-Ref
No description

setVariance($variance)   X-Ref
No description

getVariance()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeDataDescriptionOutputFeatureText  - X-Ref

setCount($count)   X-Ref
No description

getCount()   X-Ref
No description

setValue($value)   X-Ref
No description

getValue()   X-Ref
No description

Class: Google_Service_Prediction_AnalyzeModelDescription  - X-Ref

setConfusionMatrix($confusionMatrix)   X-Ref
No description

getConfusionMatrix()   X-Ref
No description

setConfusionMatrixRowTotals($confusionMatrixRowTotals)   X-Ref
No description

getConfusionMatrixRowTotals()   X-Ref
No description

setModelinfo(Google_Service_Prediction_Insert2 $modelinfo)   X-Ref
No description

getModelinfo()   X-Ref
No description

Class: Google_Service_Prediction_Input  - X-Ref

setInput(Google_Service_Prediction_InputInput $input)   X-Ref
No description

getInput()   X-Ref
No description

Class: Google_Service_Prediction_InputInput  - X-Ref

setCsvInstance($csvInstance)   X-Ref
No description

getCsvInstance()   X-Ref
No description

Class: Google_Service_Prediction_Insert  - X-Ref

setId($id)   X-Ref
No description

getId()   X-Ref
No description

setModelType($modelType)   X-Ref
No description

getModelType()   X-Ref
No description

setSourceModel($sourceModel)   X-Ref
No description

getSourceModel()   X-Ref
No description

setStorageDataLocation($storageDataLocation)   X-Ref
No description

getStorageDataLocation()   X-Ref
No description

setStoragePMMLLocation($storagePMMLLocation)   X-Ref
No description

getStoragePMMLLocation()   X-Ref
No description

setStoragePMMLModelLocation($storagePMMLModelLocation)   X-Ref
No description

getStoragePMMLModelLocation()   X-Ref
No description

setTrainingInstances($trainingInstances)   X-Ref
No description

getTrainingInstances()   X-Ref
No description

setUtility($utility)   X-Ref
No description

getUtility()   X-Ref
No description

Class: Google_Service_Prediction_Insert2  - X-Ref

setCreated($created)   X-Ref
No description

getCreated()   X-Ref
No description

setId($id)   X-Ref
No description

getId()   X-Ref
No description

setKind($kind)   X-Ref
No description

getKind()   X-Ref
No description

setModelInfo(Google_Service_Prediction_Insert2ModelInfo $modelInfo)   X-Ref
No description

getModelInfo()   X-Ref
No description

setModelType($modelType)   X-Ref
No description

getModelType()   X-Ref
No description

setSelfLink($selfLink)   X-Ref
No description

getSelfLink()   X-Ref
No description

setStorageDataLocation($storageDataLocation)   X-Ref
No description

getStorageDataLocation()   X-Ref
No description

setStoragePMMLLocation($storagePMMLLocation)   X-Ref
No description

getStoragePMMLLocation()   X-Ref
No description

setStoragePMMLModelLocation($storagePMMLModelLocation)   X-Ref
No description

getStoragePMMLModelLocation()   X-Ref
No description

setTrainingComplete($trainingComplete)   X-Ref
No description

getTrainingComplete()   X-Ref
No description

setTrainingStatus($trainingStatus)   X-Ref
No description

getTrainingStatus()   X-Ref
No description

Class: Google_Service_Prediction_Insert2ModelInfo  - X-Ref

setClassWeightedAccuracy($classWeightedAccuracy)   X-Ref
No description

getClassWeightedAccuracy()   X-Ref
No description

setClassificationAccuracy($classificationAccuracy)   X-Ref
No description

getClassificationAccuracy()   X-Ref
No description

setMeanSquaredError($meanSquaredError)   X-Ref
No description

getMeanSquaredError()   X-Ref
No description

setModelType($modelType)   X-Ref
No description

getModelType()   X-Ref
No description

setNumberInstances($numberInstances)   X-Ref
No description

getNumberInstances()   X-Ref
No description

setNumberLabels($numberLabels)   X-Ref
No description

getNumberLabels()   X-Ref
No description

Class: Google_Service_Prediction_InsertTrainingInstances  - X-Ref

setCsvInstance($csvInstance)   X-Ref
No description

getCsvInstance()   X-Ref
No description

setOutput($output)   X-Ref
No description

getOutput()   X-Ref
No description

Class: Google_Service_Prediction_Output  - X-Ref

setId($id)   X-Ref
No description

getId()   X-Ref
No description

setKind($kind)   X-Ref
No description

getKind()   X-Ref
No description

setOutputLabel($outputLabel)   X-Ref
No description

getOutputLabel()   X-Ref
No description

setOutputMulti($outputMulti)   X-Ref
No description

getOutputMulti()   X-Ref
No description

setOutputValue($outputValue)   X-Ref
No description

getOutputValue()   X-Ref
No description

setSelfLink($selfLink)   X-Ref
No description

getSelfLink()   X-Ref
No description

Class: Google_Service_Prediction_OutputOutputMulti  - X-Ref

setLabel($label)   X-Ref
No description

getLabel()   X-Ref
No description

setScore($score)   X-Ref
No description

getScore()   X-Ref
No description

Class: Google_Service_Prediction_PredictionList  - X-Ref

setItems($items)   X-Ref
No description

getItems()   X-Ref
No description

setKind($kind)   X-Ref
No description

getKind()   X-Ref
No description

setNextPageToken($nextPageToken)   X-Ref
No description

getNextPageToken()   X-Ref
No description

setSelfLink($selfLink)   X-Ref
No description

getSelfLink()   X-Ref
No description

Class: Google_Service_Prediction_Update  - X-Ref

setCsvInstance($csvInstance)   X-Ref
No description

getCsvInstance()   X-Ref
No description

setOutput($output)   X-Ref
No description

getOutput()   X-Ref
No description