Just want to emphasize that the main source of inefficiency in your code is 
what I mentioned in my last message (iterating over the class labels of each 
row instead of the unique class labels of the entire data set). The second 
biggest factor is your structural recursion over a non-recursive data type 
(namely, vectors). Everything else, from a performance perspective, is 
insignificant.

Aside: if I read Daniel's solution correct, he avoids the first issue by 
assuming that it's a binary classification task (that is, that there are only 
two classes).

> On Jul 24, 2017, at 4:08 AM, Zelphir Kaltstahl <zelphirkaltst...@gmail.com> 
> wrote:
> 
> Wow, thanks for all the feedback, I'll try to get most of the mentioned stuff 
> done and then post an update : )
> 
>> I teach trees and decision trees to freshman students who have never 
>> programmed before, and Racket’s forms of data and functions are extremely 
>> suitable to this domain.
> 
> I think this is relating to using vectors and accessing them by index? How 
> would you represent the data? What forms of data are better suited?
> 
> Mentioned were:
> 
> - struct instead of hash
> - list of vectors instead of vector of vectors
> 
> Your post made me think of functions themselves. Would it be possible to 
> represent the splits as chains of functions and would that have any 
> advantage? Is that what you are hinting at?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to