Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Jon Zeppieri
On Sun, Jul 23, 2017 at 10:09 PM, Jon Zeppieri wrote: > > Even after implementing my own suggestions, it's still much slower > than the python example it was based. Maybe there's an algorithmic > problem somewhere (aside from the vector iteration I mentioned > before). At any

Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Jon Zeppieri
On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl wrote: > Hi Racket Users, > > The last few days I've been working on implementing decision trees in Racket > and I've been following the following guide: >

Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Jon Zeppieri
On Sun, Jul 23, 2017 at 9:07 PM, Jon Zeppieri wrote: > Struct update does, however, involve a full copy[...] Err, immutable struct update, that is (in case it wasn't obvious). -- You received this message because you are subscribed to the Google Groups "Racket Users"

Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Jon Zeppieri
On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl wrote: > > How can I make my code more efficient, without changing the basic logic of it? > In addition to what I wrote before, there are a couple of places where you're constructing new lists when you don't need to.

Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Jon Zeppieri
On Sun, Jul 23, 2017 at 8:43 PM, David Storrs wrote: > > > On Sun, Jul 23, 2017 at 8:05 PM, Jon Zeppieri wrote: >> - Use a struct instead of a hash to represent a split. > > > Oh, are structs faster than hashes? Can't make a blanket statement, and the

Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread David Storrs
On Sun, Jul 23, 2017 at 8:05 PM, Jon Zeppieri wrote: > On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl > wrote: > > Hi Racket Users, > > > > The last few days I've been working on implementing decision trees in > Racket and I've been following

Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Matthias Felleisen
More generally, this seems to be a raw translation of an algorithm stated in a language that has a rather lowlevel view of data. Perhaps this is needed for this world, but I doubt it. I teach trees and decision trees to freshman students who have never programmed before, and Racket’s forms

Re: [racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Jon Zeppieri
On Sun, Jul 23, 2017 at 7:30 PM, Zelphir Kaltstahl wrote: > Hi Racket Users, > > The last few days I've been working on implementing decision trees in Racket > and I've been following the following guide: >

[racket-users] Decision Tree in Racket - Performance

2017-07-23 Thread Zelphir Kaltstahl
Hi Racket Users, The last few days I've been working on implementing decision trees in Racket and I've been following the following guide: http://machinelearningmastery.com/implement-decision-tree-algorithm-scratch-python/ Now I have the following code: