Git Product home page Git Product logo

Comments (2)

nirmalhk7 avatar nirmalhk7 commented on July 24, 2024

I'm facing problems in the same block. Here's my code:
`
# Some useful variables
m, n = X.shape

# You need to return the following variables correctly 
ll_theta = np.zeros((num_labels, n + 1))

# Add ones to the X data matrix
X = np.concatenate([np.ones((m, 1)), X], axis=1)

# ====================== YOUR CODE HERE ======================
for c in np.arange(num_labels):
    initial_theta=np.zeros(n+1)
    options={'maxiter':50}
    res=optimize.minimize(lrCostFunction,initial_theta,(X,(y==c),lambda_),jac=True,method='TNC',options=options)
    all_theta[c]=res.x
# ============================================================
return all_theta`

I'm able to call the function without errors, from the next block
lambda_ = 0.1 all_theta = oneVsAll(X, y, num_labels, lambda_)

Then, when I try to submit the work, no error is thrown, but following is the result:
Screenshot from 2020-03-29 15-00-35

The scores aren't shown on Coursera either. Please help.

Thanks!

from ml-coursera-python-assignments.

Julescorbara avatar Julescorbara commented on July 24, 2024

#6 Fixes this issue, the author used the wrong minimization method

from ml-coursera-python-assignments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.