mstampfer / coursera-stanford-ml-python Goto Github PK
View Code? Open in Web Editor NEWCoursera/Stanford Machine Learning course assignments in python
Coursera/Stanford Machine Learning course assignments in python
To properly submit the assignments, you need to use the submission token. Many users dont use a password if they login with facebook.
The way of submitting the assignments is with the email and token.
See the submitwithConfiguration.m file in the assignments.
This is the error shown while submtting.
File "submit.py", line 57, in <module>
s.submit()
File "/home/shubo/Desktop/Coursera-Stanford-ML-Python/Submission.py", line 37, in submit
partFeedback = response['partFeedbacks'][part]
KeyError: 'partFeedbacks'
Submission for part 1 (find closest centroids) fail when submitting to grader.
if part_id == 1:
idx = func(X, C)
return sprintf('%0.5f ', idx[1]+1)
Instead of returning idx[1]+1, should return idx+1 to pass the grader.
Hi,
First of all, thank - you for this amazing repo and hard work ๐
I am facing issues in submitting Exercise 2 -- Week 3. The cost function looks fine and is giving the right output too. Also, In the gradientFunction, do we have to return the partial derivative or the final gradient descent. When I look at octave files, the cost function returns both J
and grad
[partial derivative] which is used by fminunc to get the final gradient descent. And nothing is getting submitted Can you please help. I am already overdue ๐ญ
This causes few issues like
It's better to unify the data type as numpy array to reduce confusion from users.
I am using Python 3.5.2.
When I try to submit I get the following error:
An exception of type KeyError occured. Messsage:
("'__name__' not in globals",)
If I remove the catch error function, I get:
Traceback (most recent call last):
File "submit.py", line 58, in <module>
s.submit()
File "/Users/shaharb/kaggle/ml_coursera/Coursera-Stanford-ML-Python-master/Submission.py", line 27, in submit
parts[str(part_id)] = {'output': self.__output(part_id)}
File "submit.py", line 39, in output
mod = __import__(fname, fromlist=[fname], level=1)
KeyError: "'__name__' not in globals"
Since the submission.py is not there in the environment path, the submit.py cannot be run in each of the excercises.
Please change the path before importing the submission.py in your code.
Hello. I'm just starting the course in November. ex1.py
file is giving me an error:
AttributeError: 'NoneType' object has no attribute 'scatter'
I'm a little bit of a matplotlib newbie--which is to say I can get my code to run. So maybe it's common problem you run into when publishing for the greater Python community?
Just to be sure it's not my coding skillz, I've added an example scatter plot to the plotData.py
file--ya know, do nothing with the function, but, oh by the way, here's a scatter plot.
This file works fine by itself and displays the example; however, when I run ex1.py
, and it calls plotData.py
I get the error. I'm on Archlinux, ipython2 (5.1.0), matplotlib (1.5.3).
import datetime
import matplotlib.pyplot as plt
import numpy as np
fig, ax = plt.subplots()
t2=[datetime.datetime(1970,1,1),datetime.datetime(2000,1,1)]
xend = datetime.datetime.now()
yy= [0, 1]
ax.plot(t2, yy, linestyle='none', marker='s',
markerfacecolor='cornflowerblue',
markeredgecolor='black',
markersize=7,
label='my scatter plot')
print("lim is {0}".format(xend))
ax.set_xlim(left=datetime.datetime(1960,1,1), right=xend)
ax.set_ylim(bottom=-1, top=2)
ax.set_xlabel('Date')
ax.set_ylabel('Value')
ax.legend(loc='upper left')
fig.show()
def plotData(data):
"""
plots the data points and gives the figure axes labels of
population and profit.
"""
# ====================== YOUR CODE HERE ======================
# Instructions: Plot the training data into a figure using the
# "figure" and "plot" commands. Set the axes labels using
# the "xlabel" and "ylabel" commands. Assume the
# population and revenue data have been passed in
# as the x and y arguments of this function.
#
# Hint: You can use the 'rx' option with plot to have the markers
# appear as red crosses. Furthermore, you can make the
# markers larger by using plot(..., 'rx', 'MarkerSize', 10);
# ============================================================
#plt.figure() # open a new figure window
raise NotImplementedError
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.