Could you help me with these two draws?
First:
Second:
mwe (taken from Here)
\documentclass[tikz,border=7pt]{standalone}
\usetikzlibrary{positioning,arrows.meta}
\begin{document}
\begin{tikzpicture}[node distance=0mm,minimum height=1cm,outer sep=3mm,scale=0.7,>=Latex,font=\footnotesize,
indication/.style={minimum height=0cm,outer sep=0mm},
oneblock/.style={transform shape,minimum width=1cm,draw},
fullset/.style={transform shape,minimum width=10cm,draw}]
% left part of picture
\node[fullset,anchor=west] at (0,0) (A) {};
\node[above=of A.north,indication] (ATXT) {TRAINING SET};
\node[oneblock,minimum width=2cm,anchor=west,right=of A,fill=lightgray,outer sep=0mm] (A1) {};
\path (ATXT) -| (A1) node[midway] {TEST SET};
\node[fullset,anchor=west] at (0,-4) (B) {};
\foreach \x in {0,1,...,9}
{
\draw (B.west) +(\x,0) node[oneblock,anchor=west,draw] {};
}
\draw[->] (A) -- (B) node[midway,fill=white,indication] {divide into 10 folds of equal size};
% right part of picture
\begin{scope}[xshift=15cm,scale=0.5,local bounding box=rightside box]
\foreach \x in {0,1}
{
\foreach \y in {0,1,...,4}
{
\draw (\x*11,0) +(0,-\y*2) node[fullset,anchor=west] {};
\draw (\x*11,0) +(\x*5+\y,-\y*2) node[oneblock,draw,anchor=west,fill=lightgray] {};
}
}
\coordinate (R) at (rightside box.west);
\end{scope}
% connecting arrow
\draw[->] (B.east) -- +(2.5,0) node[below,align=center,indication] {run experiments\\using 10 different\\partitionings} |- (R);
\end{tikzpicture}
\end{document}
For the tree:
\documentclass[tikz]{standalone}
\usetikzlibrary{arrows,shapes,positioning,shadows,trees,calc}
\begin{document}
\begin{tikzpicture}[
every node/.style={draw, rectangle, fill=gray!20},
edge from parent path={
(\tikzparentnode) |- % Start from parent
($(\tikzparentnode)!0.5!(\tikzchildnode)$) -| % make an ortho line to mid point
(\tikzchildnode)}] % make another ortho to the target
\node {root}
child {node {left}}
child {node {right}
child {node {child}}
child {node {child}}
};
\end{tikzpicture}
\end{document}