Comments (4)
<ipython-input-43-9bcabdbf6f18> in computeCostMulti(X, y, theta)
33 # ======================= YOUR CODE HERE ===========================
34 for i in range(m):
---> 35 cost += np.square(np.dot(X[i], theta) - y[i])
36 J = cost * (1/(2*m))
37 # ==================================================================
ValueError: shapes (3,) and (2,) not aligned: 3 (dim 0) != 2 (dim 0)
That concatenation of a colum to X
or X_norm
breaks everything. computeCost
won't work now.
from ml-coursera-python-assignments.
Very weird. I found solutions online and noticed that the gradient descent code is exactly the same for univariate and multivariate. So I don't really understand the point of the exercise. Anyways, isn't the univariate question actually multivariate when you consider theta_0 and theta_1 as 2 features? I know theta_0 is just the y-intercept basis thing or whatever it is that gets a value of 1 assigned to it. I thought there would be more of a difference in the formula and code.
from ml-coursera-python-assignments.
@nyck33 just wondering if you ran into this issue, If you did, how did you solve it
#36 (comment)
from ml-coursera-python-assignments.
solved.
from ml-coursera-python-assignments.
Related Issues (20)
- machine_learning anaconda environment is missing a dependency. HOT 1
- Where do I find the new submission token?
- NameError Traceback (most recent call last)
- Exercise 5 grader issue, Please help! HOT 1
- Exercise 3 oneVsAll
- Are there any Discussion forums especially for this python exercises HOT 3
- Exercise 3 - Logistic Regression Cost Function HOT 2
- Exercise 1 suggestion
- Ex3 Neural Network Prediction Function
- HTTP Gone error HOT 1
- Can the grader work without having a token ? HOT 2
- Exercise 3 - Datasets in .mat format not working
- Any Standard Solutions?
- misunderstanding of How to multiply delta with activation in back propagation NN
- Issue submitting assigments HOT 1
- import utils not working in deepnote HOT 2
- Version of this repo but for updated Andrew Ng course HOT 1
- TypeError: only size-1 arrays can be converted to Python scalars
- Cannot submit Exercise 4
- Grader outdated again? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ml-coursera-python-assignments.