number of variable in svm plot
0
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 9.6 years ago
hi all, the data set i have consists of x which is a matrix of 39 cancer patients [rows] and 2000 gene names [colmns]. each cell is the value of the gene for a particular patient. there are two types of cancer people representedas factor y. here is the code: library(e1071) #load database db <- read.csv(file="databases\\colon-cancer\\colon- cancer.csv",head=FALSE,sep=",") x = as.matrix(db[,1:(ncol(db)-1)]) y = as.factor(db[,ncol(db)]) svmModel = svm(x, y, cost = 10, cachesize=500, scale=F, type="C-classification", kernel="linear" ) my question is :to plot the svm model i need to plot 2 vaiables as y axis and x axis....but according to the nature of my dataset i have about 2000 variables?? does that mean i have to plot only two?? or is there a way to plot all of the 2000 and beable to show how the svm model classify the dataset. -- output of sessionInfo(): sessionInfo() R version 3.0.1 (2013-05-16) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=Arabic_Saudi Arabia.1256 LC_CTYPE=Arabic_Saudi Arabia.1256 [3] LC_MONETARY=Arabic_Saudi Arabia.1256 LC_NUMERIC=C [5] LC_TIME=Arabic_Saudi Arabia.1256 attached base packages: [1] parallel stats graphics grDevices utils datasets methods [8] base other attached packages: [1] e1071_1.6-1 class_7.3-7 genefilter_1.42.0 [4] ALL_1.4.14 Biobase_2.20.0 BiocGenerics_0.6.0 [7] BiocInstaller_1.10.2 loaded via a namespace (and not attached): [1] annotate_1.38.0 AnnotationDbi_1.22.5 DBI_0.2-7 [4] IRanges_1.18.1 RSQLite_0.11.3 splines_3.0.1 [7] stats4_3.0.1 survival_2.37-4 tools_3.0.1 [10] XML_3.96-1.1 xtable_1.7-1 -- Sent via the guest posting facility at bioconductor.org.
Cancer Cancer • 991 views
ADD COMMENT

Login before adding your answer.

Traffic: 899 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6