Skip to content

Commit

Permalink
Fix ScikitLearn API regression example
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge committed May 20, 2018
1 parent 80d48e7 commit 29274f4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -61,6 +61,9 @@ yp = predict(model, instances[2:2:end, :])
#epsilon-regression
whiteside = RDatasets.dataset("MASS", "whiteside")
X = Array(whiteside[:Gas])
if typeof(X) <: AbstractVector
X = reshape(X, (length(X),1))
end
y = Array(whiteside[:Temp])
svrmod = fit!(EpsilonSVR(cost = 10., gamma = 1.), X, y)
yp = predict(svrmod, X)
Expand Down

0 comments on commit 29274f4

Please sign in to comment.