mcacontour | R Documentation |
This function presents visual graphics by means of Multiple correspondence Analysis projection. Interval variables are categorized to bins. Dependent classification variable is set as supplementary variable. Machine learning algorithm predictions are presented in a filled contour setting.
mcacontour(dataf=dataf,listconti,listclass,vardep,proba="",bins=8,
Dime1="Dim.1",Dime2="Dim.2",classvar=1,intergrid=0,selec=0,
title="",title2="",listacol="",depcol="",alpha1=0.8,alpha2=0.8,alpha3=0.7,modelo="glm",
nodos=3,maxit=200,decay=0.01,sampsize=400,mtry=2,nodesize=5,
ntree=400,ntreegbm=500,shrink=0.01,bag.fraction=1,n.minobsinnode=10,C=100,gamma=10)
dataf |
data frame. |
listconti |
Interval variables to use, in format c("var1","var2",...). |
listclass |
Class variables to use, in format c("var1","var2",...). |
vardep |
Dependent binary classification variable. |
proba |
vector of probability predictions obtained externally (optional) |
bins |
Number of bins for categorize interval variables . |
Dime1 |
FAMD Dimensions to consider. Dim.1 and Dim.2 by default. |
Dime2 |
FAMD Dimensions to consider. Dim.1 and Dim.2 by default. |
classvar |
1 if dependent variable categories are plotted as supplementary |
intergrid |
scale of grid for contour:0 if automatic |
selec |
1 if stepwise logistic variable selection is required, 0 if not. |
title |
plot main title |
title2 |
plot subtitle |
listacol |
vector of colors for labels |
depcol |
vector of two colors for points |
alpha1 |
alpha transparency for majoritary class |
alpha2 |
alpha transparency for minoritary class |
alpha3 |
alpha transparency for fit probability plots |
modelo |
name of model: "glm","gbm","rf,","nnet","svm". |
nodos |
nnet: nodes |
maxit |
nnet: iterations |
decay |
nnet: decay |
sampsize |
rf: sampsize |
mtry |
rf: mtry |
nodesize |
rf: nodesize |
ntree |
rf: ntree |
ntreegbm |
gbm: ntree |
shrink |
gbm: shrink |
bag.fraction |
gbm: bag.fraction |
n.minobsinnode |
gbm:n.minobsinnode |
C |
svm Radial: C |
gamma |
svm Radial: gamma |
This function applies MCA (Multiple Correspondence Analysis) in order to project points and categories of class variables in the same plot. In addition, interval variables listed in listconti are categorized to the number given in bins parameter (by default 8 bins). Further explanation about machine learning classification and contour curves, see the famdcontour function documentation.
A list with the following objects:
plot of points on MCA two dimensions
plot of points and variables
plot of points and contour curves
plot of points, contour curves and variables
plot of points colored by fitted probability
plot of points colored by abs difference
dataset used for graph1
dataset used for graph2
dataset used for graph3
dataset used for graph4
interval variables used
class variables used
color schemes and other parameters
data(breastwisconsin1)
dataf<-breastwisconsin1
listconti=c( "clump_thickness","uniformity_of_cell_shape","mitosis")
listclass=c("")
vardep="classes"
result<-mcacontour(dataf=dataf,listconti,listclass,vardep)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.