truelearn.models
.LearnerMetaWeights#
- class truelearn.models.LearnerMetaWeights(novelty_weights: Weights = Weights(mean=0.5, variance=0.5), interest_weights: Weights = Weights(mean=0.5, variance=0.5), bias_weights: Weights = Weights(mean=0.0, variance=0.5))[source]#
Bases:
object
Store the weights used in meta training.
Examples
>>> from truelearn.models import LearnerMetaWeights >>> # construct an empty learner meta model >>> LearnerMetaWeights() LearnerMetaWeights(novelty_weights=Weights(mean=0.5, variance=0.5)...) >>> # construct a learner meta model with custom weights >>> bias_weights = LearnerMetaWeights.Weights(mean=1.0, variance=2.0) >>> LearnerMetaWeights(bias_weights=bias_weights) LearnerMetaWeights(...bias_weights=Weights(mean=1.0, variance=2.0))
Attributes
- bias_weights: Weights = Weights(mean=0.0, variance=0.5)#
A dict that stores the “mean” and “variance” of a bias variable.
- interest_weights: Weights = Weights(mean=0.5, variance=0.5)#
“A dict that stores the “mean” and “variance” of the learner’s interest weights.
- novelty_weights: Weights = Weights(mean=0.5, variance=0.5)#
A dict that stores the “mean” and “variance” of the learner’s knowledge/novelty weights.