pub struct MixtureSyntheticUser {
pub thetas: Vec<Vec<f64>>,
}Expand description
A simulated user whose taste has several islands: true utility is the max over component tastes (“I love a great drone OR a great pluck”). A single linear θ provably cannot represent this — it is the ground truth for the K > 1 mixture gate.
Fields§
§thetas: Vec<Vec<f64>>Component ground-truth weight vectors.
Implementations§
Source§impl MixtureSyntheticUser
impl MixtureSyntheticUser
Sourcepub fn duel<R: Rng>(&self, rng: &mut R, a: &[f64], b: &[f64]) -> bool
pub fn duel<R: Rng>(&self, rng: &mut R, a: &[f64], b: &[f64]) -> bool
Sample a duel outcome (true = chose A), Bradley–Terry noise on the max-utility.
Sourcepub fn observe_duel<R: Rng>(
&self,
rng: &mut R,
a: Vec<f64>,
b: Vec<f64>,
session: usize,
) -> Observation
pub fn observe_duel<R: Rng>( &self, rng: &mut R, a: Vec<f64>, b: Vec<f64>, session: usize, ) -> Observation
Generate a full duel observation on the given pair.
Trait Implementations§
Source§impl Clone for MixtureSyntheticUser
impl Clone for MixtureSyntheticUser
Source§fn clone(&self) -> MixtureSyntheticUser
fn clone(&self) -> MixtureSyntheticUser
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MixtureSyntheticUser
impl RefUnwindSafe for MixtureSyntheticUser
impl Send for MixtureSyntheticUser
impl Sync for MixtureSyntheticUser
impl Unpin for MixtureSyntheticUser
impl UnsafeUnpin for MixtureSyntheticUser
impl UnwindSafe for MixtureSyntheticUser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more