You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Thank you for sharing your implementation of C4.5 (over 10 years ago!!)
I just wanted to point out a simple fix that can improve by order of magnitudes the runtime of the algorithm, in some datasets. I hope this will be useful for people like me that will find this repo in the future.
return {k: [v[i] for i in range(len(v)) if i in ind] for k, v in t.items()}
Here, it is useless to cycle over range and ind. You can simplify as follows:
return {k: [v[i] for i in ind] for k, v in t.items()}
On my machine, running the updated version on the mushroom UCI dataset takes <1s, while before it took about 50 seconds.
I plan to release a repository that will include your updated code. (hoping that's ok!)
Thanks!
The text was updated successfully, but these errors were encountered:
Hi! Thank you for sharing your implementation of C4.5 (over 10 years ago!!)
I just wanted to point out a simple fix that can improve by order of magnitudes the runtime of the algorithm, in some datasets. I hope this will be useful for people like me that will find this repo in the future.
Here, it is useless to cycle over range and ind. You can simplify as follows:
On my machine, running the updated version on the mushroom UCI dataset takes <1s, while before it took about 50 seconds.
I plan to release a repository that will include your updated code. (hoping that's ok!)
Thanks!
The text was updated successfully, but these errors were encountered: