I had another idea for the implementation, which I tried to implement. I tried 
to store in each node a procedure, which can be used when predicting data point 
labels, so that I can simply get that from the struct and call it with the data 
point and get back, whether I should go left or right at each node.

While this probably works, I have another problem:

The test cases for fitting the decision tree fail now, because the procedures 
are different, although each of them is the same logic, only that they have 
different environments and different line numbers, in which they are created.

Is there a way to compare procedures? I could not find any `procedure-equal?` 
or something like that.

Just to clear it up a little: They are simple lambda expressions like the 
following:

```
(lambda (feature-value)
                     (if (< feature-value (Split-value best-split)) 'left 
'right))
```

-- 
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