UpperConfidenceBound
Extends:
Implementation of the Upper Confidence Bound algorithm
Constructor Summary
Public Constructor | ||
public |
constructor(options: Object): this creates a new instance of the Upper confidence bound(UCB) algorithm. |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
learn(ucbRow: Object, getBound: Function): this single step trainning method |
|
public |
predict(): number returns next action based off of the upper confidence bound |
|
public |
train(ucbRow: Object | Object[], getBound: Function): this training method for upper confidence bound calculations |
Inherited Summary
From class ReinforcedLearningBase | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
learn() interface instance method for reinforced learning step |
|
public |
predict() interface instance method for reinforced prediction step |
|
public |
train() interface instance method for reinforced training step |
Public Constructors
public constructor(options: Object): this source
creates a new instance of the Upper confidence bound(UCB) algorithm. UCB is based on the principle of optimism in the face of uncertainty, which is to choose your actions as if the environment (in this case bandit) is as nice as is plausibly possible
Override:
ReinforcedLearningBase#constructorParams:
Name | Type | Attribute | Description |
options | Object |
|
Return:
this |
Example:
const dataset = new ms.ml.UpperConfidenceBound({bounds:10});
See:
- http://banditalgs.com/2016/09/18/the-upper-confidence-bound-algorithm/
Public Methods
public learn(ucbRow: Object, getBound: Function): this source
single step trainning method
Override:
ReinforcedLearningBase#learnParams:
Name | Type | Attribute | Description |
ucbRow | Object | row of bound selections |
|
getBound | Function |
|
select value of ucbRow by selection value |
Return:
this |
public predict(): number source
returns next action based off of the upper confidence bound
Override:
ReinforcedLearningBase#predictReturn:
number | returns bound selection |
public train(ucbRow: Object | Object[], getBound: Function): this source
training method for upper confidence bound calculations
Override:
ReinforcedLearningBase#trainParams:
Name | Type | Attribute | Description |
ucbRow | Object | Object[] | row of bound selections |
|
getBound | Function |
|
select value of ucbRow by selection value |
Return:
this |