tf_agents.bandits.agents.linear_bandit_agent.update_a_and_b_with_forgetting
Stay organized with collections
Save and categorize content based on your preferences.
Update the covariance matrix a
and the weighted sum of rewards b
.
tf_agents.bandits.agents.linear_bandit_agent.update_a_and_b_with_forgetting(
a_prev: tf_agents.typing.types.Tensor
,
b_prev: tf_agents.typing.types.Tensor
,
r: tf_agents.typing.types.Tensor
,
x: tf_agents.typing.types.Tensor
,
gamma: float
) -> Tuple[tf_agents.typing.types.Tensor
, tf_agents.typing.types.Tensor
]
This function updates the covariance matrix a
and the sum of weighted
rewards b
using a forgetting factor gamma
.
Args |
a_prev
|
previous estimate of a .
|
b_prev
|
previous estimate of b .
|
r
|
a Tensor of shape [batch_size ]. This is the rewards of the batched
observations.
|
x
|
a Tensor of shape [batch_size , context_dim ]. This is the matrix
with the (batched) observations.
|
gamma
|
a float forgetting factor in [0.0, 1.0].
|
Returns |
The updated estimates of a and b .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]