personalizer

package
v38.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package personalizer implements the Azure ARM Personalizer service API version v1.0.

Personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	Endpoint string
}

BaseClient is the base client for Personalizer.

func New

func New(endpoint string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

func (BaseClient) Rank

func (client BaseClient) Rank(ctx context.Context, rankRequest RankRequest) (result RankResponse, err error)

Rank submit a Personalizer rank request, to get which of the provided actions should be used in the provided context. Parameters: rankRequest - a Personalizer request.

func (BaseClient) RankPreparer

func (client BaseClient) RankPreparer(ctx context.Context, rankRequest RankRequest) (*http.Request, error)

RankPreparer prepares the Rank request.

func (BaseClient) RankResponder

func (client BaseClient) RankResponder(resp *http.Response) (result RankResponse, err error)

RankResponder handles the response to the Rank request. The method always closes the http.Response Body.

func (BaseClient) RankSender

func (client BaseClient) RankSender(req *http.Request) (*http.Response, error)

RankSender sends the Rank request. The method will close the http.Response Body if it receives an error.

type ContainerStatus

type ContainerStatus struct {
	Service          *string `json:"service,omitempty"`
	APIStatus        *string `json:"apiStatus,omitempty"`
	APIStatusMessage *string `json:"apiStatusMessage,omitempty"`
}

ContainerStatus ...

type DateRange

type DateRange struct {
	// From - READ-ONLY
	From *date.Time `json:"from,omitempty"`
	// To - READ-ONLY
	To *date.Time `json:"to,omitempty"`
}

DateRange ...

type Error

type Error struct {
	// Code - High level error code. Possible values include: 'BadRequest', 'ResourceNotFound', 'InternalServerError', 'InvalidServiceConfiguration', 'InvalidPolicyConfiguration', 'InvalidPolicyContract', 'InvalidEvaluationContract', 'InvalidRewardRequest', 'InvalidEventIDToActivate', 'InvalidRankRequest', 'InvalidExportLogsRequest', 'InvalidContainer', 'FrontEndNotFound', 'EvaluationNotFound', 'LogsPropertiesNotFound', 'RankNullResponse', 'UpdateConfigurationFailed', 'ModelResetFailed'
	Code ErrorCode `json:"code,omitempty"`
	// Message - A message explaining the error reported by the service.
	Message *string `json:"message,omitempty"`
	// Target - Error source element.
	Target *string `json:"target,omitempty"`
	// Details - An array of details about specific errors that led to this reported error.
	Details *[]Error `json:"details,omitempty"`
	// InnerError - Finer error details.
	InnerError *InternalError `json:"innerError,omitempty"`
}

Error the error object.

type ErrorCode

type ErrorCode string

ErrorCode enumerates the values for error code.

const (
	// BadRequest Request could not be understood by the server.
	BadRequest ErrorCode = "BadRequest"
	// EvaluationNotFound Evaluation not found.
	EvaluationNotFound ErrorCode = "EvaluationNotFound"
	// FrontEndNotFound Front end not found.
	FrontEndNotFound ErrorCode = "FrontEndNotFound"
	// InternalServerError A generic error has occurred on the server.
	InternalServerError ErrorCode = "InternalServerError"
	// InvalidContainer SAS Uri must be the Uri to a container that has write permissions.
	InvalidContainer ErrorCode = "InvalidContainer"
	// InvalidEvaluationContract Invalid evaluation contract.
	InvalidEvaluationContract ErrorCode = "InvalidEvaluationContract"
	// InvalidEventIDToActivate Invalid activate event request.
	InvalidEventIDToActivate ErrorCode = "InvalidEventIdToActivate"
	// InvalidExportLogsRequest Invalid export logs request.
	InvalidExportLogsRequest ErrorCode = "InvalidExportLogsRequest"
	// InvalidPolicyConfiguration Invalid policy configuration.
	InvalidPolicyConfiguration ErrorCode = "InvalidPolicyConfiguration"
	// InvalidPolicyContract Invalid policy contract.
	InvalidPolicyContract ErrorCode = "InvalidPolicyContract"
	// InvalidRankRequest Invalid rank request.
	InvalidRankRequest ErrorCode = "InvalidRankRequest"
	// InvalidRewardRequest Invalid reward request.
	InvalidRewardRequest ErrorCode = "InvalidRewardRequest"
	// InvalidServiceConfiguration Invalid service configuration.
	InvalidServiceConfiguration ErrorCode = "InvalidServiceConfiguration"
	// LogsPropertiesNotFound Logs properties not found.
	LogsPropertiesNotFound ErrorCode = "LogsPropertiesNotFound"
	// ModelResetFailed Model reset failed.
	ModelResetFailed ErrorCode = "ModelResetFailed"
	// RankNullResponse Rank call returned null response.
	RankNullResponse ErrorCode = "RankNullResponse"
	// ResourceNotFound Requested resource does not exist on the server.
	ResourceNotFound ErrorCode = "ResourceNotFound"
	// UpdateConfigurationFailed Failed to update configuration.
	UpdateConfigurationFailed ErrorCode = "UpdateConfigurationFailed"
)

func PossibleErrorCodeValues

func PossibleErrorCodeValues() []ErrorCode

PossibleErrorCodeValues returns an array of possible values for the ErrorCode const type.

type ErrorResponse

type ErrorResponse struct {
	// Error - The error object.
	Error *Error `json:"error,omitempty"`
}

ErrorResponse used to return an error to the client

type Evaluation

type Evaluation struct {
	autorest.Response `json:"-"`
	// ID - READ-ONLY
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY
	Name *string `json:"name,omitempty"`
	// StartTime - READ-ONLY
	StartTime *date.Time `json:"startTime,omitempty"`
	// EndTime - READ-ONLY
	EndTime *date.Time `json:"endTime,omitempty"`
	// JobID - READ-ONLY
	JobID *string `json:"jobId,omitempty"`
	// Status - READ-ONLY; Possible values include: 'Completed', 'Pending', 'Failed', 'NotSubmitted'
	Status            EvaluationJobStatus `json:"status,omitempty"`
	PolicyResults     *[]PolicyResult     `json:"policyResults,omitempty"`
	FeatureImportance *[][]string         `json:"featureImportance,omitempty"`
}

Evaluation ...

type EvaluationContract

type EvaluationContract struct {
	// EnableOfflineExperimentation - True if the evaluation should explore for a more optimal Learning settings.
	EnableOfflineExperimentation *bool `json:"enableOfflineExperimentation,omitempty"`
	// Name - The name of the evaluation.
	Name *string `json:"name,omitempty"`
	// StartTime - The start time of the evaluation.
	StartTime *date.Time `json:"startTime,omitempty"`
	// EndTime - The end time of the evaluation.
	EndTime *date.Time `json:"endTime,omitempty"`
	// Policies - Additional Learning settings to evaluate.
	Policies *[]PolicyContract `json:"policies,omitempty"`
}

EvaluationContract a counterfactual evaluation.

type EvaluationJobStatus

type EvaluationJobStatus string

EvaluationJobStatus enumerates the values for evaluation job status.

const (
	// Completed ...
	Completed EvaluationJobStatus = "completed"
	// Failed ...
	Failed EvaluationJobStatus = "failed"
	// NotSubmitted ...
	NotSubmitted EvaluationJobStatus = "notSubmitted"
	// Pending ...
	Pending EvaluationJobStatus = "pending"
)

func PossibleEvaluationJobStatusValues

func PossibleEvaluationJobStatusValues() []EvaluationJobStatus

PossibleEvaluationJobStatusValues returns an array of possible values for the EvaluationJobStatus const type.

type EvaluationsClient

type EvaluationsClient struct {
	BaseClient
}

EvaluationsClient is the personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.

func NewEvaluationsClient

func NewEvaluationsClient(endpoint string) EvaluationsClient

NewEvaluationsClient creates an instance of the EvaluationsClient client.

func (EvaluationsClient) Create

func (client EvaluationsClient) Create(ctx context.Context, evaluation EvaluationContract) (result Evaluation, err error)

Create submit a new evaluation job. Parameters: evaluation - the evaluation job definition.

func (EvaluationsClient) CreatePreparer

func (client EvaluationsClient) CreatePreparer(ctx context.Context, evaluation EvaluationContract) (*http.Request, error)

CreatePreparer prepares the Create request.

func (EvaluationsClient) CreateResponder

func (client EvaluationsClient) CreateResponder(resp *http.Response) (result Evaluation, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (EvaluationsClient) CreateSender

func (client EvaluationsClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (EvaluationsClient) Delete

func (client EvaluationsClient) Delete(ctx context.Context, evaluationID string) (result autorest.Response, err error)

Delete delete the evaluation associated with the Id. Parameters: evaluationID - id of the evaluation to delete.

func (EvaluationsClient) DeletePreparer

func (client EvaluationsClient) DeletePreparer(ctx context.Context, evaluationID string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (EvaluationsClient) DeleteResponder

func (client EvaluationsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (EvaluationsClient) DeleteSender

func (client EvaluationsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (EvaluationsClient) Get

func (client EvaluationsClient) Get(ctx context.Context, evaluationID string) (result Evaluation, err error)

Get get the evaluation associated with the Id. Parameters: evaluationID - id of the evaluation.

func (EvaluationsClient) GetPreparer

func (client EvaluationsClient) GetPreparer(ctx context.Context, evaluationID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (EvaluationsClient) GetResponder

func (client EvaluationsClient) GetResponder(resp *http.Response) (result Evaluation, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (EvaluationsClient) GetSender

func (client EvaluationsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (EvaluationsClient) List

func (client EvaluationsClient) List(ctx context.Context) (result ListEvaluation, err error)

List list all the submitted evaluations.

func (EvaluationsClient) ListPreparer

func (client EvaluationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (EvaluationsClient) ListResponder

func (client EvaluationsClient) ListResponder(resp *http.Response) (result ListEvaluation, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (EvaluationsClient) ListSender

func (client EvaluationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type EventsClient

type EventsClient struct {
	BaseClient
}

EventsClient is the personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.

func NewEventsClient

func NewEventsClient(endpoint string) EventsClient

NewEventsClient creates an instance of the EventsClient client.

func (EventsClient) Activate

func (client EventsClient) Activate(ctx context.Context, eventID string) (result autorest.Response, err error)

Activate report that the specified event was actually displayed to the user and a reward should be expected for it Parameters: eventID - the event ID this activation applies to.

func (EventsClient) ActivatePreparer

func (client EventsClient) ActivatePreparer(ctx context.Context, eventID string) (*http.Request, error)

ActivatePreparer prepares the Activate request.

func (EventsClient) ActivateResponder

func (client EventsClient) ActivateResponder(resp *http.Response) (result autorest.Response, err error)

ActivateResponder handles the response to the Activate request. The method always closes the http.Response Body.

func (EventsClient) ActivateSender

func (client EventsClient) ActivateSender(req *http.Request) (*http.Response, error)

ActivateSender sends the Activate request. The method will close the http.Response Body if it receives an error.

func (EventsClient) Reward

func (client EventsClient) Reward(ctx context.Context, eventID string, reward RewardRequest) (result autorest.Response, err error)

Reward report reward that resulted from using the action specified in rewardActionId for the specified event. Parameters: eventID - the event id this reward applies to. reward - the reward should be a floating point number, typically between 0 and 1.

func (EventsClient) RewardPreparer

func (client EventsClient) RewardPreparer(ctx context.Context, eventID string, reward RewardRequest) (*http.Request, error)

RewardPreparer prepares the Reward request.

func (EventsClient) RewardResponder

func (client EventsClient) RewardResponder(resp *http.Response) (result autorest.Response, err error)

RewardResponder handles the response to the Reward request. The method always closes the http.Response Body.

func (EventsClient) RewardSender

func (client EventsClient) RewardSender(req *http.Request) (*http.Response, error)

RewardSender sends the Reward request. The method will close the http.Response Body if it receives an error.

type InternalError

type InternalError struct {
	// Code - Detailed error code.
	Code *string `json:"code,omitempty"`
	// Innererror - The error object.
	Innererror *InternalError `json:"innererror,omitempty"`
}

InternalError an object containing more specific information than the parent object about the error.

type ListEvaluation

type ListEvaluation struct {
	autorest.Response `json:"-"`
	Value             *[]Evaluation `json:"value,omitempty"`
}

ListEvaluation ...

type LogClient

type LogClient struct {
	BaseClient
}

LogClient is the personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.

func NewLogClient

func NewLogClient(endpoint string) LogClient

NewLogClient creates an instance of the LogClient client.

func (LogClient) Delete

func (client LogClient) Delete(ctx context.Context) (result autorest.Response, err error)

Delete delete all generated logs.

func (LogClient) DeletePreparer

func (client LogClient) DeletePreparer(ctx context.Context) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (LogClient) DeleteResponder

func (client LogClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (LogClient) DeleteSender

func (client LogClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (LogClient) GetProperties

func (client LogClient) GetProperties(ctx context.Context) (result LogsProperties, err error)

GetProperties get properties of generated logs.

func (LogClient) GetPropertiesPreparer

func (client LogClient) GetPropertiesPreparer(ctx context.Context) (*http.Request, error)

GetPropertiesPreparer prepares the GetProperties request.

func (LogClient) GetPropertiesResponder

func (client LogClient) GetPropertiesResponder(resp *http.Response) (result LogsProperties, err error)

GetPropertiesResponder handles the response to the GetProperties request. The method always closes the http.Response Body.

func (LogClient) GetPropertiesSender

func (client LogClient) GetPropertiesSender(req *http.Request) (*http.Response, error)

GetPropertiesSender sends the GetProperties request. The method will close the http.Response Body if it receives an error.

type LogsProperties

type LogsProperties struct {
	autorest.Response `json:"-"`
	// DateRange - READ-ONLY
	DateRange *LogsPropertiesDateRange `json:"dateRange,omitempty"`
}

LogsProperties ...

type LogsPropertiesDateRange

type LogsPropertiesDateRange struct {
	// From - READ-ONLY
	From *date.Time `json:"from,omitempty"`
	// To - READ-ONLY
	To *date.Time `json:"to,omitempty"`
}

LogsPropertiesDateRange ...

type ModelClient

type ModelClient struct {
	BaseClient
}

ModelClient is the personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.

func NewModelClient

func NewModelClient(endpoint string) ModelClient

NewModelClient creates an instance of the ModelClient client.

func (ModelClient) Get

func (client ModelClient) Get(ctx context.Context) (result ReadCloser, err error)

Get get the model file generated by Personalizer service.

func (ModelClient) GetPreparer

func (client ModelClient) GetPreparer(ctx context.Context) (*http.Request, error)

GetPreparer prepares the Get request.

func (ModelClient) GetProperties

func (client ModelClient) GetProperties(ctx context.Context) (result ModelProperties, err error)

GetProperties get properties of the model file generated by Personalizer service.

func (ModelClient) GetPropertiesPreparer

func (client ModelClient) GetPropertiesPreparer(ctx context.Context) (*http.Request, error)

GetPropertiesPreparer prepares the GetProperties request.

func (ModelClient) GetPropertiesResponder

func (client ModelClient) GetPropertiesResponder(resp *http.Response) (result ModelProperties, err error)

GetPropertiesResponder handles the response to the GetProperties request. The method always closes the http.Response Body.

func (ModelClient) GetPropertiesSender

func (client ModelClient) GetPropertiesSender(req *http.Request) (*http.Response, error)

GetPropertiesSender sends the GetProperties request. The method will close the http.Response Body if it receives an error.

func (ModelClient) GetResponder

func (client ModelClient) GetResponder(resp *http.Response) (result ReadCloser, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ModelClient) GetSender

func (client ModelClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (ModelClient) Reset

func (client ModelClient) Reset(ctx context.Context) (result autorest.Response, err error)

Reset resets the model file generated by Personalizer service.

func (ModelClient) ResetPreparer

func (client ModelClient) ResetPreparer(ctx context.Context) (*http.Request, error)

ResetPreparer prepares the Reset request.

func (ModelClient) ResetResponder

func (client ModelClient) ResetResponder(resp *http.Response) (result autorest.Response, err error)

ResetResponder handles the response to the Reset request. The method always closes the http.Response Body.

func (ModelClient) ResetSender

func (client ModelClient) ResetSender(req *http.Request) (*http.Response, error)

ResetSender sends the Reset request. The method will close the http.Response Body if it receives an error.

type ModelProperties

type ModelProperties struct {
	autorest.Response `json:"-"`
	// CreationTime - READ-ONLY
	CreationTime *date.Time `json:"creationTime,omitempty"`
	// LastModifiedTime - READ-ONLY
	LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"`
}

ModelProperties ...

type PolicyClient

type PolicyClient struct {
	BaseClient
}

PolicyClient is the personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.

func NewPolicyClient

func NewPolicyClient(endpoint string) PolicyClient

NewPolicyClient creates an instance of the PolicyClient client.

func (PolicyClient) Get

func (client PolicyClient) Get(ctx context.Context) (result PolicyContract, err error)

Get get the Learning settings currently used by the Personalizer service.

func (PolicyClient) GetPreparer

func (client PolicyClient) GetPreparer(ctx context.Context) (*http.Request, error)

GetPreparer prepares the Get request.

func (PolicyClient) GetResponder

func (client PolicyClient) GetResponder(resp *http.Response) (result PolicyContract, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PolicyClient) GetSender

func (client PolicyClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (PolicyClient) Reset

func (client PolicyClient) Reset(ctx context.Context) (result PolicyContract, err error)

Reset resets the Learning settings of the Personalizer service to default.

func (PolicyClient) ResetPreparer

func (client PolicyClient) ResetPreparer(ctx context.Context) (*http.Request, error)

ResetPreparer prepares the Reset request.

func (PolicyClient) ResetResponder

func (client PolicyClient) ResetResponder(resp *http.Response) (result PolicyContract, err error)

ResetResponder handles the response to the Reset request. The method always closes the http.Response Body.

func (PolicyClient) ResetSender

func (client PolicyClient) ResetSender(req *http.Request) (*http.Response, error)

ResetSender sends the Reset request. The method will close the http.Response Body if it receives an error.

func (PolicyClient) Update

func (client PolicyClient) Update(ctx context.Context, policy PolicyContract) (result PolicyContract, err error)

Update update the Learning settings that the Personalizer service will use to train models. Parameters: policy - the Learning settings.

func (PolicyClient) UpdatePreparer

func (client PolicyClient) UpdatePreparer(ctx context.Context, policy PolicyContract) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (PolicyClient) UpdateResponder

func (client PolicyClient) UpdateResponder(resp *http.Response) (result PolicyContract, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (PolicyClient) UpdateSender

func (client PolicyClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

type PolicyContract

type PolicyContract struct {
	autorest.Response `json:"-"`
	// Name - Name of the Learning settings.
	Name *string `json:"name,omitempty"`
	// Arguments - Arguments of the Learning settings.
	Arguments *string `json:"arguments,omitempty"`
}

PolicyContract learning settings specifying how to train the model.

type PolicyResult

type PolicyResult struct {
	// Name - READ-ONLY
	Name *string `json:"name,omitempty"`
	// Arguments - READ-ONLY
	Arguments *string `json:"arguments,omitempty"`
	// Summary - READ-ONLY
	Summary *[]PolicyResultSummary `json:"summary,omitempty"`
	// TotalSummary - READ-ONLY
	TotalSummary *PolicyResultTotalSummary `json:"totalSummary,omitempty"`
}

PolicyResult ...

type PolicyResultSummary

type PolicyResultSummary struct {
	// TimeStamp - READ-ONLY
	TimeStamp *date.Time `json:"timeStamp,omitempty"`
	// IpsEstimatorNumerator - READ-ONLY
	IpsEstimatorNumerator *float64 `json:"ipsEstimatorNumerator,omitempty"`
	// IpsEstimatorDenominator - READ-ONLY
	IpsEstimatorDenominator *float64 `json:"ipsEstimatorDenominator,omitempty"`
	// SnipsEstimatorDenominator - READ-ONLY
	SnipsEstimatorDenominator *float64 `json:"snipsEstimatorDenominator,omitempty"`
	// AggregateTimeWindow - READ-ONLY
	AggregateTimeWindow *string  `json:"aggregateTimeWindow,omitempty"`
	NonZeroProbability  *float64 `json:"nonZeroProbability,omitempty"`
	// ConfidenceInterval - READ-ONLY
	ConfidenceInterval *float64 `json:"confidenceInterval,omitempty"`
	// SumOfSquares - READ-ONLY
	SumOfSquares *float64 `json:"sumOfSquares,omitempty"`
}

PolicyResultSummary ...

type PolicyResultTotalSummary

type PolicyResultTotalSummary struct {
	// TimeStamp - READ-ONLY
	TimeStamp *date.Time `json:"timeStamp,omitempty"`
	// IpsEstimatorNumerator - READ-ONLY
	IpsEstimatorNumerator *float64 `json:"ipsEstimatorNumerator,omitempty"`
	// IpsEstimatorDenominator - READ-ONLY
	IpsEstimatorDenominator *float64 `json:"ipsEstimatorDenominator,omitempty"`
	// SnipsEstimatorDenominator - READ-ONLY
	SnipsEstimatorDenominator *float64 `json:"snipsEstimatorDenominator,omitempty"`
	// AggregateTimeWindow - READ-ONLY
	AggregateTimeWindow *string  `json:"aggregateTimeWindow,omitempty"`
	NonZeroProbability  *float64 `json:"nonZeroProbability,omitempty"`
	// ConfidenceInterval - READ-ONLY
	ConfidenceInterval *float64 `json:"confidenceInterval,omitempty"`
	// SumOfSquares - READ-ONLY
	SumOfSquares *float64 `json:"sumOfSquares,omitempty"`
}

PolicyResultTotalSummary ...

type RankRequest

type RankRequest struct {
	// ContextFeatures - Features of the context used for Personalizer as a
	// dictionary of dictionaries. This depends on the application, and
	// typically includes features about the current user, their
	// device, profile information, aggregated data about time and date, etc.
	// Features should not include personally identifiable information (PII),
	// unique UserIDs, or precise timestamps.
	ContextFeatures *[]interface{} `json:"contextFeatures,omitempty"`
	// Actions - The set of actions the Personalizer service can pick from.
	// The set should not contain more than 50 actions.
	// The order of the actions does not affect the rank result but the order
	// should match the sequence your application would have used to display them.
	// The first item in the array will be used as Baseline item in Offline evaluations.
	Actions *[]RankableAction `json:"actions,omitempty"`
	// ExcludedActions - The set of action ids to exclude from ranking.
	ExcludedActions *[]string `json:"excludedActions,omitempty"`
	// EventID - Optionally pass an eventId that uniquely identifies this Rank event.
	// If null, the service generates a unique eventId. The eventId will be used for
	// associating this request with its reward, as well as seeding the pseudo-random
	// generator when making a Personalizer call.
	EventID *string `json:"eventId,omitempty"`
	// DeferActivation - Send false if it is certain the rewardActionId in rank results will be shown to the user, therefore
	// Personalizer will expect a Reward call, otherwise it will assign the default
	// Reward to the event. Send true if it is possible the user will not see the
	// action specified in the rank results, because the page is rendering later, or the Rank results may be
	// overridden by code further downstream.
	DeferActivation *bool `json:"deferActivation,omitempty"`
}

RankRequest request a set of actions to be ranked by the Personalizer service.

type RankResponse

type RankResponse struct {
	autorest.Response `json:"-"`
	// Ranking - READ-ONLY; The calculated ranking for the current request.
	Ranking *[]RankedAction `json:"ranking,omitempty"`
	// EventID - READ-ONLY; The eventId for the round trip from request to response.
	EventID *string `json:"eventId,omitempty"`
	// RewardActionID - READ-ONLY; The action chosen by the Personalizer service. This is the action your application should display, and for which to report the reward. This might not be the
	// first found in 'ranking' if an action in the request in first position was part of the excluded ids.
	RewardActionID *string `json:"rewardActionId,omitempty"`
}

RankResponse returns which action to use as rewardActionId, and additional information about each action as a result of a Rank request.

type RankableAction

type RankableAction struct {
	// ID - Id of the action.
	ID *string `json:"id,omitempty"`
	// Features - List of dictionaries containing features.
	Features *[]interface{} `json:"features,omitempty"`
}

RankableAction an action with it's associated features used for ranking.

type RankedAction

type RankedAction struct {
	// ID - READ-ONLY; Id of the action
	ID *string `json:"id,omitempty"`
	// Probability - READ-ONLY; Probability of the action
	Probability *float64 `json:"probability,omitempty"`
}

RankedAction a ranked action with its resulting probability.

type ReadCloser

type ReadCloser struct {
	autorest.Response `json:"-"`
	Value             *io.ReadCloser `json:"value,omitempty"`
}

ReadCloser ...

type RewardRequest

type RewardRequest struct {
	// Value - Reward to be assigned to an action. Value should be between -1 and 1 inclusive.
	Value *float64 `json:"value,omitempty"`
}

RewardRequest reward given to a rank response.

type ServiceConfiguration

type ServiceConfiguration struct {
	autorest.Response `json:"-"`
	// RewardWaitTime - The time span waited until a request is marked with the default reward.
	// For example, PT5M (5 mins). For information about the time format,
	// see http://en.wikipedia.org/wiki/ISO_8601#Durations
	RewardWaitTime *string `json:"rewardWaitTime,omitempty"`
	// DefaultReward - The reward given if a reward is not received within the specified wait time.
	DefaultReward *float64 `json:"defaultReward,omitempty"`
	// RewardAggregation - The function used to process rewards, if multiple reward scores are received before rewardWaitTime is over.
	RewardAggregation *string `json:"rewardAggregation,omitempty"`
	// ExplorationPercentage - The percentage of rank responses that will use exploration.
	ExplorationPercentage *float64 `json:"explorationPercentage,omitempty"`
	// ModelExportFrequency - Personalizer will start using the most updated trained model for online ranks automatically every specified time period.
	// For example, PT5M (5 mins). For information about the time format,
	// see http://en.wikipedia.org/wiki/ISO_8601#Durations
	ModelExportFrequency *string `json:"modelExportFrequency,omitempty"`
	// LogMirrorEnabled - Flag indicates whether log mirroring is enabled.
	LogMirrorEnabled *bool `json:"logMirrorEnabled,omitempty"`
	// LogMirrorSasURI - Azure storage account container SAS URI for log mirroring.
	LogMirrorSasURI *string `json:"logMirrorSasUri,omitempty"`
	// LogRetentionDays - Number of days historical logs are to be maintained. -1 implies the logs will never be deleted.
	LogRetentionDays *int32 `json:"logRetentionDays,omitempty"`
}

ServiceConfiguration the configuration of the service.

type ServiceConfigurationClient

type ServiceConfigurationClient struct {
	BaseClient
}

ServiceConfigurationClient is the personalizer Service is an Azure Cognitive Service that makes it easy to target content and experiences without complex pre-analysis or cleanup of past data. Given a context and featurized content, the Personalizer Service returns which content item to show to users in rewardActionId. As rewards are sent in response to the use of rewardActionId, the reinforcement learning algorithm will improve the model and improve performance of future rank calls.

func NewServiceConfigurationClient

func NewServiceConfigurationClient(endpoint string) ServiceConfigurationClient

NewServiceConfigurationClient creates an instance of the ServiceConfigurationClient client.

func (ServiceConfigurationClient) Get

Get get the Personalizer service configuration.

func (ServiceConfigurationClient) GetPreparer

func (client ServiceConfigurationClient) GetPreparer(ctx context.Context) (*http.Request, error)

GetPreparer prepares the Get request.

func (ServiceConfigurationClient) GetResponder

func (client ServiceConfigurationClient) GetResponder(resp *http.Response) (result ServiceConfiguration, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ServiceConfigurationClient) GetSender

func (client ServiceConfigurationClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (ServiceConfigurationClient) Update

Update update the Personalizer service configuration. Parameters: config - the personalizer service configuration.

func (ServiceConfigurationClient) UpdatePreparer

func (client ServiceConfigurationClient) UpdatePreparer(ctx context.Context, config ServiceConfiguration) (*http.Request, error)

UpdatePreparer prepares the Update request.

func (ServiceConfigurationClient) UpdateResponder

func (client ServiceConfigurationClient) UpdateResponder(resp *http.Response) (result ServiceConfiguration, err error)

UpdateResponder handles the response to the Update request. The method always closes the http.Response Body.

func (ServiceConfigurationClient) UpdateSender

func (client ServiceConfigurationClient) UpdateSender(req *http.Request) (*http.Response, error)

UpdateSender sends the Update request. The method will close the http.Response Body if it receives an error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL