Giter VIP home page Giter VIP logo

machine-learning-programming-assignments-coursera-andrew-ng's Issues

confusion about finding y

I am confused that what this line actually doing
y = repmat([1:num_labels], m, 1) == repmat(y, 1, num_labels);
Please explain it to me.
I've printed this y and got 5000*10 matrix but why this is necessary. and please tell me how this command works.

fminunc

how to run Logistic Regression Cost using fminunc....where to write fminunc commands in code.

J is an 100 x 100 matrix instead of a number

J = (-1 / m) * sum(y.*log(sigmoid(X * theta)) + (1 - y).*log(1 - sigmoid(X * theta)));

I noticed the following issues:

  1. You are using dot product which won't output a single-digit number but a matrix.
  2. using y without taking its transpose will lead to errors.

Replace the code with the following to fix it. (Using cross product instead of dot product).
J = (1/m) * (-y' * log(sigmoid(X * theta)) - (1 - y)' * log(1 - sigmoid(X * theta)));

regarding backpropagation

for e.g. i have five layers:
first layer 30,2nd l 25,3rd l 25,4th l 10,5th 8000
during backpropagation delta value calculations i have d5=(11800) so when i calculate d4 i have d4 of size(111) including bias. but for d3 my theta is 2610but d4 is 111 and thats the problem. My question is should i include bias as well

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.