MCPcopy Create free account
hub / github.com/Raibows/MLinRust / new

Method new

src/model/linear_regression.rs:17–23  ·  view source on GitHub ↗

linear regression model with MeanSquaredError optimized by mini-batch SGD feature_size: the input size, usually the feature size output_size: the output is a continuous value f32 punalty: penalty the weights, default is none weight_init_fn: it is strongly recommended to init the weights, e.g., randomly init: |item| item.for_each(|i| *i = rng.gen_f32())

(feature_size: usize, penalty: Option<Penalty>, weight_init_fn: F)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

weight_mut_borrowMethod · 0.45

Tested by

no test coverage detected