Skip to content

Commit

Permalink
update text
Browse files Browse the repository at this point in the history
  • Loading branch information
yoninazarathy committed Nov 17, 2020
1 parent 48d0266 commit 214add2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions 8_chapter/confPredBands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ interval(x,sign,prediction = 0) = sign(pred(x),
xGrid = 40:1:140
scatter(data.Weight, data.Height, c=:black, ms=2, label="")
plot!(xGrid,pred.(xGrid), c=:red, label="Linear model")
plot!(xGrid,interval.(xGrid,+),c=:green, label="Confidence interval")
plot!(xGrid,interval.(xGrid,+),c=:green, label="Confidence bands")
plot!(xGrid,interval.(xGrid,-),c=:green, label="")
plot!(xGrid,interval.(xGrid,+,1),c=:blue,label="Prediction interval")
plot!(xGrid,interval.(xGrid,+,1),c=:blue,label="Prediction bands")
plot!(xGrid,interval.(xGrid,-,1),
c=:blue, label="", xlims=(40, 120), ylims=(145, 200), legend=:topleft,
xlabel = "Weight (kg)", ylabel = "Height (cm)")
4 changes: 2 additions & 2 deletions 9_chapter/kMeansManual.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ while norm(prevMeans - means) > 0.001
means = [sum(dataPoints[labels .== i])/sum(labels .==i) for i in 1:K]
end

cnts = [sum(labels .== i) for i in 1:K]
println("Counts of clusters (manual implementation): ", cnts)
countResult = [sum(labels .== i) for i in 1:K]
println("Counts of clusters (manual implementation): ", countResult)
2 changes: 1 addition & 1 deletion 9_chapter/ridgeRegressionCross.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ df = df[shuffle(1:n),:]
K = 10
nG = Int(floor(n/K))
n = K*nG
println("Loosing $(size(df)[1] - n) observations.")
println("Losing $(size(df)[1] - n) observations.")

lamGrid = 0:100:30000

Expand Down

0 comments on commit 214add2

Please sign in to comment.