Skip to content
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/learning/lin_reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ impl Default for LinRegressor {
}

impl LinRegressor {
/// Create a new linear regression model from parameters
pub fn new(parameters: Option<Vector<f64>>) -> LinRegressor {
LinRegressor { parameters }
}

/// Get the parameters from the model.
///
/// Returns an option that is None if the model has not been trained.
Expand Down