aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2018-03-28 13:43:39 +0100
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2018-03-28 13:43:39 +0100
commit1f30df8d941d30ab546421bc56c92c9fa9cf8a59 (patch)
tree97376530174fc377768250d39a8b142b28b83bff
parentAdd example for nonlinear classification (diff)
downloadrgensvm-1f30df8d941d30ab546421bc56c92c9fa9cf8a59.tar.gz
rgensvm-1f30df8d941d30ab546421bc56c92c9fa9cf8a59.zip
add code used for creating the readme figure
-rw-r--r--.image.pngbin24251 -> 24430 bytes
-rw-r--r--README.md19
2 files changed, 17 insertions, 2 deletions
diff --git a/.image.png b/.image.png
index 281878c..8c6b144 100644
--- a/.image.png
+++ b/.image.png
Binary files differ
diff --git a/README.md b/README.md
index 1fc8143..60f202f 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,17 @@ classifier in R.
![Pretty picture](./.image.png)
+```r
+# Plot created with:
+> library(gensvm)
+> x <- iris[, -5]
+> y <- iris[, 5]
+> fit <- gensvm(x, y, kernel='rbf', gamma=10, max.iter=5000, verbose=1,
+ random.seed=123)
+> plot(fit, x, y, xlim=c(-5, 5), ylim=c(-5, 5))
+> title("Iris dataset (GenSVM + RBF)")
+```
+
Introduction
------------
@@ -32,7 +43,9 @@ Installation
This package can be installed from CRAN:
- install.packages('gensvm')
+```r
+> install.packages('gensvm')
+```
Usage
-----
@@ -65,7 +78,9 @@ Citing
If you use GenSVM in your work, please cite the paper using the information
avialable through the following R command:
- citation('gensvm')
+```r
+> citation('gensvm')
+```
Alternatively, you can use the following BibTeX code directly: