Publications by Priyank Goyal

Document

27.03.2020

The below code is for Rmarkdown to generate output even if there are errors knitr::opts_chunk$set(error = TRUE,cache.extra = knitr::rand_seed) Lets Install Package library("caret", "skimr") ## Loading required package: lattice ## Loading required package: ggplot2 ## Registered S3 methods overwritten by 'ggplot2': ## method from ## ...

13026 sym R (266159 sym/98 pcs) 6 img 3 tbl

Scatter Plot Matrix

26.03.2020

Here, we’ll describe how to produce a matrix of scatter plots. This is useful to visualize correlation of small data sets. The R base function pairs() can be used. 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 ...

4691 sym R (3332 sym/16 pcs) 13 img

Scatter Plot

26.03.2020

A scatter plot can be created using the function plot(x, y). The function lm() will be used to fit linear models between y and x. A regression line will be added on the plot using the function abline(), which takes the output of lm() as an argument. You can also add a smoothing line using the function loess() using function lines(). x <- mtcars$w...

3839 sym R (1988 sym/9 pcs) 7 img

Box_Plot_Reference

26.03.2020

## boxplot on a formula: boxplot(count ~ spray, data = InsectSprays, col = "lightgray") # *add* notches (somewhat funny here <--> warning "notches .. outside hinges"): boxplot(count ~ spray, data = InsectSprays, col = "lightgray") boxplot(count ~ spray, data = InsectSprays, notch = TRUE, add = TRUE, col = "blue") ## Warning in bxp(li...

16 sym R (3061 sym/14 pcs) 11 img

Markdown TS Regression

24.03.2020

library(fpp2) ## Warning: package 'fpp2' was built under R version 3.6.1 ## Loading required package: ggplot2 ## Registered S3 methods overwritten by 'ggplot2': ## method from ## [.quosures rlang ## c.quosures rlang ## print.quosures rlang ## Loading required package: forecast ## Warning: package 'forecast' was built ...

586 sym R (3493 sym/25 pcs) 7 img

Box_Plot

23.03.2020

We will use a dataset Tooth Growth. The response is the length of (cells responsible for tooth growth) in 60 guinea pigs. Each animal received one of three dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery methods, orange juice or ascorbic acid (a form of vitamin C and coded as VC). # Print the first 6 rows head(ToothGrowth,...

597 sym R (1520 sym/13 pcs) 11 img

Cluster Validation Statistics

22.03.2020

The term cluster validation is used to design the procedure of evaluating the goodness of clustering algorithm results. Internal Validation. Loading Packages library(factoextra) ## Warning: package 'factoextra' was built under R version 3.6.2 ## Loading required package: ggplot2 ## Registered S3 methods overwritten by 'ggplot2': ## method ...

631 sym R (2241 sym/28 pcs) 1 img

Optimum_Number_of_Clusters

22.03.2020

Using Function fviz_nbclust(). can be used to compute three different methods ( elbow, silhouette, gap statistics) library(factoextra) ## Warning: package 'factoextra' was built under R version 3.6.2 ## Loading required package: ggplot2 ## Registered S3 methods overwritten by 'ggplot2': ## method from ## [.quosures rlang ## ...

515 sym R (2897 sym/14 pcs) 5 img

Clustering Validation

22.03.2020

Assessing Clustering Tendency Before Clustering, we need to check if the dataset contains meaningful clusters or not. library(factoextra) ## Warning: package 'factoextra' was built under R version 3.6.2 ## Loading required package: ggplot2 ## Registered S3 methods overwritten by 'ggplot2': ## method from ## [.quosures rlang ##...

1209 sym R (2152 sym/19 pcs) 6 img

Retail Clustering Hierarchical Clustering

22.03.2020

Load the data df_Original <- read.csv("Fashion_Clustering.csv",header=TRUE) df <- scale(df_Original) # Scale the data head(df, n = 3) # View the firt 3 rows of the data ## Store.Area East West North South CRESCENT.NS ## [1,] -0.9928914 2.1806892 -0.5321496 -0.4646845 -0.8609614 -0.4115927 ## [2,] -0.3834972 -0.4...

571 sym R (5168 sym/25 pcs) 3 img