Commit Graph

10 Commits

Author SHA1 Message Date
Brian Holt 9c9320dbc2 time is measured in seconds 2011-09-08 18:49:48 +01:00
Olivier Grisel f0f0182e34 More style consistency improvements 2011-09-04 10:54:21 +02:00
Olivier Grisel 9b5c7cdf56 more renamings 2011-09-03 20:58:20 +02:00
Brian Holt b484aa4432 merged upstream-master into enh/tree 2011-09-03 13:04:27 +01:00
Brian Holt b5d63bafe2 renamed K to n_classes 2011-09-03 10:35:07 +01:00
Brian Holt d0e4757855 Removed unnecessary import 2011-08-22 22:08:51 +01:00
Brian Holt ebe226de75 Updated benchmarking for trees 2011-08-09 12:45:53 +01:00
Brian Holt 6af2d2a345 removed occurances of tree_model 2011-08-02 16:56:54 +01:00
Brian Holt 6a8ce6f7e8 make number of classes explicit 2011-07-29 13:58:44 +01:00
Brian Holt 24348af224 Refactored decision trees and forests to support CART algorithm.
Notable changes:
1) Supports classification and regression
2) 3 classification criteria, 1 regression criterion
3) A new dataset is provided to test regression (Boston House Prices)
4) Weights are removed from the algorithm entirely. If the need for weights can be justified, I would welcome reintroducing them, but for the refactoring I left them out.
5) The subset of dimensions (F) to split on is fixed for the entire tree, not at each node.  This is more in line with CART and RandomForests.
6) A max_depth parameter is offered to limit the size of the constructed trees.
7) Randomisation is fixed with python's random module, but can be seeded.
8) For classification, the number of classes must be provided when the tree is constructed.  This is because the tree cannot necessarily infer the correct number of labels at the time of training if only a subset of the data is used for individual trees.
9) For classification, labels are not normalised internally.  Labels must be provided to the algorithm in the range [0, ..., K)
10) For classification, the leaf nodes retain the distribution of classes.  This means that it is possible to query the tree for the probability distribution of a test sample
2011-07-29 12:20:03 +01:00