The main problem is that (1+\beta^2)
needs to be in math mode.
Some other comments about your code:
please don't load the same package multiple times
you don't need to load graphicx
, amssymb
or amsmath
, beamer automatically loads them for you
if your tex distribution is reasonable up to date, you don't need \usepackage[utf8]{inputenc}
. That's now the default
\documentclass{beamer}
%\usepackage[utf8]{inputenc}
\mode<presentation> {
\usetheme{Madrid}
}
%\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tikz}
%\usepackage{amssymb}
\usepackage{blindtext}
%\usepackage{amsmath}
\usepackage{csquotes}
\usepackage{tikz}
\usepgflibrary{arrows}
\usepackage{amscd}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
%\usepackage{graphicx}
%\usepackage{booktabs}
%\usepackage{tikz}
%\usepackage{amssymb}
%\usepackage{blindtext}
%\usepackage{amsmath}
%\usepackage{csquotes}
%\usepackage{tikz}
%\usepgflibrary{arrows}
%\usepackage{amscd}
\begin{document}
\begin{frame}{Analytical forms}
\centering
\begin{table}
\begin{tabular}{l|c}
Metric & Analytical form \\
\hline
Accuracy & \begin{math}\frac { \sum_{n=1}^{c} \frac{tp + tn}{tp + fp + tn + fn}}{c} \end{math} \vspace{\baselineskip}\\
\hline
Precision & \begin{math} \frac { \sum_{n=1}^{c}\frac{tp }{tp + fp}} {c} \end{math} \\
\hline
Recall & \begin{math} \frac { \sum_{n=1}^{c}\frac{tp }{tp + fn} }{c} \end{math}\\
\hline
F1 score & \begin{math} (1+\beta^2)\frac{AP \cdot AR }{(\beta^2 \cdot AP) + AR}\end{math}
\end{tabular}
\caption{\label{tab:widgets} Analytical form for each evaluation metric.}
\end{table}
\end{frame}
%------------------------------------------------
\end{document}

To make your life easier, you could use the tabularray
package for your table. This allow to automatically choose math mode for your right column and will give a bit better spacing:
\documentclass{beamer}
%\usepackage[utf8]{inputenc}
\mode<presentation> {
\usetheme{Madrid}
}
%\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tikz}
%\usepackage{amssymb}
\usepackage{blindtext}
%\usepackage{amsmath}
\usepackage{csquotes}
\usepackage{tikz}
\usepgflibrary{arrows}
\usepackage{amscd}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
%\usepackage{graphicx}
%\usepackage{booktabs}
%\usepackage{tikz}
%\usepackage{amssymb}
%\usepackage{blindtext}
%\usepackage{amsmath}
%\usepackage{csquotes}
%\usepackage{tikz}
%\usepgflibrary{arrows}
%\usepackage{amscd}
\usepackage{tabularray}
\begin{document}
\begin{frame}{Analytical forms}
\centering
\begin{table}
\begin{tblr}{
colspec={l|c},
column{2}={mode=dmath},
cell{1}{2}={mode=text},
vspan=even
}
Metric & Analytical form \\
\hline
Accuracy & \frac { \sum_{n=1}^{c} \frac{tp + tn}{tp + fp + tn + fn}}{c} \\
\hline
Precision & \frac { \sum_{n=1}^{c}\frac{tp }{tp + fp}} {c} \\
\hline
Recall & \frac { \sum_{n=1}^{c}\frac{tp }{tp + fn} }{c} \\
\hline
F1 score & (1+\beta^2)\frac{AP \cdot AR }{(\beta^2 \cdot AP) + AR}\\
\end{tblr}
\caption{\label{tab:widgets} Analytical form for each evaluation metric.}
\end{table}
\end{frame}
%------------------------------------------------
\end{document}
