Skip to content

got an error for 11.1.6 #38

@fxj483

Description

@fxj483

my code for the update weights:

def update_weights(X_, y_, w_, eta):
error = compute_error(y_, X_, w_)
fod = X_.T.dot(error)
w_[1:] += eta * np.dot(x_.T,error)
w_[0] += eta * error.sum(

#answer for 11.1.6
w = np.zeros(1+X.shape[1])
for i in range(50):
print(update_weights(y_train, X_train,w,0.001))

the error I got:
image

It seems the error is about the training data, but my code for handling the data is the same as the solution provided.

Thank you in advance!

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