Skip to content

Commit

Permalink
update DataFrame notation (#27)
Browse files Browse the repository at this point in the history
the example does not run as it is because of an outdated notation of DataFrames to select columns
  • Loading branch information
lmiq authored Apr 13, 2023
1 parent d73a705 commit 6ccf044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ using RDatasets
using Gadfly

cars = dataset("datasets","cars")
X = map(Float64,convert(Array,cars[:Speed]))
Y = map(Float64,convert(Array,cars[:Dist]))
X = map(Float64,convert(Array,cars[!,:Speed]))
Y = map(Float64,convert(Array,cars[!,:Dist]))

spl = fit(SmoothingSpline, X, Y, 250.0) # λ=250.0
Ypred = predict(spl) # fitted vector
Expand Down

0 comments on commit 6ccf044

Please sign in to comment.