valdecy / c4.5 Goto Github PK
View Code? Open in Web Editor NEWC4.5 Algorithm - A Decision Tree for Numerical and Categorical Data that can Handle Missing Values and Pruning Methods
C4.5 Algorithm - A Decision Tree for Numerical and Categorical Data that can Handle Missing Values and Pruning Methods
this column "0" is actually the y
which was added by the train function at first to the X
dataframe, but mistakenly goes into the decision parameters.
with this mistake the training function runs just fine, but when predicting based on the tree we get an error that there is no column "0".
First of all, I apologize for not looking closely at your code, but both pre-pruning and post-pruning require validation sets for test pruning, but your Part 4 code does not have validation sets
Hi,
Not a big issue, but just wanted to share that you might need to reset the dataframe indices (of Xdata and ydata) before entering them into dt_c45(). The indices caused the following error for me:
TypeError: '<' not supported between instances of 'float' and 'str'
referring to:
244 if len(np.unique(branch[i][0])) == 1 or len(branch[i]) == 1:
After resetting the indices, using df.reset_index(drop=True)
, the function works. Thanks!
I mean the output of the script here is a list of IF-THEN rules cant we convert it to an image that contain the decision tree ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.