pub struct BenchmarkBuilder { /* private fields */ }Expand description
Builder for creating benchmark suites.
Implementations§
Source§impl BenchmarkBuilder
impl BenchmarkBuilder
Sourcepub fn description(self, desc: &str) -> Self
pub fn description(self, desc: &str) -> Self
Set the description.
Sourcepub fn task_type(self, task_type: BenchmarkTaskType) -> Self
pub fn task_type(self, task_type: BenchmarkTaskType) -> Self
Set the task type.
Sourcepub fn dataset_size(self, total: usize, positive: usize) -> Self
pub fn dataset_size(self, total: usize, positive: usize) -> Self
Set dataset size.
Sourcepub fn class_distribution(self, distribution: HashMap<String, usize>) -> Self
pub fn class_distribution(self, distribution: HashMap<String, usize>) -> Self
Set class distribution.
Sourcepub fn split_ratios(
self,
train: f64,
val: f64,
test: f64,
temporal: bool,
) -> Self
pub fn split_ratios( self, train: f64, val: f64, test: f64, temporal: bool, ) -> Self
Set split ratios.
Sourcepub fn primary_metric(self, metric: MetricType) -> Self
pub fn primary_metric(self, metric: MetricType) -> Self
Set primary metric.
Sourcepub fn metrics(self, metrics: Vec<MetricType>) -> Self
pub fn metrics(self, metrics: Vec<MetricType>) -> Self
Set all metrics.
Sourcepub fn add_baseline(self, baseline: BaselineResult) -> Self
pub fn add_baseline(self, baseline: BaselineResult) -> Self
Add a baseline result.
Sourcepub fn time_span_days(self, days: u32) -> Self
pub fn time_span_days(self, days: u32) -> Self
Set time span.
Sourcepub fn num_companies(self, n: usize) -> Self
pub fn num_companies(self, n: usize) -> Self
Set number of companies.
Sourcepub fn build(self) -> BenchmarkSuite
pub fn build(self) -> BenchmarkSuite
Build the benchmark suite.
Auto Trait Implementations§
impl Freeze for BenchmarkBuilder
impl RefUnwindSafe for BenchmarkBuilder
impl Send for BenchmarkBuilder
impl Sync for BenchmarkBuilder
impl Unpin for BenchmarkBuilder
impl UnwindSafe for BenchmarkBuilder
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
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.