MCPcopy Index your code
hub / github.com/TheAlgorithms/Rust / perceptron

Function perceptron

src/machine_learning/perceptron.rs:4–43  ·  view source on GitHub ↗

Returns the weights and bias after performing Perceptron algorithm on the input data points. The Perceptron is a binary classification algorithm that learns a linear separator. Labels should be either -1.0 or 1.0 for the two classes.

(
    data_points: Vec<(Vec<f64>, f64)>,
    max_iterations: usize,
    learning_rate: f64,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Calls 5

predictFunction · 0.85
is_emptyMethod · 0.45
lenMethod · 0.45
iter_mutMethod · 0.45
iterMethod · 0.45