Fixed graph showing wrong decision border for regression
All checks were successful
linter / quality (push) Successful in 8m11s
tests / ci (8.4) (push) Successful in 10m8s
tests / ci (8.5) (push) Successful in 12m59s

This commit is contained in:
2026-03-24 17:33:58 +01:00
parent ca9c0dc511
commit f6620c2eca

View File

@@ -80,7 +80,7 @@ function getPerceptronDecisionBoundaryDataset(
function perceptronLine(x: number): number { function perceptronLine(x: number): number {
if (perceptronWeights.length < 3) { if (perceptronWeights.length < 3) {
// If we have less than 3 weights, we assume missing weights are zero // If we have less than 3 weights, we assume missing weights are zero
perceptronWeights.push(getPerceptronOutput(networkWeights, [x])[0]); return getPerceptronOutput(networkWeights, [x])[0];
} }
// w0 + w1*x + w2*y = 0 => y = -(w1/w2)*x - w0/w2 // w0 + w1*x + w2*y = 0 => y = -(w1/w2)*x - w0/w2