Post
1328
Simplified implementation of “Neural Networks are Decision Trees”.
Showing that any neural network with any activation function can be represented as a decision tree. Since decision trees are inherently interpretable, their equivalence helps us understand how the network makes decisions.
In this implementation, we trained a simple neural network for 1k epochs on makemoons, saved the trained weights (state dicts), extracted the decision tree equivalent from the trained weight then visualize and evaluate.
Code: https://github.com/Jaykef/ai-algorithms/blob/main/nns_are%20decision_trees.ipynb
Showing that any neural network with any activation function can be represented as a decision tree. Since decision trees are inherently interpretable, their equivalence helps us understand how the network makes decisions.
In this implementation, we trained a simple neural network for 1k epochs on makemoons, saved the trained weights (state dicts), extracted the decision tree equivalent from the trained weight then visualize and evaluate.
Code: https://github.com/Jaykef/ai-algorithms/blob/main/nns_are%20decision_trees.ipynb