You have to run cython on it. Make cython I think.
On Mar 31, 2013 3:26 PM, "Javier Romero" <[email protected]> wrote:
> I applied the changes suggested in
> https://github.com/erg/scikit-learn/commit/fa7d0b6ca0de74aec8ab207564329ffb3e62967fbut
> I still get segfault running the previously posted code:
>
> Program received signal SIGSEGV, Segmentation fault.
> __pyx_f_7sklearn_4tree_5_tree_4Tree_find_best_split
> (__pyx_v_self=<optimized out>, __pyx_v_X_ptr=0x7ffb5edb4010,
> __pyx_v_X_stride=12000000, __pyx_v_X_argsorted_ptr=0x7ff922a6d010,
> __pyx_v_X_argsorted_stride=12000000,
> __pyx_v_y_ptr=0x7ff8f8737010, __pyx_v_y_stride=3,
> __pyx_v_sample_weight_ptr=0x7fffe4241010,
> __pyx_v_sample_mask_ptr=0x18139b0 "", __pyx_v_n_node_samples=7586675,
> __pyx_v_weighted_n_node_samples=0.60797485709190369,
> __pyx_v_n_total_samples=12000000, __pyx_v__best_i=0x7fffffffcb8c,
> __pyx_v__best_t=0x7fffffffcb58,
> __pyx_v__best_error=0x7fffffffcb60,
> __pyx_v__initial_error=0x7fffffffcb68) at sklearn/tree/_tree.c:6727
> 6727 __pyx_t_5 =
> ((__pyx_v_sample_mask_ptr[(__pyx_v_X_argsorted_i[__pyx_v_a])]) == 0);
> (gdb) bt
> #0 __pyx_f_7sklearn_4tree_5_tree_4Tree_find_best_split
> (__pyx_v_self=<optimized out>, __pyx_v_X_ptr=0x7ffb5edb4010,
> __pyx_v_X_stride=12000000, __pyx_v_X_argsorted_ptr=0x7ff922a6d010,
> __pyx_v_X_argsorted_stride=12000000,
> __pyx_v_y_ptr=0x7ff8f8737010, __pyx_v_y_stride=3,
> __pyx_v_sample_weight_ptr=0x7fffe4241010,
> __pyx_v_sample_mask_ptr=0x18139b0 "", __pyx_v_n_node_samples=7586675,
> __pyx_v_weighted_n_node_samples=0.60797485709190369,
> __pyx_v_n_total_samples=12000000, __pyx_v__best_i=0x7fffffffcb8c,
> __pyx_v__best_t=0x7fffffffcb58,
> __pyx_v__best_error=0x7fffffffcb60,
> __pyx_v__initial_error=0x7fffffffcb68) at sklearn/tree/_tree.c:6727
> #1 0x00007fffead82721 in
> __pyx_f_7sklearn_4tree_5_tree_4Tree_recursive_partition
> (__pyx_v_self=0x174e3b0, __pyx_v_X=0xa631f0,
> __pyx_v_X_argsorted=0x169f7d0, __pyx_v_y=0x1720f90,
> __pyx_v_sample_weight=0x16a52c0, __pyx_v_sample_mask=0x169b8f0,
> __pyx_v_n_node_samples=7586675,
> __pyx_v_weighted_n_node_samples=12000000, __pyx_v_depth=0,
> __pyx_v_parent=-1,
> __pyx_v_is_left_child=0, __pyx_v_buffer_value=0x14bfda0) at
> sklearn/tree/_tree.c:5211
> #2 0x00007fffead73cff in __pyx_f_7sklearn_4tree_5_tree_4Tree_build
> (__pyx_v_self=0x174e3b0, __pyx_v_X=0xa631f0,
> __pyx_v_y=0x1720f90, __pyx_skip_dispatch=<optimized out>,
> __pyx_optional_args=<optimized out>) at sklearn/tree/_tree.c:4613
> #3 0x00007fffead72ff1 in __pyx_pf_7sklearn_4tree_5_tree_4Tree_10build
> (__pyx_v_sample_weight=0x16a52c0,
> __pyx_v_X_argsorted=0x169f7d0, __pyx_v_sample_mask=0x169b8f0,
> __pyx_v_y=0x1720f90, __pyx_v_X=0xa631f0,
> __pyx_v_self=0x174e3b0) at sklearn/tree/_tree.c:4800
> #4 __pyx_pw_7sklearn_4tree_5_tree_4Tree_11build (__pyx_v_self=0x174e3b0,
> __pyx_args=0x1768440, __pyx_kwds=<optimized out>)
> at sklearn/tree/_tree.c:4769
> #5 0x000000000049d585 in PyEval_EvalFrameEx ()
> #6 0x000000000049f1c0 in PyEval_EvalCodeEx ()
> #7 0x00000000004983b8 in PyEval_EvalFrameEx ()
> #8 0x000000000049f1c0 in PyEval_EvalCodeEx ()
> #9 0x00000000004a8a92 in ?? ()
> #10 0x00000000004e9f36 in PyObject_Call ()
> #11 0x0000000000499bc0 in PyEval_EvalFrameEx ()
> #12 0x000000000049f1c0 in PyEval_EvalCodeEx ()
> #13 0x00000000004a8960 in ?? ()
> #14 0x00000000004e9f36 in PyObject_Call ()
> #15 0x00000000004ec11a in ?? ()
> #16 0x00000000004e9f36 in PyObject_Call ()
> #17 0x00000000004eb39e in ?? ()
> #18 0x00000000004db6a6 in ?? ()
> #19 0x00000000004e9f36 in PyObject_Call ()
> #20 0x000000000049846a in PyEval_EvalFrameEx ()
> #21 0x0000000000498602 in PyEval_EvalFrameEx ()
> #22 0x000000000049f1c0 in PyEval_EvalCodeEx ()
> #23 0x00000000004a8960 in ?? ()
> #24 0x00000000004e9f36 in PyObject_Call ()
> #25 0x00000000004ec11a in ?? ()
> #26 0x00000000004e9f36 in PyObject_Call ()
> #27 0x00000000004eb62e in ?? ()
> #28 0x00000000004e9f36 in PyObject_Call ()
> #29 0x000000000049846a in PyEval_EvalFrameEx ()
> #30 0x000000000049f1c0 in PyEval_EvalCodeEx ()
> #31 0x00000000004983b8 in PyEval_EvalFrameEx ()
> #32 0x000000000049f1c0 in PyEval_EvalCodeEx ()
> #33 0x00000000004a9081 in PyRun_FileExFlags ()
> #34 0x00000000004a9311 in PyRun_SimpleFileExFlags ()
> #35 0x00000000004aa8bd in Py_Main ()
> #36 0x00007ffff68e176d in __libc_start_main () from
> /lib/x86_64-linux-gnu/libc.so.6
> #37 0x000000000041b9b1 in _start ()
>
> -- Javier Romero --
>
>
> On Sun, Mar 31, 2013 at 8:05 PM, Javier Romero <[email protected]>wrote:
>
>> Thanks for the fast answer! I'll try to use np.intp_t instead of the
>> uint8. I'm using sklearn 0.13.1
>>
>> -- Javier Romero --
>>
>>
>> On Sun, Mar 31, 2013 at 8:03 PM, Andreas Mueller <
>> [email protected]> wrote:
>>
>>> On 03/31/2013 08:00 PM, Andreas Mueller wrote:
>>> > Which version of sklearn are you using? Could you try with current
>>> master?
>>> >
>>> >
>>> Never mind, the patch isn't there yet.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Own the Future-Intel(R) Level Up Game Demo Contest 2013
>>> Rise to greatness in Intel's independent game demo contest. Compete
>>> for recognition, cash, and the chance to get your game on Steam.
>>> $5K grand prize plus 10 genre and skill prizes. Submit your demo
>>> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
>>> _______________________________________________
>>> Scikit-learn-general mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Own the Future-Intel(R) Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest. Compete
> for recognition, cash, and the chance to get your game on Steam.
> $5K grand prize plus 10 genre and skill prizes. Submit your demo
> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general