I have a table for a machine learning ablation study and I would like to have cell colors that vary row-wise according to the values contained in the cell. The situation is similar to the following:
\documentclass{article}
%opening
\title{}
\author{}
\usepackage[utf8]{inputenc} % allow utf-8 input
\usepackage[T1]{fontenc} % use 8-bit T1 fonts
\usepackage{booktabs} % professional-quality tables
\usepackage{nicefrac} % compact symbols for 1/2, etc.
\usepackage{doi}
\usepackage{amsmath}
\usepackage{bm}
\usepackage{multicol}
\usepackage{multirow}
\begin{document}
\begin{table}[h]
\setlength{\tabcolsep}{3.5pt}
\renewcommand{\arraystretch}{1.6}
\caption{Ablation study.}
\label{table:ablation}
\begin{center}
\begin{tabular}{ l | p{0.8cm}| c c c c c c}
\toprule
\vspace{-6pt} % Adjust the value to reduce space, the higher the lower the spacing between the first two rows
Dataset & & Model1 & Model2 & Model3 & Model4\
& & & & & \
\midrule
Dataset1 & M1 & $134.49$ & $145.05_{\pm 13.83}$ & $129.59_{\pm 4.98}$ & $\bm{128.7.06}{\pm 11.01}$\
Dataset2 & M1 & $ 1.76{\pm 0.00}$ & $1.72_{\pm 0.05}$ & $1.69_{\pm 0.05}$ & $\bm{1.71_{\pm 0.01}}$\
\bottomrule
\end{tabular}
\end{center}
\end{table*}
\end{document}
Basically I want to have a heatmap for table cells with color that varies reasonably according to cell values in each row, since the metric's (M1) scale is different according to each dataset in consideration. How can I achieve that?

\cellcolorfrom package colortbl, and put it wherever you put data so far. – MS-SPO Nov 15 '23 at 21:53booktabspackage with vertical rules which does not work well and should be avoided if possible. – Jasper Habicht Nov 15 '23 at 21:56small,sc, and other choices that are not relevant to your question (vskip, for instance), and insert your code into a proper document that can be compiled (it should start with\documentclass…). Thanks! – Clément Nov 15 '23 at 22:28