Skip to content

Commit

Permalink
upperLim of plotaccuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
chihchunchen committed Mar 28, 2015
1 parent 1c80dba commit 0daf11b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions knnplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def plotvector(XTrain, yTrain, XTest, yTest, weights, upperLim = 310):
return(results)

def plotaccuracy(XTrain, yTrain, XTest, yTest, upperLim):
pltvector1 = plotvector(XTrain, yTrain, XTest, yTest, weights = "uniform")
pltvector2 = plotvector(XTrain, yTrain, XTest, yTest, weights = "distance")
pltvector1 = plotvector(XTrain, yTrain, XTest, yTest, weights = "uniform", upperLim=upperLim)
pltvector2 = plotvector(XTrain, yTrain, XTest, yTest, weights = "distance", upperLim=upperLim)
line1 = plt.plot(pltvector1[:,0], pltvector1[:,1], label = "uniform")
line2 = plt.plot(pltvector2[:,0], pltvector2[:,1], label = "distance")
plt.legend(loc=3)
Expand Down

0 comments on commit 0daf11b

Please sign in to comment.