I want to draw a flow chat like this
But I have no idea how to make those arrows across the box, and make the boxes larger.
\documentclass{beamer}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{collectbox}
\makeatletter
\newcommand{\mybox}{%
\collectbox{%
\setlength{\fboxsep}{5pt}%
\fbox{\BOXCONTENT}%
}%
}
\makeatother
\usetikzlibrary{arrows,
positioning, % <--- added
shapes}
\usepackage{xparse}% So that we can have two optional parameters
\begin{document}
\begin{frame}
\begin{tikzpicture}[
node distance = 7mm and 6mm, % <---
block/.style = {rectangle, draw, rounded corners, align=center},
cloud/.style = {draw, ellipse, inner sep=1pt, align=center}, % <---
font = \footnotesize % <---
]
% Place nodes
\node [block, label={[anchor=east, align=center, xshift=-1ex, % <---
font=\scriptsize\linespread{0.9}\selectfont,% <---
text=purple]right:
}
] (init) {\textbf{\underline{\large{Machine}}}\\
\\[5ex]
\qquad\:\mybox{Function}\qquad\:\\[6ex]
};
\node [cloud, left=of init] (data)
{\textbf{\large{Training data}}\\
\textbf{\large{set}}};
\node [cloud, above right=of init.east, anchor=west] (input) % <---
{\textbf{\large{Input}}}; % <---
\node [cloud, below right=of init.east, anchor=west] (output) % <---
{\textbf{\large{Output}}};
% Draw edges
\draw[red,-latex'] (data) -- (init);
\draw[red,-latex'] (init) -- (data);
\draw[magenta,-latex'] (input) -- (init.east |- input);
\draw[cyan,-latex'] (init.east |- output) -- (output);
\end{tikzpicture}
\end{frame}
\end{document}





1andl(in1ex) , (iii) as i see, you use my answers in your question. isn't it now a time that you accept them? – Zarko Sep 25 '18 at 14:16