Documentation ¶
Overview ¶
Package prediction provides access to the Prediction API.
See https://developers.google.com/prediction/docs/developer-guide
Usage example:
import "google.golang.org/api/prediction/v1.2" ... predictionService, err := prediction.New(oauthHttpClient)
Index ¶
- Constants
- type HostedmodelsPredictCall
- type HostedmodelsService
- type Input
- type InputInput
- type Output
- type OutputOutputMulti
- type PredictCall
- type Service
- type Training
- type TrainingDeleteCall
- type TrainingGetCall
- type TrainingInsertCall
- type TrainingModelInfo
- type TrainingService
- type TrainingUpdateCall
- type Update
Constants ¶
const ( // Manage your data and permissions in Google Cloud Storage DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" // View your data in Google Cloud Storage DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" // Manage your data in Google Cloud Storage DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" // Manage your data in the Google Prediction API PredictionScope = "https://www.googleapis.com/auth/prediction" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostedmodelsPredictCall ¶
type HostedmodelsPredictCall struct {
// contains filtered or unexported fields
}
func (*HostedmodelsPredictCall) Do ¶
func (c *HostedmodelsPredictCall) Do() (*Output, error)
func (*HostedmodelsPredictCall) Fields ¶
func (c *HostedmodelsPredictCall) Fields(s ...googleapi.Field) *HostedmodelsPredictCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type HostedmodelsService ¶
type HostedmodelsService struct {
// contains filtered or unexported fields
}
func NewHostedmodelsService ¶
func NewHostedmodelsService(s *Service) *HostedmodelsService
func (*HostedmodelsService) Predict ¶
func (r *HostedmodelsService) Predict(hostedModelName string, input *Input) *HostedmodelsPredictCall
Predict: Submit input and request an output against a hosted model
type Input ¶
type Input struct {
Input *InputInput `json:"input,omitempty"`
}
type InputInput ¶
type InputInput struct {
CsvInstance []interface{} `json:"csvInstance,omitempty"`
}
type OutputOutputMulti ¶
type PredictCall ¶
type PredictCall struct {
// contains filtered or unexported fields
}
func (*PredictCall) Do ¶
func (c *PredictCall) Do() (*Output, error)
func (*PredictCall) Fields ¶
func (c *PredictCall) Fields(s ...googleapi.Field) *PredictCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type Service ¶
type Service struct { BasePath string // API endpoint base URL UserAgent string // optional additional User-Agent fragment Hostedmodels *HostedmodelsService Training *TrainingService // contains filtered or unexported fields }
type Training ¶
type Training struct { Id string `json:"id,omitempty"` Kind string `json:"kind,omitempty"` ModelInfo *TrainingModelInfo `json:"modelInfo,omitempty"` SelfLink string `json:"selfLink,omitempty"` TrainingStatus string `json:"trainingStatus,omitempty"` }
type TrainingDeleteCall ¶
type TrainingDeleteCall struct {
// contains filtered or unexported fields
}
func (*TrainingDeleteCall) Do ¶
func (c *TrainingDeleteCall) Do() error
func (*TrainingDeleteCall) Fields ¶
func (c *TrainingDeleteCall) Fields(s ...googleapi.Field) *TrainingDeleteCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TrainingGetCall ¶
type TrainingGetCall struct {
// contains filtered or unexported fields
}
func (*TrainingGetCall) Do ¶
func (c *TrainingGetCall) Do() (*Training, error)
func (*TrainingGetCall) Fields ¶
func (c *TrainingGetCall) Fields(s ...googleapi.Field) *TrainingGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TrainingInsertCall ¶
type TrainingInsertCall struct {
// contains filtered or unexported fields
}
func (*TrainingInsertCall) Data ¶
func (c *TrainingInsertCall) Data(data string) *TrainingInsertCall
Data sets the optional parameter "data": mybucket/mydata resource in Google Storage
func (*TrainingInsertCall) Do ¶
func (c *TrainingInsertCall) Do() (*Training, error)
func (*TrainingInsertCall) Fields ¶
func (c *TrainingInsertCall) Fields(s ...googleapi.Field) *TrainingInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type TrainingModelInfo ¶
type TrainingService ¶
type TrainingService struct {
// contains filtered or unexported fields
}
func NewTrainingService ¶
func NewTrainingService(s *Service) *TrainingService
func (*TrainingService) Delete ¶
func (r *TrainingService) Delete(data string) *TrainingDeleteCall
Delete: Delete a trained model
func (*TrainingService) Get ¶
func (r *TrainingService) Get(data string) *TrainingGetCall
Get: Check training status of your model
func (*TrainingService) Insert ¶
func (r *TrainingService) Insert(training *Training) *TrainingInsertCall
Insert: Begin training your model
func (*TrainingService) Update ¶
func (r *TrainingService) Update(data string, update *Update) *TrainingUpdateCall
Update: Add new data to a trained model
type TrainingUpdateCall ¶
type TrainingUpdateCall struct {
// contains filtered or unexported fields
}
func (*TrainingUpdateCall) Do ¶
func (c *TrainingUpdateCall) Do() (*Training, error)
func (*TrainingUpdateCall) Fields ¶
func (c *TrainingUpdateCall) Fields(s ...googleapi.Field) *TrainingUpdateCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.