Skip to content

Commit

Permalink
Merge pull request #17 from jzazo/fix_example
Browse files Browse the repository at this point in the history
Fix example for julia v1.
  • Loading branch information
innerlee authored Jan 11, 2019
2 parents 4060a08 + f74452c commit 2ea5665
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
Julia bindings for [LIBLINEAR](https://www.csie.ntu.edu.tw/~cjlin/liblinear/).

```julia
using RDatasets
using RDatasets, LIBLINEAR
using Printf, Statistics

# Load Fisher's classic iris data
iris = dataset("datasets", "iris")
Expand All @@ -15,7 +16,7 @@ iris = dataset("datasets", "iris")
labels = iris[:Species]

# First dimension of input data is features; second is instances
instances = convert(Array,iris[:, 1:4])'
instances = convert(Matrix, iris[:, 1:4])'

# Train SVM on half of the data using default parameters. See the linear_train
# function in LIBLINEAR.jl for optional parameter settings.
Expand Down

0 comments on commit 2ea5665

Please sign in to comment.