Fixed graph showing wrong decision border for regression
This commit is contained in:
@@ -80,7 +80,7 @@ function getPerceptronDecisionBoundaryDataset(
|
||||
function perceptronLine(x: number): number {
|
||||
if (perceptronWeights.length < 3) {
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user