Skip to content

Commit e383137

Browse files
kvdesaiKalpit DesaiHammadTheOne
authored
Completed AI/ML section and started on Fundamentals Section (plotly#70)
* ml-knn page with make_moons.csv data * Fixing text * Adding ML ROC & PR page draft * Adding R page for PCA * ML page for t-SNE and UMAP * Adding fundamentals/multiple-chart-types page draft * Adding page for Styling in Plotly with R * committing horiz-vert shapes and figure label pages, without Dash * Adding dependencies=TRUE for Anglr * Added Dash code * Build fix with Anglr issue * Build fix2 with Anglr issue * Build fix3 with Anglr issue * Build fix4 for Anglr * Added the Dash code for Figure-Labels page * Fixing the broken data URL * Update r/2021-07-27-ml-pca.rmd Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com> * Update r/2021-07-27-ml-pca.rmd Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com> * Update r/2021-07-28-ml-tsne-umap.rmd Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com> * Update r/2021-07-28-ml-tsne-umap.rmd Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com> * Update r/2021-08-02-styling-plotly-in-r.rmd Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com> * Update r/2021-08-04-figure-labels.rmd Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com> * Improving aesthetics for plot background and grid lines * Adding front-matter tags and cleanup * Renaming Rmd files * Adding explicit tsne install * Added explicit umap install * Explicitly install rsvd * Explicitly install dash * Fixing dependencies * Fixing order and skipping Dash chunk eval * Deleting old figure-labels page Co-authored-by: Kalpit Desai <kalpit@datakalp.com> Co-authored-by: HammadTheOne <30986043+HammadTheOne@users.noreply.github.com> Co-authored-by: Hammad Khan <hammadtheone@gmail.com>
1 parent b2e3906 commit e383137

19 files changed

+1628
-247
lines changed

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ jobs:
2525
name: install application-level dependencies
2626
command: |
2727
sudo apt-get install -y pandoc libudunits2-dev libgdal-dev libxt-dev libglu1-mesa-dev libfftw3-dev libglpk40 libxml2-dev libcurl4-openssl-dev apt-transport-https software-properties-common
28-
sudo R -e 'install.packages(c("curl", "devtools", "mvtnorm", "hexbin", "tidyverse", "tidymodels", "kknn", "kernlab", "pracma", "reshape2", "ggplot2", "datasets", "fastDummies")); devtools::install_github("ropensci/plotly"); devtools::install_github("johannesbjork/LaCroixColoR"); install.packages("BiocManager"); BiocManager::install("EBImage"); devtools::install_deps(dependencies = TRUE) '
29-
sudo R -e 'install.packages("https://github.com/hypertidy/anglr/archive/refs/tags/v0.7.0.tar.gz", repos=NULL, type="source"); devtools::install_deps(dependencies = TRUE) '
28+
sudo R -e 'install.packages(c("curl", "devtools", "mvtnorm", "hexbin", "tidyverse", "tidymodels", "kknn", "kernlab", "pracma", "reshape2", "tsne", "umap", "rsvd", "dash", "tidyquant", "ggplot2", "datasets", "fastDummies")); devtools::install_github("ropensci/plotly"); devtools::install_github("johannesbjork/LaCroixColoR"); install.packages("BiocManager"); BiocManager::install("EBImage"); devtools::install_deps(dependencies = TRUE) '
29+
sudo R -e 'devtools::install_github("hypertidy/anglr@v0.7.0", dependencies = TRUE) '
30+
sudo R -e 'devtools::install_github("plotly/dash-daq", dependencies = TRUE, upgrade = TRUE) '
31+
sudo R -e 'devtools::install_deps(dependencies = TRUE) '
3032
- save_cache:
3133
key: cache4
3234
paths:

ggplot2/2016-11-29-facet-wrap.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Inspired by <a href="http://www.cookbook-r.com/Graphs/Scatterplots_(ggplot2)/">C
3838
library(plotly)
3939
4040
## read in data set (tolerance data from the ALDA book)
41-
tolerance <- read.table("https://stats.idre.ucla.edu/wp-content/uploads/2016/02/tolerance1_pp.txt",
41+
tolerance <- read.table("https://raw.githubusercontent.com/ASKurz/Applied-Longitudinal-Data-Analysis-with-brms-and-the-tidyverse/master/data/tolerance1_pp.txt",
4242
sep = ",", header = TRUE)
4343
4444
## change id and male to factor variables

r/2015-07-30-dumbbell-plots.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ display_as: basic
55
language: r
66
layout: base
77
name: Dumbbell Plots
8-
order: 14
8+
order: 13
99
output:
1010
html_document:
1111
keep_md: true
@@ -39,4 +39,4 @@ fig
3939

4040
#Reference
4141

42-
See [https://plotly.com/r/reference/#scatter](https://plotly.com/r/reference/#scatter) for more information and chart attribute options!
42+
See [https://plotly.com/r/reference/#scatter](https://plotly.com/r/reference/#scatter) for more information and chart attribute options!

r/2015-07-30-figure-labels.Rmd

Lines changed: 0 additions & 61 deletions
This file was deleted.

r/2015-07-30-graphing-multiple-chart-types.Rmd

Lines changed: 0 additions & 65 deletions
This file was deleted.

r/2017-05-19-sankey.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ display_as: basic
44
language: r
55
layout: base
66
name: Sankey Diagram
7-
order: 15
7+
order: 14
88
output:
99
html_document:
1010
keep_md: true
@@ -241,4 +241,4 @@ fig
241241
```
242242

243243
### Reference
244-
See [https://plotly.com/r/reference/#sankey](https://plotly.com/r/reference/#sankey) for more information and options!
244+
See [https://plotly.com/r/reference/#sankey](https://plotly.com/r/reference/#sankey) for more information and options!

r/2017-05-25-dot-plots.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ display_as: basic
55
language: r
66
layout: base
77
name: Dot Plots
8-
order: 13
8+
order: 12
99
output:
1010
html_document:
1111
keep_md: true
@@ -39,4 +39,4 @@ fig
3939

4040
#Reference
4141

42-
See [https://plotly.com/r/reference/#scatter](https://plotly.com/r/reference/#scatter) for more information and chart attribute options!
42+
See [https://plotly.com/r/reference/#scatter](https://plotly.com/r/reference/#scatter) for more information and chart attribute options!

r/2018-11-23-table.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ display_as: basic
44
language: r
55
layout: base
66
name: Tables
7-
order: 12
7+
order: 11
88
output:
99
html_document:
1010
keep_md: true
@@ -134,4 +134,4 @@ fig
134134

135135
#Reference
136136

137-
See [https://plotly.com/r/reference/#table](https://plotly.com/r/reference/#table) for more information and chart attribute options!
137+
See [https://plotly.com/r/reference/#table](https://plotly.com/r/reference/#table) for more information and chart attribute options!

r/2019-04-12-sunburst-chart.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ display_as: basic
44
language: r
55
layout: base
66
name: Sunburst Charts
7-
order: 11
7+
order: 10
88
output:
99
html_document:
1010
keep_md: true
@@ -149,4 +149,4 @@ fig
149149

150150
#Reference
151151

152-
See [https://plotly.com/r/reference/#sunburst](https://plotly.com/r/reference/#sunburst) for more information and chart attribute options!
152+
See [https://plotly.com/r/reference/#sunburst](https://plotly.com/r/reference/#sunburst) for more information and chart attribute options!

r/2020-02-25-treemap.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ display_as: basic
44
language: r
55
layout: base
66
name: Treemap Charts
7-
order: 16
7+
order: 15
88
output:
99
html_document:
1010
keep_md: true
@@ -183,4 +183,4 @@ fig
183183

184184
#Reference
185185

186-
See [https://plotly.com/r/reference/#treemap](https://plotly.com/r/reference/#treemap) for more information and chart attribute options!
186+
See [https://plotly.com/r/reference/#treemap](https://plotly.com/r/reference/#treemap) for more information and chart attribute options!

r/2021-07-08-ml-regression.Rmd

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
---
2+
description: Visualize regression in Tidymodels with Plotly
3+
display_as: ai_ml
4+
language: r
5+
layout: base
6+
name: ML Regression
7+
order: 1
8+
output:
9+
html_document:
10+
keep_md: true
11+
permalink: r/ml-regression/
12+
thumbnail: thumbnail/ml-regression.png
13+
---
14+
15+
```{r, echo = FALSE, message=FALSE}
16+
knitr::opts_chunk$set(message = FALSE, warning = FALSE)
17+
```
118
<!-- #region -->
219
This page shows how to use Plotly charts for displaying various types of regression models, starting from simple models like [Linear Regression](https://parsnip.tidymodels.org/reference/linear_reg.html) and progressively move towards models like Decision Tree and Polynomial Features. We highlight various capabilities of plotly, such as comparative analysis of the same model with different parameters, displaying Latex, and [surface plots](https://plotly.com/r/3d-surface-plots/) for 3D data.
320

r/2021-07-21-ml-knn.rmd renamed to r/2021-07-21-ml-knn.Rmd

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
---
2+
description: Visualize a k-Nearest-Neighbors (kNN) classification in R with Tidymodels.
3+
display_as: ai_ml
4+
language: r
5+
layout: base
6+
name: kNN Classification
7+
order: 2
8+
output:
9+
html_document:
10+
keep_md: true
11+
permalink: r/knn-classification/
12+
thumbnail: thumbnail/knn-classification.png
13+
---
14+
15+
```{r, echo = FALSE, message=FALSE}
16+
knitr::opts_chunk$set(message = FALSE, warning = FALSE)
17+
```
118
## kNN Classification in R
219

3-
Visualize Tidymodels's k-Nearest Neighbors (kNN) classification in R with Plotly.
20+
Visualize Tidymodels' k-Nearest Neighbors (kNN) classification in R with Plotly.
421

522

623
## Basic binary classification with kNN

0 commit comments

Comments
 (0)