Skip to content

TypeError: can't multiply sequence by non-int of type 'float' #63

Description

@sprakashsingh

I am getting this error at the np.dot for the Iris data set. Can you explain the solution ?

Following is traceback :
Traceback (most recent call last):
File "Perceptron.py", line 61, in
ppn.train(x, y)
File "Perceptron.py", line 24, in train
update = self.eta * (target - self.predict(xi))
File "Perceptron.py", line 35, in predict
return np.where(self.net_input(X) >= 0.0, 1, -1)
File "Perceptron.py", line 32, in net_input
return np.dot(X, self.w_[1:]) + self.w_[0]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions