Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various typos #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 10_chapter/basicCRN.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ estMCRN = estM.(lamGrid,seed)
plot(lamGrid,trueM,
c=:black, label="Expected curve")
plot!(lamGrid,estM0,
c=:blue, label="No CRN estiamte")
c=:blue, label="No CRN estimate")
plot!(lamGrid,estMCRN,
c=:red, label="CRN estimate",
xlims=(0,1), ylims=(0,0.4), xlabel=L"\lambda", ylabel = "Mean")
xlims=(0,1), ylims=(0,0.4), xlabel=L"\lambda", ylabel = "Mean")
4 changes: 2 additions & 2 deletions 10_chapter/temperatureNoise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ smallTraj, smallHat, smallY = luenbergerTrack(kKalman, Tsmall, spikeTime)
p1 = scatter(smallTraj, c=:blue,
ms=3, msw=0, label="System trajectory")
p1 = scatter!(smallY, c = :black,
ms=3, msw=0, label="Measurments")
ms=3, msw=0, label="Measurements")
p1 = scatter!(smallHat,c=:red,
ms=3, msw=0, label="Kalman filter tracking",
xlabel = "Time", ylabel = "Temperature",
Expand All @@ -53,4 +53,4 @@ p2 = scatter(kRange,errs, c=:black, ms=3, msw=0,
p2 = plot!(kRange,analyticErr.(kRange), c = :red,
xlabel="k", ylabel="MSE", label = "Analytic", ylim =(0.58,0.64))

plot(p1, p2, size=(1000,400), margin = 5mm)
plot(p1, p2, size=(1000,400), margin = 5mm)
2 changes: 1 addition & 1 deletion 6_chapter/proportionCI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ println("\nOut of $n non-missing observations, "*
println("Hence a point estimate for the proportion "*
"of grades at level $gradeInQuestion is $phat.")
println("A $confidencePercent% confidence interval for "*
"the proprotion of level $gradeInQuestion is:\n$confInt.")
"the proportion of level $gradeInQuestion is:\n$confInt.")
2 changes: 1 addition & 1 deletion 7_chapter/infMeanDiffVarKnown.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ pVal = 2*ccdf(Normal(), abs(testStatistic))

println("Sample mean machine 1: ",xBar1)
println("Sample mean machine 2: ",xBar2)
println("Manually calculated test statistc: ", testStatistic)
println("Manually calculated test statistic: ", testStatistic)
println("Manually calculated p-value: ", pVal)
4 changes: 2 additions & 2 deletions 7_chapter/signTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ pValB = 2*ccdf(binom, testStatisticB)
println("Binomial mean: ", mean(binom))

println("Case A: mu0: ", mu0A)
println("\tTest statistc: ", testStatisticA)
println("\tTest statistic: ", testStatisticA)
println("\tP-value: ", pValA)

println("Case B: mu0: ", mu0B)
println("\tTest statistc: ", testStatisticB)
println("\tTest statistic: ", testStatisticB)
println("\tP-value: ", pValB)
6 changes: 3 additions & 3 deletions 8_chapter/linkFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ model1 = glm(form, train, Normal(), IdentityLink())
model2 = glm(form, train, Poisson(), LogLink())
model3 = glm(form, train, Gamma(), InverseLink())

invIdenityLink(x) = x
invIdentityLink(x) = x
invLogLink(x) = exp(x)
invInverseLink(x) = 1/x

A = [ones(numTest) test.CycT test.MMin test.MMax test.Cach test.ChMin test.ChMax]
pred1 = invIdenityLink.(A*coef(model1))
pred1 = invIdentityLink.(A*coef(model1))
pred2 = invLogLink.(A*coef(model2))
pred3 = invInverseLink.(A*coef(model3))

Expand All @@ -34,4 +34,4 @@ lossModel3 = norm(pred3 - actual)
println("Model 1: ", coef(model1))
println("Model 2: ", coef(model2))
println("Model 3: ", coef(model3))
println("\nLoss of models 1,2,3: ",(lossModel1 ,lossModel2, lossModel3))
println("\nLoss of models 1,2,3: ",(lossModel1 ,lossModel2, lossModel3))
4 changes: 2 additions & 2 deletions 9_chapter/logisticRegressionMNIST.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ while true
end

println("\nNumber of epochs: ", epochNum)
acccuracy = mean([logisticMclassifier(testData[:,k]) for k in 1:nTest]
accuracy = mean([logisticMclassifier(testData[:,k]) for k in 1:nTest]
.== testLabels)
println("Accuracy: ", acccuracy)
println("Accuracy: ", accuracy)

plot(lossArray, xlabel = "Epoch", ylabel = "Cross Entropy Loss", legend = false)