Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
Merge 859922b into 29fb561
Browse files Browse the repository at this point in the history
  • Loading branch information
stnava committed Jan 7, 2015
2 parents 29fb561 + 859922b commit e260a79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -30,14 +30,14 @@ using SVM
using RDatasets

# We'll learn to separate setosa from other species
iris = data("datasets", "iris")
iris = dataset("datasets", "iris")

# SVM format expects observations in columns and features in rows
X = array(iris[:, 1:4])'
p, n = size(X)

# SVM format expects positive and negative examples to +1/-1
Y = [species == "setosa" ? 1.0 : -1.0 for species in iris[:, "Species"]]
Y = [species == "setosa" ? 1.0 : -1.0 for species in iris[:Species]]

# Select a subset of the data for training, test on the rest.
train = randbool(n)
Expand Down

0 comments on commit e260a79

Please sign in to comment.