Examples¶
The examples are carried out using "iris" data.
Calculate the MaxNMI between two variables¶
- maxNMI(iris$Sepal.Length,iris$Petal.Length)
Calculate all link coefficients for all variable couples¶
- corCouples<-multiBivariateCorrelation(iris)
- print(corCouples)
Extract a correlation matrix from the correlation dataframe¶
The Pearson correlation matrix :
- corMatrixPearson<-corCouplesToMatrix(x1_x2_val = corCouples[,c('X1','X2',"pearson")])
- print(corMatrixPearson)
The MaxNMI matrix:
- corMatrixMaxNMI<-corCouplesToMatrix(x1_x2_val = corCouples[,c('X1','X2',"MaxNMI")])
- print(corMatrixMaxNMI)
Clustering of variables using a correlation matrix¶
- cl<-clusterVariables(correlationMatrix = corMatrixMaxNMI)
- print(cl)
Visualize the graph using Pearson correlation¶
- linkspotterGraph(corDF = corCouples, variablesClustering = cl,corMethod = "pearson", minCor = 0.25, smoothEdges = FALSE,dynamicNodes = FALSE)
Visualize the graph using MaxNMI¶
- linkspotterGraph(corDF = corCouples, variablesClustering = cl,corMethod = "MaxNMI", minCor = 0.25, smoothEdges = F,dynamicNodes = TRUE)
Launch the costumizable user interface¶
- linkspotterUI(dataset = iris, corDF = corCouples,variablesClustering = cl, appTitle = "Linkspotter example")
Additional features¶
Complete Linkspotter computation:
- lsiris<-linkspotterComplete(iris)
Complete Linkspotter computation from an external file:
- lsiris<-linkspotterOnFile("iris.csv")
- summary(lsiris)
Then launch the user interface using:
- lsiris$run_it