You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~\aima-python\learning.py in LinearLearner(dataset, learning_rate, epochs)
528 for example in examples:
529 x = [1] + example
--> 530 y = np.dot(w, x)
531 t = example[idx_t]
532 err.append(t - y)
<array_function internals> in dot(*args, **kwargs)
ValueError: shapes (5,) and (6,) not aligned: 5 (dim 0) != 6 (dim 0)
The text was updated successfully, but these errors were encountered:
aidan-le-beard
changed the title
Linear Learner Section Doesn't Work.
Linear Learner Section of learning.ipynb Doesn't Work.
Apr 24, 2022
The dot product from command "y = np.dot(w, x)" is resulting in the error:
ValueError: shapes (5,) and (6,) not aligned: 5 (dim 0) != 6 (dim 0)
I can't figure out how to fix this for the life of me, any advice?
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_18692/3598892250.py in
2 iris.classes_to_numbers()
3
----> 4 linear_learner = LinearLearner(iris)
5 print(linear_learner([5, 3, 1, 0.1]))
~\aima-python\learning.py in LinearLearner(dataset, learning_rate, epochs)
528 for example in examples:
529 x = [1] + example
--> 530 y = np.dot(w, x)
531 t = example[idx_t]
532 err.append(t - y)
<array_function internals> in dot(*args, **kwargs)
ValueError: shapes (5,) and (6,) not aligned: 5 (dim 0) != 6 (dim 0)
The text was updated successfully, but these errors were encountered: