-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path03-method.Rmd
117 lines (84 loc) · 2.79 KB
/
03-method.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Methods
<!-- ```{r setup, include=FALSE} -->
<!-- knitr::opts_chunk$set(echo = TRUE)
eval = TRUE, echo = TRUE, results = "hide"
-->
<!-- ``` -->
```{r setup, eval = TRUE, echo = FALSE, include=TRUE}
library(DiagrammeR)
mermaid("graph TD
A[Aprendizado de máquinas] --> B[Aprendizados]
B-->C[supervisionado]
B-->D[por reforço]
B-->E[Não supervisionado]
C-->F[classificação]
C-->G[Regressão]
E-->H[Clustering]
E-->I[Redução de dimensionalidade]")
```
```{r}
DiagrammeR::grViz("digraph {
graph [layout = dot, rankdir = TB]
node [shape = rectangle]
rec1 [label = 'Step 1. Wake up']
rec2 [label = 'Step 2. Write code']
rec3 [label = 'Step 3. ???']
rec4 [label = 'Step 4. PROFIT']
# edge definitions with the node IDs
rec1 -> rec2 -> rec3 -> rec4
}",
height = 500)
```
Figures and tables with captions will be placed in `figure` and `table` environments, respectively.
```{r nice-fig, fig.cap='Here is a nice figure!', out.width='80%', fig.asp=.75, fig.align='center'}
par(mar = c(4, 4, .1, .1))
plot(pressure, type = 'b', pch = 19)
```
Reference a figure by its code chunk label with the `fig:` prefix, e.g., see Figure \@ref(fig:nice-fig). Similarly, you can reference tables generated from `knitr::kable()`, e.g., see Table \@ref(tab:nice-tab).
```{r nice-tab, tidy=FALSE}
knitr::kable(
head(iris, 20), caption = 'Here is a nice table!',
booktabs = TRUE
)
```
We describe our methods in this chapter.
block
```{block, type='NOTA'}
Some text for this block.
```
::: {.infobox .obra data-latex="{construcao}"}
_EM CONSTRUÇÃO_
:::
::: {.infobox .note data-latex="{note}"}
**NOTICE!**
Thank you for noticing this **new notice**! Your noticing it has
been noted, and _will be reported to the authorities_!
:::
::: {.infobox .history data-latex="{history}"}
**NOTICE!**
Thank you for noticing this **new notice**! Your noticing it has
been noted, and _will be reported to the authorities_!
:::
block2
```{block2, type='FOO'}
Some text for this block [@citation-key].
- a list item
- another item
More text.
```
## Prerequisites
This is a _sample_ book written in **Markdown**. You can use anything that Pandoc's Markdown supports, e.g., a math equation $a^2 + b^2 = c^2$.
The **bookdown** package can be installed from CRAN or Github:
```{r eval=FALSE}
install.packages("bookdown")
# or the development version
# devtools::install_github("rstudio/bookdown")
```
Remember each Rmd file contains one and only one chapter, and a chapter is defined by the first-level heading `#`.
To compile this example to PDF, you need XeLaTeX. You are recommended to install TinyTeX (which includes XeLaTeX): <https://yihui.org/tinytex/>.
```{r include=FALSE}
# automatically create a bib database for R packages
knitr::write_bib(c(
.packages(), 'bookdown', 'knitr', 'rmarkdown'
), 'packages.bib')
```