pub struct BLR {
pub file_path: String,
pub test_size: f64,
pub target_column: usize,
pub learning_rate: f64,
pub iter_count: u32,
pub binary_threshold: f64,
}Fields§
§file_path: String§test_size: f64§target_column: usize§learning_rate: f64§iter_count: u32§binary_threshold: f64Implementations§
Source§impl BLR
impl BLR
pub fn fit(&self)
pub fn predict( test_features: &Vec<Vec<f64>>, weights: &Vec<f64>, threshold: f64, ) -> Vec<f64>
pub fn change_in_loss(coeff: &Vec<f64>, lr: f64, gd: &Vec<f64>) -> Vec<f64>
pub fn gradient_descent( train: &Vec<Vec<f64>>, sigmoid: &Vec<f64>, y_train: &Vec<f64>, ) -> Vec<f64>
pub fn log_loss(sigmoid: &Vec<f64>, y_train: &Vec<f64>) -> f64
pub fn sigmoid(train: &Vec<Vec<f64>>, coeff: &Vec<f64>) -> Vec<f64>
Auto Trait Implementations§
impl Freeze for BLR
impl RefUnwindSafe for BLR
impl Send for BLR
impl Sync for BLR
impl Unpin for BLR
impl UnwindSafe for BLR
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