### Building a knowledge tree diagram
### Load the necessary libraries
library(collapsibleTree)
### If the standard installation does not work, install the latest version from ### GitHub by typing:
### install.packages("devtools")
### devtools::install_github("AdeelK93/collapsibleTree")
library(data.tree)
library(networkD3)
### Assign each subject name to a string variable to eliminate needless extra typing
### The tree root is the ORDS program:
root <- "Operational Research & Data Science"
### 1st Level tree branches:
sc <- "Scientific Computing"
op <- "Optimization"
or <- "Operations Research"
lso <- "Large Scale Optimization for Data Science"
ico <- "Integer and Combinatorial Optimization"
sm <- "Stochastic Modelling"
dm <- "Data Mining"
ml <- "Intro to Machine Learning"
### Definite the number of childs of each branch. To reduce and simplify the code,
### use the 'rep' function to call a certain string variable multiple times.
root_branch_lev1 <- c(root,
rep(op, 9),
root,
rep(or, 8),
root,
rep(sc, 7),
root,
rep(lso, 6),
root,
rep(ml, 9),
root,
rep(ico, 9),
root,
rep(sm, 7),
root,
rep(dm, 8)
)
### 2nd level tree branches
branch_lev2 <- c(op,
"Convexity", "Simplex Method",
"Revised-Simplex", "Lagrangeans for Nonlinear Problems",
"Karush-Kuhn-Tucker Conditions (KKT)", "Duality Theory",
"Goal Programming", "Kruskal's Algorithm",
"Prim's Algorithm",
or,
"Inventory Problems", "Knapsack Problem",
"Stochastic Problems", "Branch and Bound Method",
"Gomory pure integer cuts", "Minimax and Maximin",
"Dominated Strategies", "Reaction Curves and Nash-Equilibria",
sc,
"SC1", "SC2","SC3", "SC4","SC5", "SC6","SC7",
lso,
"LSODS1", "LSODS2", "LSODS3","LSODS4","LSODS5","LSODS6",
ml,
"Linear Regression", "Logistic Regression",
"Decision Trees", "Naive Bayes",
"Neural Networks", "Support Vector Machines",
"Dimensionality Reduction with PCA", "K-means",
"Gaussian Mixture Models",
ico,
"Integer Programming and total unimodularity",
"Branch-and-Cut Algorithm",
"Lagrangean Relaxation",
"Metaheuristics",
"Matching and Assignment Problems",
"Network problems",
"Covering problems",
"The traveling salesman problem",
"Knapsack and Scheduling problems",
sm,
"Probability Review: Conditional Probability and basic definitions of stochastic processes",
"Discrete Markov-Chains", "Absorption problems",
"Markov-Chains with costs and rewards", "Poisson processes",
"Continuous Markov-Chains", "Basic queueing models",
dm,
"Data preprocessing and cleaning",
"Data visualization, exploratory data analysis",
"Predictive Modelling with SVM",
"Performance evaluation (ROC curves)",
"Issues related to large data sets",
"Apriori algorithm",
"Hierarchical Clustering",
"Applications to text and web mining, bioinformatics and astronomy data")
df <- data.frame(from = root_branch_lev1, to = branch_lev2,
stringsAsFactors = FALSE)
data_tree <- data.tree::FromDataFrameNetwork(df)
Note: The graph is interactive and the parent nodes could be collapsed by clicking on them.
collapsibleTree(data_tree, fontSize = 13, width = 1200, height = 900,
collapsed = FALSE, tooltip = FALSE, zoomable = FALSE)
[1] Collapsible Tree: Geography Example by Adeel Khan; https://adeelk93.github.io/collapsibleTree/