-
Notifications
You must be signed in to change notification settings - Fork 5
/
A1-GettingStarted.qmd
90 lines (56 loc) · 3.27 KB
/
A1-GettingStarted.qmd
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
# Getting Started {#sec-gettingstarted}
## Organization of this book
The book is organized on five parts chapters:
1. ML basics
2. Classical ML algorithms
3. Deep learning
4. xAI and causal ML
5. Generative AI
## Software requirements
### R System
Make sure you have a recent version of R (\>=4.2, ideally \>=4.3) and RStudio on your computers. **For Mac users, if you have already a M1-M3 Mac, please install the R-ARM version** (see [here](https://cran.r-project.org/bin/macosx/) (not the x86_64 version))
### TensorFlow and Keras
If you want to run the code on your own computers, you need to install TensorFlow / Keras for R. For this, the following should work for most people:
```{r, eval=FALSE}
install.packages("keras3", dependencies = TRUE)
keras3::install_keras(backend="tensorflow")
```
This should work on most computers, in particular if all software is recent. Sometimes, however, things don't work well, especially the python distribution often makes problems. If the installation does not work for you, we can look at it together. Also, we will provide some virtual machines in case your computers / laptops are too old or you don't manage to install TensorFlow.
### Torch for R
We may also use Torch for R. This is an R frontend for the popular PyTorch framework. To install Torch, type in R:
```{r chunk_chapter1_2, eval=FALSE}
install.packages("torch")
library(torch)
torch::install_torch()
```
### EcoData
We use data sets from the EcoData package. To install the package, run:
```{r chunk_chapter1_3, eval=FALSE}
devtools::install_github(repo = "TheoreticalEcology/EcoData",
dependencies = TRUE, build_vignettes = TRUE)
```
The default installation will install a number of packages that are useful for statistics. Especially in Linux, this may take some time to install. If you are in a hurry and only want the data, you can also run
```{r, eval=FALSE}
devtools::install_github(repo = "TheoreticalEcology/EcoData",
dependencies = FALSE, build_vignettes = FALSE)
```
### Additional Libraries
There are a number of additional libraries that we may use during the course. So take a coffee or two (that will take a while...) and install the following libraries. Please do this in the given order unless you know what you're doing, because there are some dependencies between the packages.
```{r chunk_chapter1_4, code=xfun::read_utf8('dependencies.R'), eval=FALSE}
```
## Linux/UNIX
Linux/UNIX systems have sometimes to fulfill some further dependencies
**Debian based systems**
For Debian based systems, we need:
```
build-essential
gfortran
libmagick++-dev
r-base-dev
```
If you are new to installing packages on Debian / Ubuntu, etc., type the following:
```
sudo apt update && sudo apt install -y --install-recommends build-essential gfortran libmagick++-dev r-base-dev
```
## Assumed R knowledge
Basic knowledge of R is required to successfully participate in this course. In particular, you should be able to transform and subselect (slice) data. Have a look at [this section](https://theoreticalecology.github.io/AdvancedRegressionModels/1A-GettingStarted.html#assumed-r-knowledge) from the advanced statistic course which provides you with a short tests as well as with further links to read up on background!