\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amssymb}
\usepackage{algorithm,algpseudocode}
\usepackage{bm}
\usepackage{hyperref}
\usepackage{float}
\usepackage{subcaption}
\usepackage{enumitem}
\usepackage{xcolor}
\definecolor{darkgreen}{rgb}{0.0, 0.5, 0.0}
\definecolor{aaltoBlue}{RGB}{0, 51, 102}
\definecolor{pinegreen}{cmyk}{0.92,0,0.59,0.25}
\definecolor{royalblue}{cmyk}{1,0.50,0,0}
\definecolor{lavander}{cmyk}{0,0.48,0,0}
\definecolor{violet}{cmyk}{0.79,0.88,0,0}
\definecolor{lightblue}{RGB}{173, 216, 230}
\usepackage{tikz}
\usepackage{pgfplots}
\usetikzlibrary{calc,arrows.meta,positioning,fit,shapes.geometric,shapes.misc,intersections,patterns,decorations.pathreplacing,backgrounds,matrix}
\usepgfplotslibrary{fillbetween,groupplots}
\setcounter{secnumdepth}{-\maxdimen}
% Long unbreakable tokens (the ISO/IEC author names in citations, term names
% in the title) otherwise overflow the margin by a few points; a modest
% emergency stretch lets TeX loosen the paragraph instead.
\emergencystretch=2em
\usepackage{mleftright}
% Project macros used by this entry (auto-extracted).
\newcommand{\datapoint}{\vz}
\newcommand{\dataset}{\mathcal{D}}
\newcommand{\probdist}{\mathbb{P}}
\newcommand{\sampleidx}{r}
\newcommand{\samplesize}{m}
\newcommand{\vz}[0]{{\bf z}}

\begin{document}

\section{dataset}

\subsection*{Author and editors}
Alexander Jung\textsuperscript{*}, Department of Computer Science, Aalto University, Espoo, Finland (ORCID \mbox{\href{https://orcid.org/0000-0001-7538-0990}{0000-0001-7538-0990}}) \\
Editors: Konstantina Olioumtsevits (ORCID \mbox{\href{https://orcid.org/0000-0003-2697-8659}{0000-0003-2697-8659}}), Ekkehard Schnoor (ORCID \mbox{\href{https://orcid.org/0000-0001-8252-1499}{0000-0001-8252-1499}}), Aalto University, Espoo, Finland \\
\textsuperscript{*}Corresponding author: \href{mailto:alex.jung@aalto.fi}{alex.jung@aalto.fi}



\subsection{Abstract}
A dataset is a finite collection
		of data points on which model training and
		validation are performed. Strictly speaking, a dataset is a set of
		distinct data points. With slight abuse of terminology, 
		the term is also used interchangeably with sample, a finite
		sequence that may contain repetitions. Read as such a
		sequence, a dataset represents a probability distribution through its
		empirical distribution, in which a repeated data point
		counts as often as it is listed. The size of a dataset is
		measured most simply by its number of data points, which
		overstates what correlated data points carry and says nothing
		about how well they cover the feature space. In practice,
		machine learning (ML) methods do not access the data points themselves but a
		representation of them, such as a table of the relational model,
		which records their attributes and nothing about the dataset's
		fitness for a purpose.

\subsection{Definition}
The cows of Fig.~\ref{fig_cows_dataset_dict},
		or the rows of Table~\ref{tab:cowdata_dict} that record them, form a
		dataset. A dataset is a collection
		$\dataset = \{\datapoint^{(1)}, \ldots, \datapoint^{(\samplesize)}\}$ of
		data points. Machine learning (ML) methods use a dataset for model
		training and validation. Strictly speaking, a dataset is an
		unordered collection of distinct data points, i.e., a set with no
		repetitions. In ML literature, however, the term is often used for
		a sample: a sequence of $\samplesize$ data points,
		indexed by their position $\sampleidx = 1, \ldots, \samplesize$ in
		the sequence, that may contain
		repetitions (see Fig.~\ref{fig_dataset_set_dict}).
		\begin{figure}[H]
			\centering
			\begin{tikzpicture}[every node/.style={font=\scriptsize},
				mc/.style={circle, fill=blue, minimum size=4pt, inner sep=0pt},
				ms/.style={rectangle, fill=red, minimum size=3.6pt, inner sep=0pt},
				mt/.style={regular polygon, regular polygon sides=3, fill=green!60!black, minimum size=5.5pt, inner sep=0pt},
				md/.style={diamond, fill=orange, minimum size=5pt, inner sep=0pt}]
				% (a) dataset as a set of distinct datapoints
				\begin{scope}
					\draw[rounded corners] (0,0) rectangle (3,2);
					\node[anchor=south west] at (0,2.02) {set $\dataset$};
					\node[mc] at (0.6,1.3) {};
					\node[ms] at (1.5,1.5) {};
					\node[mt] at (2.3,1.0) {};
					\node[md] at (1.0,0.5) {};
					\node[below] at (1.5,-0.2) {(a)};
				\end{scope}
				% (b) sample as an ordered list of datapoints that may repeat
				\begin{scope}[xshift=4.5cm]
					\draw[->] (0,0.2) -- (3.7,0.2) node[right=-1pt] {index $\sampleidx$};
					\draw[->] (0,0.2) -- (0,2) node[above=-1pt] {value};
					% stems, drawn before the markers so the markers sit on top
					\foreach \x/\y in {0.6/1.0, 1.3/1.6, 2.0/1.0, 2.7/0.7, 3.4/1.3}{
						\draw[black!55] (\x,0.2) -- (\x,\y);
					}
					\foreach \x/\lab in {0.6/1, 1.3/2, 2.0/3, 2.7/4, 3.4/5}{
						\draw (\x,0.2) -- (\x,0.1);
						\node[below=-1pt] at (\x,0.12) {$\lab$};
					}
					\node[mc] at (0.6,1.0) {};
					\node[ms] at (1.3,1.6) {};
					\node[mc] at (2.0,1.0) {};
					\node[mt] at (2.7,0.7) {};
					\node[md] at (3.4,1.3) {};
					\node[below] at (1.8,-0.42) {(b)};
				\end{scope}
			\end{tikzpicture}
			\caption{Two readings of the word \emph{dataset}. (a) Strictly, a
				dataset is a set of distinct data points, with no order and
				no repetitions. (b) In ML literature, dataset often denotes
				a sample: a finite sequence of data points
				indexed by $\sampleidx$ that may repeat (positions
				$\sampleidx = 1$ and $\sampleidx = 3$ carry the same
				data point)
				\label{fig_dataset_set_dict}}
		\end{figure}
		Read as a list, a dataset also represents a probability distribution. Its
		empirical distribution $\probdist^{(\dataset)}$ assigns the
		probability $1/\samplesize$ to each entry of the list, so a
		data point that is listed twice receives the probability
		$2/\samplesize$. A set, which cannot list a data point twice,
		has no such repetitions. The repetitions are therefore essential
		wherever a dataset represents a probability distribution. The bootstrap,
		e.g., draws new datasets from $\probdist^{(\dataset)}$ and so
		lists some data points several times.
\par
		The size of a dataset has more than one measure. The most basic
		one is the number $\samplesize$ of data points in the list.
		When the data points are realizations of correlated
		random variables (RVs), however, $\samplesize$ overstates what they carry: the
		average over $30$ consecutive days of a weather record scatters as
		much as the average over $7$ days drawn at random from the whole
		record, because consecutive days are correlated (see
		sample size). The size of a dataset is then defined only
		relative to a probabilistic model of the data generation, as the number
		of independent and identically distributed (i.i.d.) data points that would carry the same
		information. A third measure asks how well the data points
		cover the feature space: the largest distance from a
		point of the region of interest to the nearest data point (see
		covering), which is small for a dataset whose features
		are spread out and large for one that leaves parts of the
		feature space empty, however many data points it holds.
\par
		The notion of a dataset is broad: data points may represent
		concrete physical entities (such as humans or animals) or abstract
		objects (such as numbers). For illustration,
		Fig.~\ref{fig_cows_dataset_dict} shows a dataset whose
		data points are cows.
		\begin{figure}[H]
			\centering
			\includegraphics[width=0.75\textwidth]{CowsAustria.jpg}
			\caption{Cow herd somewhere in the Alps\label{fig_cows_dataset_dict}}
		\end{figure}
		In ML applications, the dataset itself is often not
		accessible. For instance, accessing the dataset in
		Fig.~\ref{fig_cows_dataset_dict} would require visiting the cow herd.
		What an ML method processes instead is a representation of the
		dataset within some data model, a formalism for representing and processing data
		(Abiteboul et al., 1995; Hoberman, 2009;
		Ramakrishnan and Gehrke, 2002; Silberschatz et al., 2019).
		For example, the relational model organizes data as a
		collection of tables, or relations (Codd, 1970;
		Silberschatz et al., 2019).
\par
		A single table consists of rows and columns, where each row corresponds
		to a single data point and each column represents a specific
		attribute of a data point. The order of rows does not matter, and each
		attribute is associated with a domain that specifies its set of
		allowed values. ML methods use these attributes as the
		features or the label of a data point, so the attribute
		domains correspond to the feature space and the
		label space. Table~\ref{tab:cowdata_dict} shows an example obtained
		from the dataset in Fig.~\ref{fig_cows_dataset_dict}.
		\begin{table}[H]
			\refstepcounter{table}
			\caption*{
				\centering
				\scshape TABLE \thetable \\[0.5ex]
				\scshape Relation (or Table) Representing a Dataset of Cows
			}
			\label{tab:cowdata_dict}
			\centering
			\begin{tabular}{lcccc}
				\hline
				\textbf{Name} & \textbf{Weight} & \textbf{Age} & \textbf{Height} & \textbf{Stomach temperature} \\
				\hline
				Zenzi & 100 & 4 & 100 & 25 \\
				Berta & 140 & 3 & 130 & 23 \\
				Resi  & 120 & 4 & 120 & 31 \\
				\hline
			\end{tabular}
		\end{table}
		A table records the content of a dataset, but not whether that content
		is appropriate for a given purpose. A dataset used in ethical and lawful
		machine learning systems (ML systems) must meet further requirements. For
		example, the EU AI Act requires that datasets on which high-risk
		ML systems are trained be ``sufficiently representative'' of the
		intended use cases (European Parliament and Council of the European Union, 2024, Art.~10(3)).
\par
		Trustworthy artificial intelligence (trustworthy AI) also requires documenting how a dataset was assembled, for
		example through a datasheet that records the dataset's motivation, composition, and
		collection process (Gebru et al., 2021). When the data points
		are personal data, this becomes a legal duty: under the purpose
		limitation principle, the general data protection regulation (GDPR) requires that such data be
		collected for ``specified, explicit and legitimate purposes''
		(European Parliament and Council of the European Union, 2016, Art.~5(1)(b)). These purposes are fixed at the
		time of collection.

\subsection{Cross References}
data point, sample, data, relational model, feature, empirical distribution, bootstrap, sample size, covering, EU AI Act

\subsection{References}
\begin{enumerate}
  \item Gebru et al. (2021). Datasheets for datasets. Commun. ACM, 64(12), pp.~86--92.
  \item European Parliament and Council of the European Union (2024). Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 laying down harmonised rules on artificial intelligence and amending Regulations (EC) No 300/2008, (EU) No 167/2013, (EU) No 168/2013, (EU) 2018/858, (EU) 2018/1139 and (EU) 2019/2144 and Directives 2014/90/EU, (EU) 2016/797 and (EU) 2020/1828 (Artificial Intelligence Act) (Text with EEA relevance). Official Journal of the European Union, L series, Jul. 12. URL: https://eur-lex.europa.eu/eli/reg/2024/1689/oj/eng.
  \item European Parliament and Council of the European Union (2016). Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (General Data Protection Regulation) (Text with EEA relevance). Official Journal of the European Union, L~119/1, May 4. URL: https://eur-lex.europa.eu/eli/reg/2016/679/oj.
  \item Abiteboul et al. (1995). Foundations of Databases. Addison-Wesley, Reading, MA, USA.
  \item Codd (1970). A Relational Model of Data for Large Shared Data Banks. Commun. ACM, 13(6), pp.~377--387.
  \item Hoberman (2009). Data Modeling Made Simple: A Practical Guide for Business and IT Professionals. 2nd ed., Technics Publications, Basking Ridge, NJ, USA.
  \item Ramakrishnan and Gehrke (2002). Database Management Systems. 3rd ed., McGraw-Hill, New York, NY, USA.
  \item Silberschatz et al. (2019). Database System Concepts. 7th ed., McGraw-Hill Education, New York, NY, USA.
\end{enumerate}

\end{document}
