Commit Graph

155 Commits

Author SHA1 Message Date
Noel Dawe 204b0aac87 FIX: only possible split sometimes creating children with negative or zero weight in the presence of negative sample weights 2013-01-14 15:06:32 +01:00
Lars Buitinck 37c1d092f8 COSMIT shut up the build by calling np.import_array in Cython modules
$(make in 2>&1 | wc -l) down from 706 to 517.

Took the liberty of modernizing some of the Cython code while I was at it.
2013-01-10 18:00:21 +01:00
Noel Dawe 7f745b8738 FIX: negative weight test. do not allow any class to have negative weight after a split 2013-01-08 23:29:19 +01:00
Gilles Louppe 7945e9d7df FIX: raise an exception if negative number of samples 2013-01-08 23:29:19 +01:00
Noel Dawe 329c1cda59 rm unneeded negative weight logic in Criterion.init_value and Gini.eval 2013-01-08 23:29:19 +01:00
Noel Dawe 9cdb787897 ignore splits that yield nodes with net negative weight in find_best_split 2013-01-08 23:29:19 +01:00
Gilles Louppe fa35dec328 PEP8 (some) 2013-01-08 23:29:18 +01:00
Gilles Louppe 68e25b1134 ENH: import aliases (3) 2013-01-08 23:29:18 +01:00
Gilles Louppe a314c9d198 ENH: import aliases (2) 2013-01-08 23:29:18 +01:00
Gilles Louppe d8c9365e61 ENH: import aliases 2013-01-08 23:29:18 +01:00
Gilles Louppe e949a42997 ENH: use random_state.shuffle 2013-01-08 23:29:18 +01:00
Gilles Louppe 8dcec88ce8 ENH: early binding + allocate features at tree creation (by @pprett) 2013-01-08 23:29:17 +01:00
Gilles Louppe cbb8df668b FIX: roll back some changes 2013-01-08 23:28:52 +01:00
Sebastian Berg 1a83c16b2b FIX: Do not rely on strides for contiguous arrays
When an array is contiguous in memory but has `shape[dim] == 1`, then
its `strides[dim]` is not really used, so it can be considered arbitrary
even if the array is contiguous. This is generally true for 0-sized arrays.

If there is no chance of 0-sized (or 1-sized and 1-dimensioal) arrays, then
this code is perfectly correct in current numpy. But its a dangerous
design choice and it would be nice to be able to change numpy at some point.
2012-12-10 16:33:55 +01:00
Gilles Louppe 34cdc4e222 FIX: prevent early stopping in tree construction (2) + Test 2012-10-22 15:36:36 +02:00
Gilles Louppe 50627fc875 FIX: prevent early stopping in tree construction 2012-10-22 14:34:36 +02:00
Gilles Louppe 7bc9b71b93 Avoid useless if-statements 2012-09-13 13:20:57 +02:00
Gilles Louppe 14c63aa75d Check for memory errors (3) 2012-09-13 10:39:08 +02:00
Gilles Louppe 8a3c77b48f Check for memory errors (2) 2012-09-13 10:26:24 +02:00
Gilles Louppe 4390efff7e Check for memory errors (1) 2012-09-13 09:41:51 +02:00
Peter Prettenhofer 34729673a4 change dtype of y to float64 (aka DOUBLE_t) 2012-07-21 15:54:36 +02:00
Gilles Louppe 669c980b63 COSMIT 2012-07-16 18:12:54 +02:00
Gilles Louppe c59ee33de7 Tree refactoring (20) 2012-07-16 16:10:58 +02:00
Gilles Louppe 2eb9e2fdad FIX: gradient boosting (2) 2012-07-16 15:59:10 +02:00
Gilles Louppe 923e471d34 FIX: PyArray_ZEROS -> np.zeros? 2012-07-16 14:41:24 +02:00
Gilles Louppe 2fe48dc0fd Tree refactoring (19) 2012-07-16 13:47:20 +02:00
Gilles Louppe 349a1e4b0f Added _tree.pxd 2012-07-16 11:48:32 +02:00
Gilles Louppe 310ada3a0f FIX: init/del => cinit/dealloc 2012-07-16 08:35:02 +02:00
Gilles Louppe 4d43fccd69 Merge branch 'tree-speedup' of github.com:glouppe/scikit-learn into tree-speedup
Conflicts:
	sklearn/tree/_tree.c
	sklearn/tree/_tree.pyx
2012-07-13 10:58:12 +02:00
Gilles Louppe b6d9492c19 FIX: sample_mask 2012-07-13 10:57:01 +02:00
Gilles Louppe 30f0a037a2 Tree refactoring (18) 2012-07-13 09:26:42 +02:00
Gilles Louppe c08f40b791 Tree refactoring (17) 2012-07-13 09:07:45 +02:00
Gilles Louppe 2b72a1ab04 FIX: @mrjbq7 comments 2012-07-13 09:03:52 +02:00
Gilles Louppe ec38852fdb Tree refactoring (16) 2012-07-12 23:13:50 +02:00
Gilles Louppe f482ebc20f Tree refactoring (15) 2012-07-12 16:33:58 +02:00
Gilles Louppe 16165c0e02 Tree refactoring (14) 2012-07-12 16:29:56 +02:00
Gilles Louppe 6bc9b82685 Tree refactoring (13) 2012-07-12 14:02:58 +02:00
Gilles Louppe 13cad8ce95 Tree refactoring (12) 2012-07-12 13:24:28 +02:00
Gilles Louppe c9da1f4bda ENH: make Tree picklable 2012-07-12 11:29:47 +02:00
Gilles Louppe b6e68a3dcc Tree refactoring (11) 2012-07-12 09:55:10 +02:00
Gilles Louppe 2347423e6a ENH: Tree properties 2012-07-12 09:48:19 +02:00
Gilles Louppe df04b4c100 Merge branch 'master' of github.com:scikit-learn/scikit-learn into tree-speedup
Conflicts:
	sklearn/tree/tree.py
2012-07-12 08:35:46 +02:00
Gilles Louppe 1e5aac8159 Tree refactoring (10) 2012-07-11 18:44:15 +02:00
Gilles Louppe 30f62f2d70 Tree refactoring (9) 2012-07-11 16:46:30 +02:00
Gilles Louppe a868024efa Tree refactoring (7) 2012-07-11 15:52:32 +02:00
Gilles Louppe db9cb785d6 Tree refactoring (6) 2012-07-11 14:22:14 +02:00
Gilles Louppe 00153507f7 Tree refactoring (5) 2012-07-11 13:48:51 +02:00
Gilles Louppe e97671337d Tree refactoring (4) 2012-07-11 11:58:18 +02:00
Gilles Louppe 3054660008 Tree refactoring (3) 2012-07-10 13:18:06 +02:00
Gilles Louppe 378645877f Tree refactoring (2) 2012-07-10 12:08:44 +02:00