I would like to draw the following contour plots in $\LaTeX$ using the TikZ package.
My script for drawing the contour plots for ridge (q=2) and lasso regression (q=1) are below. The first block of code is ridge (q=2) which is the 2nd plot in the figure above with a circle. The second block of code for lasso (q=1) rotates a rectangle to get the diamond, shown in the 3rd plot.
\usepackage{tikz}
\begin{tikzpicture}
\draw[-] (-0.75,0) -- (0.75,0) node[anchor=north west] {$\beta_1$};
\draw[-] (0,-0.75) -- (0,0.75) node[anchor=south east] {$\beta_2$};
\draw[thick] (0,0) circle (0.5cm);
\end{tikzpicture}
\begin{tikzpicture}
\draw[-] (-0.75,0) -- (0.75,0) node[anchor=north west] {$\beta_1$};
\draw[-] (0,-0.75) -- (0,0.75) node[anchor=south east] {$\beta_2$};
\draw[thick,cm={cos(45) ,-sin(45) ,sin(45) ,cos(45),(0,0)}] (-0.4,-0.4) rectangle (0.4,0.4);
\end{tikzpicture}
With these two completed, I am wondering how to draw the 4th, 5th and 1st plots in the figure above that have non-convex and convex geometric shapes. Finally, I would like to create the following plots for elastic net (q between 1 and 2) using TikZ:
Is there a way to make non-convex (pinched) geometric shapes without resorting to packages outside of TikZ as done in this hyperbola graph? I know there are parabola and arc commands in TikZ, but I think the contour plots require control over how much bending there is towards the corners depending on the value used for q.