pub struct Ridge {
pub features: Value<NDArray<f64>>,
pub outputs: Value<NDArray<f64>>,
pub weights: Value<NDArray<f64>>,
pub bias: Value<NDArray<f64>>,
/* private fields */
}
Fields§
§features: Value<NDArray<f64>>
§outputs: Value<NDArray<f64>>
§weights: Value<NDArray<f64>>
§bias: Value<NDArray<f64>>
Implementations§
Source§impl Ridge
impl Ridge
Sourcepub fn new(
features: &NDArray<f64>,
y: &NDArray<f64>,
lambda: f64,
learning_rate: f64,
) -> Result<Ridge, String>
pub fn new( features: &NDArray<f64>, y: &NDArray<f64>, lambda: f64, learning_rate: f64, ) -> Result<Ridge, String>
Create new instance of ridge regression
Sourcepub fn predict(&mut self, inputs: NDArray<f64>) -> NDArray<f64>
pub fn predict(&mut self, inputs: NDArray<f64>) -> NDArray<f64>
Generate prediction for ridge regression
Sourcepub fn load(
filepath: &str,
features: &NDArray<f64>,
y: &NDArray<f64>,
learning_rate: f64,
lambda: f64,
) -> Result<Ridge>
pub fn load( filepath: &str, features: &NDArray<f64>, y: &NDArray<f64>, learning_rate: f64, lambda: f64, ) -> Result<Ridge>
Load model parameters for ridge regression
Auto Trait Implementations§
impl Freeze for Ridge
impl !RefUnwindSafe for Ridge
impl !Send for Ridge
impl !Sync for Ridge
impl Unpin for Ridge
impl !UnwindSafe for Ridge
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