I want to make a contour plot of the loss space for a rather simple regression. Whenever I go to plot the space my session dies. Is there something that I'm doing wrong or do I need to trouble shoot installation? (just installed a couple days ago but haven't used Julia before)
using Plots, DataFrames, StatsPlots, Statistics, LinearAlgebra
f(t) = t.^2
c(θ₁, θ₂) = sum(f(t)-θ₁*t-θ₂*t.^2)
t = LinRange(0,1,20) |> collect
θ₁ = LinRange(-3,2,100) |> collect
θ₂ = LinRange(-1,3.5,100)|> collect
X = [t t.^2]
θ = [θ₁ θ₂]
yhats = X * transpose(θ)
ytrue = t.^2
e = yhats .- ytrue
tse = sum(e.^2, dims=1)
contour(θ[:,1],θ[:,2], tse)
