-
-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add decision tree and random forest #158
Conversation
@ulises-jeremias added this PR as draft til I can work out a compiler issue when running
==== END TEST OUTPUT ==== |
@BMJHayward hey! yes, it is because of missing dependencies. For now if you can send the output of probably the easiest way will be using docker |
Thanks, I attempted to use the docker build with the vs code plugin, no luck as of yet. Here's the output of V doctor:
|
great! because you are on Ubuntu you can install the same dependencies we install on CI to use your own machine. You can run the following to fix this issue and any possible issue for the future 😅 sudo apt-get update && \
sudo apt-get install --quiet -y --no-install-recommends \
gfortran \
libxi-dev \
libxcursor-dev \
mesa-common-dev \
liblapacke-dev \
libopenblas-dev \
libgc-dev \
libgl1-mesa-dev \
libopenmpi-dev \
libhdf5-dev \
hdf5-tools \
opencl-headers |
pub type Tree = Empty | Node | ||
|
||
pub struct Empty {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not up to date with recent V but some months ago this has been a huge anti-pattern.
IMHO this should be an optional - namely:
pub type Tree = Node | none
none
guarantees in compile-time that you will never forget to check the variable of type Tree
might be empty. It is also (much) faster in performance.
Or maybe just do not use any auxiliary/proxy type and use none
directly:
[heap]
pub struct Node {
mut:
feature int
threshold f64
left Node | none
right Node | none
value f64
}
(I do not know if this works but it should IMHO)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you! I agree 👌🏻 We can wait until the PR is ready for review before starting adding more comments and suggestions 😊
I'll assign you as a reviewer as soon as @BMJHayward says it is ready
closing this PR due to inactivity |
No description provided.