[Tex/LaTex] One horizontal line flow chart

diagramstikz-arrowstikz-pgf

I would like to draw something like this in TikZ:

enter image description here

I've tried LatexDraw but this program generates highly messy code in PStricks:

\begin{pspicture}(0,-0.8)(13.2,0.8)
\definecolor{colour0}{rgb}{0.99607843,0.99607843,0.99607843}
\psframe[linecolor=black, linewidth=0.02, fillstyle=solid,fillcolor=colour0, dimen=outer](10.4,0.8)(8.8,-0.8)
\psframe[linecolor=black, linewidth=0.02, fillstyle=solid,fillcolor=colour0, dimen=outer](1.6,0.8)(0.0,-0.8)
\psline[linecolor=black, linewidth=0.02, arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(1.6,0.0)(2.4,0.0)(2.4,0.0)
\psframe[linecolor=black, linewidth=0.02, fillstyle=solid,fillcolor=colour0, dimen=outer, framearc=0.54122657](4.8,0.8)(2.8,-0.8)
\psellipse[linecolor=black, linewidth=0.02, fillstyle=solid, dimen=outer](6.8,0.0)(0.8,0.8)
\psellipse[linecolor=black, linewidth=0.02, fillstyle=solid, dimen=outer](12.4,0.0)(0.8,0.8)
\rput(0.8,0.0){\tiny{Dane uczące}}
\rput(3.8,0.0){\tiny{Trenowanie
\\
algorytmu}}
\rput(6.8,0.0){\tiny{Model}}
\rput(9.6,0.0){\tiny{Dane testowe}}
\rput(12.4,0.0){\tiny{Dokładność}}
\psline[linecolor=black, linewidth=0.02, arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(4.8,0.0)(5.6,0.0)(5.6,0.0)
\psline[linecolor=black, linewidth=0.02, arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(7.6,0.0)(8.4,0.0)(8.4,0.0)
\psline[linecolor=black, linewidth=0.02, arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}(10.4,0.0)(11.2,0.0)(11.2,0.0)
\end{pspicture}

and in my document doesn't render correctly:

enter image description here

Best Answer

With TikZ:

\documentclass[tikz, margin=3mm]{standalone}
\usetikzlibrary{arrows.meta,
                chains,
                positioning,
                shapes.geometric
                }
% for fancy looks of data storages
\begin{document}
    \begin{tikzpicture}[
    node distance = 5mm and 7mm,
      start chain = going right,
 disc/.style = {shape=cylinder, draw, shape aspect=0.3,
                shape border rotate=90,
                text width=17mm, align=center, font=\linespread{0.8}\selectfont},
  mdl/.style = {shape=ellipse, aspect=2.2, draw},
  alg/.style = {draw, align=center, font=\linespread{0.8}\selectfont}
                    ]
    \begin{scope}[every node/.append style={on chain, join=by -Stealth}]
\node (n1) [disc] {Training\\ data};
\node (n2) [alg]  {Learning\\ algorithm};
\node (n3) [mdl]  {Model};
\node (n4) [disc] {Test\\ data};
\node (n3) [mdl]  {Accuracy};
    \end{scope}
\node[below=of n2]  {Step 1: Training};
\node[below=of n4]  {Step 2: Tresting};
    \end{tikzpicture}
\end{document}

enter image description here

Related Question