Share via


PersonalizerRankOptions Constructors

Definition

Overloads

PersonalizerRankOptions()

Initializes a new instance of the RankRequest class.

PersonalizerRankOptions(IEnumerable<PersonalizerRankableAction>)

Initializes a new instance of PersonalizerRankOptions.

PersonalizerRankOptions(IEnumerable<PersonalizerRankableAction>, IEnumerable<Object>, IEnumerable<String>, String, Nullable<Boolean>)

Initializes a new instance of the RankRequest class.

PersonalizerRankOptions()

Source:
PersonalizerRankOptions.cs

Initializes a new instance of the RankRequest class.

public PersonalizerRankOptions ();
Public Sub New ()

Applies to

PersonalizerRankOptions(IEnumerable<PersonalizerRankableAction>)

Source:
PersonalizerRankOptions.cs

Initializes a new instance of PersonalizerRankOptions.

public PersonalizerRankOptions (System.Collections.Generic.IEnumerable<Azure.AI.Personalizer.PersonalizerRankableAction> actions);
new Azure.AI.Personalizer.PersonalizerRankOptions : seq<Azure.AI.Personalizer.PersonalizerRankableAction> -> Azure.AI.Personalizer.PersonalizerRankOptions
Public Sub New (actions As IEnumerable(Of PersonalizerRankableAction))

Parameters

actions
IEnumerable<PersonalizerRankableAction>

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.

Exceptions

actions is null.

Applies to

PersonalizerRankOptions(IEnumerable<PersonalizerRankableAction>, IEnumerable<Object>, IEnumerable<String>, String, Nullable<Boolean>)

Source:
PersonalizerRankOptions.cs

Initializes a new instance of the RankRequest class.

public PersonalizerRankOptions (System.Collections.Generic.IEnumerable<Azure.AI.Personalizer.PersonalizerRankableAction> actions, System.Collections.Generic.IEnumerable<object> contextFeatures = default, System.Collections.Generic.IEnumerable<string> excludedActions = default, string eventId = default, bool? deferActivation = default);
new Azure.AI.Personalizer.PersonalizerRankOptions : seq<Azure.AI.Personalizer.PersonalizerRankableAction> * seq<obj> * seq<string> * string * Nullable<bool> -> Azure.AI.Personalizer.PersonalizerRankOptions
Public Sub New (actions As IEnumerable(Of PersonalizerRankableAction), Optional contextFeatures As IEnumerable(Of Object) = Nothing, Optional excludedActions As IEnumerable(Of String) = Nothing, Optional eventId As String = Nothing, Optional deferActivation As Nullable(Of Boolean) = Nothing)

Parameters

actions
IEnumerable<PersonalizerRankableAction>

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.

contextFeatures
IEnumerable<Object>

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. Need to be JSON serializable. https://docs.microsoft.com/azure/cognitive-services/personalizer/concepts-features.

excludedActions
IEnumerable<String>

The set of action ids to exclude from ranking.

eventId
String

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.

deferActivation
Nullable<Boolean>

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.

Applies to