'Drawing a graph with words instead of points in Latex
I am trying to draw a graph in Latex that shows the trade of between flexibility and interpretability of different machine learning methods. I attached an image of the exact graph to this question. I am struggling to get information on how to create this graph using latex. Any help will be greatly appreciated.
Solution 1:[1]
My sketch:
\documentclass[tikz,margin=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\sffamily %
\draw (0,0) -- (10,0) -- (10,6) -- (0,6) -- cycle;
\draw (1,0) -- (1,-0.2);
\draw (9,0) -- (9,-0.2);
\draw (0,0.6) -- (-0.2,0.6);
\draw (0,5.4) -- (-0.2,5.4);
\node at (1,-0.5) {Low};
\node at (9,-0.5) {High};
\node at (5,-1.5) {Flexibility};
\node at (-0.5,0.6) [rotate=90] {Low};
\node at (-0.5,5.4) [rotate=90] {High};
\node at (-1.5,3) [rotate=90] {Interpretability};
\node at (1.5,5.4) [color=blue,align=center] {Subset Selection\\Lasso};
\node at (3.7,4.2) [color=blue,align=center] {Least Squares};
\node at (5.5,3.0) [color=blue,align=center] {Generalized Additive Models\\Tree};
\node at (8.2,1.8) [color=blue,align=center] {Bagging, Boosting};
\node at (7.2,0.8) [color=blue,align=center] {Support Vector Machines};
\end{tikzpicture}
\end{document}
and its output:
Refining the code just a bit, but same output:
\documentclass[tikz,margin=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\sffamily %
\draw (0,0) -- (10,0) -- (10,6) -- (0,6) -- cycle;
\draw (1,0) -- (1,-0.2);
\draw (9,0) -- (9,-0.2);
\draw (0,0.6) -- (-0.2,0.6);
\draw (0,5.4) -- (-0.2,5.4);
\node at (1,-0.5) {Low};
\node at (9,-0.5) {High};
\node at (5,-1.5) {Flexibility};
\node at (-0.5,0.6) [rotate=90] {Low};
\node at (-0.5,5.4) [rotate=90] {High};
\node at (-1.5,3) [rotate=90] {Interpretability};
\begin{scope}[color=blue,align=center]
\node at (1.5,5.4) {Subset Selection\\Lasso};
\node at (3.7,4.2) {Least Squares};
\node at (5.5,3.0) {Generalized Additive Models\\Tree};
\node at (8.2,1.8) {Bagging, Boosting};
\node at (7.2,0.8) {Support Vector Machines};
\end{scope}
\end{tikzpicture}
\end{document}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |


