Publications by Daniel

Data visualization

25.05.2022

Loading data set head(iris) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 5.1 3.5 1.4 0.2 setosa 4.9 3.0 1.4 0.2 setosa 4.7 3.2 1.3 0.2 setosa 4.6 3.1 1.5 0.2 setosa 5.0 3.6 1.4 0.2 setosa 5.4 3.9 1.7 0.4 setosa Scatter plot Create a empty canvas then create aesthetic mapping tell the function which dataset and variables t...

1162 sym R (4365 sym/32 pcs) 23 img 1 tbl

Deep neural networks- regression

24.05.2022

Deep neural networks for regression Loading packages and data sets library(readr) library(keras) library(plotly) data("Boston", package = "MASS") data.set <- Boston dim(data.set) ## [1] 506 14 Convert dataframe to matrix without dimnames library(DT) # Cast dataframe as a matrix data.set <- as.matrix(data.set) # Remove column names dimn...

492 sym R (6569 sym/30 pcs) 3 img

Simple machine learning

24.05.2022

Machine learning workflow Loading packages and datasets # load the Pima Indians dataset from the mlbench dataset library(mlbench) data(PimaIndiansDiabetes) # rename dataset to have shorter name because lazy diabetes <- PimaIndiansDiabetes look at the data set # install.packages(c('caret', 'skimr', 'RANN', 'randomForest', 'fastAdaboost', '...

1764 sym R (24889 sym/76 pcs) 7 img 3 tbl

Deep neural network

22.05.2022

Load data # load the Pima Indians dataset from the mlbench dataset library(mlbench) data(PimaIndiansDiabetes) # rename dataset to have shorter name because lazy diabetes <- PimaIndiansDiabetes data.set <- diabetes # datatable(data.set[sample(nrow(data.set), # replace = FALSE, # size ...

675 sym R (6849 sym/45 pcs) 1 img

Data wrangling

21.05.2022

How to do data wrangling We will use tidyverse package to work with data. Load data and package head (iris) ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3.0 1.4 0.2 setosa ## 3 4.7 3.2 1.3 ...

940 sym R (85314 sym/56 pcs)

R basics

19.05.2022

The essentials of R Manipulation of vector vec <- c(3,5,2,1,5,"O",NA) length(unique(vec)) ## [1] 6 num_vec <- as.numeric(vec) log(num_vec) ## [1] 1.0986123 1.6094379 0.6931472 0.0000000 1.6094379 NA NA sum(c(num_vec, NA), na.rm=T) ## [1] 16 sort(num_vec, decreasing = T) ## [1] 5 5 3 2 1 is.na(num_vec) ## [1] FALSE FALSE FALSE FAL...

723 sym R (14643 sym/71 pcs) 3 img

Data summarization

21.05.2022

How to do aggregation/ summarization Summarization after grouping library(tidyverse) iris %>% group_by(Species) %>% summarize(Support = mean(Sepal.Length)) %>% # average arrange(-Support) # sort ## # A tibble: 3 × 2 ## Species Support ## <fct> <dbl> ## 1 virginica 6.59 ## 2 versicolor ...

219 sym R (15463 sym/17 pcs)

Convolutional neural network

21.05.2022

Import library library(keras) Importing the data mnist <- dataset_mnist() ## Loaded Tensorflow version 2.8.0 mnist is list; it contains trainx, trainy, testx, testy class(mnist) ## [1] "list" the dim of “mnist\(train\)x” is 60000 28 28 # head(mnist) preparing the data randomly sampling 1000 cases for training and 100 for testing set...

876 sym R (3372 sym/31 pcs) 1 img

Machine learning- KNN

24.05.2022

KNN Classifier # Loading package # library(e1071) library(caTools) library(class) Splitting data # load the Pima Indians dataset from the mlbench dataset library(mlbench) data(PimaIndiansDiabetes) # rename dataset to have shorter name because lazy diabetes <- PimaIndiansDiabetes # Splitting data into train and test data set.seed(100) ...

416 sym R (11718 sym/37 pcs) 5 img

Data visualization 2

25.05.2022

Data visualization course Summarization library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── ## ✔ ggplot2 3.3.5 ✔ purrr 0.3.4 ## ✔ tibble 3.1.6 ✔ dplyr 1.0.8 ## ✔ tidyr 1.2.0 ✔ s...

647 sym R (9888 sym/45 pcs) 15 img 2 tbl