imatge-upc / survlimepy Goto Github PK
View Code? Open in Web Editor NEWLocal interpretability for survival models
License: GNU General Public License v3.0
Local interpretability for survival models
License: GNU General Public License v3.0
I am trying to install SurvLIMEpy
on a Linux machine, but getting the following errors. Any help?
Thanks in advance!
$ /home/x/.virtualenvs/r-reticulate/bin/pip install SurvLIMEpy
Collecting SurvLIMEpy
Using cached survlimepy-0.0.10-py3-none-any.whl (65 kB)
Requirement already satisfied: numpy in ./.virtualenvs/r-reticulate/lib64/python3.11/site-packages (from SurvLIMEpy) (1.25.0)
Requirement already satisfied: cvxpy in ./.virtualenvs/r-reticulate/lib64/python3.11/site-packages (from SurvLIMEpy) (1.3.1)
Collecting scikit-survival==0.18.0 (from SurvLIMEpy)
Using cached scikit-survival-0.18.0.tar.gz (2.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [110 lines of output]
<string>:19: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Error compiling Cython file:
------------------------------------------------------------
...
free(self.riskset_left)
def __reduce__(self):
return (type(self), (self.n_outputs, self.n_samples, self.event_times), self.__getstate__())
cdef int init(self, const DOUBLE_t[:, ::1] y, DOUBLE_t* sample_weight,
^
------------------------------------------------------------
sksurv/tree/_criterion.pyx:131:9: Signature not compatible with previous declaration
Error compiling Cython file:
------------------------------------------------------------
...
# The criterion object is maintained such that left and right collected
# statistics correspond to samples[start:pos] and samples[pos:end].
# Methods
cdef int init(
^
------------------------------------------------------------
/tmp/pip-build-env-t_oxqvhj/overlay/lib64/python3.11/site-packages/sklearn/tree/_criterion.pxd:44:17: Previous declaration is here
Error compiling Cython file:
------------------------------------------------------------
...
cdef Riskset * riskset_total
cdef Riskset * riskset_left
def __cinit__(self, SIZE_t n_outputs, SIZE_t n_samples, const DOUBLE_t[::1] event_times):
# Default values
self.sample_weight = NULL
^
------------------------------------------------------------
sksurv/tree/_criterion.pyx:102:29: Cannot convert 'void *' to memoryviewslice
Error compiling Cython file:
------------------------------------------------------------
...
SIZE_t end) nogil except -1:
"""Initialize the criterion at node samples[start:end] and
children samples[start:start] and samples[start:end]."""
# Initialize fields
self.y = y
self.sample_weight = sample_weight
^
------------------------------------------------------------
sksurv/tree/_criterion.pyx:138:29: Cannot convert 'DOUBLE_t *' to memoryviewslice
Error compiling Cython file:
------------------------------------------------------------
...
self.pos = self.end
return 0
cdef int update(self, SIZE_t new_pos) nogil except -1:
"""Updated statistics by moving samples[pos:new_pos] to the left."""
cdef const double* sample_weight = self.sample_weight
^
------------------------------------------------------------
sksurv/tree/_criterion.pyx:209:47: Cannot assign type 'const DOUBLE_t[:]' to 'const double *'
Compiling sksurv/bintrees/_binarytrees.pyx because it changed.
Compiling sksurv/kernels/_clinical_kernel.pyx because it changed.
Compiling sksurv/ensemble/_coxph_loss.pyx because it changed.
Compiling sksurv/svm/_prsvm.pyx because it changed.
Compiling sksurv/svm/_minlip.pyx because it changed.
Compiling sksurv/tree/_criterion.pyx because it changed.
Compiling sksurv/linear_model/_coxnet.pyx because it changed.
[1/7] Cythonizing sksurv/bintrees/_binarytrees.pyx
[2/7] Cythonizing sksurv/ensemble/_coxph_loss.pyx
[3/7] Cythonizing sksurv/kernels/_clinical_kernel.pyx
[4/7] Cythonizing sksurv/linear_model/_coxnet.pyx
[5/7] Cythonizing sksurv/svm/_minlip.pyx
[6/7] Cythonizing sksurv/svm/_prsvm.pyx
[7/7] Cythonizing sksurv/tree/_criterion.pyx
Traceback (most recent call last):
File "/home/x/.virtualenvs/r-reticulate/lib64/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/x/.virtualenvs/r-reticulate/lib64/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/x/.virtualenvs/r-reticulate/lib64/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-t_oxqvhj/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-t_oxqvhj/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-t_oxqvhj/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 222, in <module>
File "<string>", line 195, in setup_package
File "<string>", line 175, in get_extensions
File "<string>", line 139, in cythonize_extensions
File "/tmp/pip-build-env-t_oxqvhj/overlay/lib64/python3.11/site-packages/Cython/Build/Dependencies.py", line 1115, in cythonize
cythonize_one(*args)
File "/tmp/pip-build-env-t_oxqvhj/overlay/lib64/python3.11/site-packages/Cython/Build/Dependencies.py", line 1238, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: sksurv/tree/_criterion.pyx
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
$
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.