Comments (3)
If somebody could post quick minimal example how you create this structured array from two lists, that would be very helpfu
I usually use numpy.fromiter as in this line.
It seems there are a couple of related issues,
- Construction of structured array is not straight-forward.
- Supporting passing a 2-column pandas DataFrame instead of structured array.
- Allow for censoring indicator to be an array of 0/1 instead of boolean.
I believe it would be best to add a function equivalent to R's Surv
that converts different inputs to the structured array format used internally.
from scikit-survival.
Absolutely for it! I think am quite capable in programming. But I still have no clue, how to get to the structured arrays and I've been trying for a while now! I know my python-skills are a bit rusty - but not this much.
If somebody could post quick minimal example how you create this structured array from two lists, that would be very helpful. Maybe add it to the example Python Notebook. Thanks
from scikit-survival.
@region-spotteR I use a pandas dataframe -> structured array workflow. Say you have pandas df
with 2 columns: status
and time
. Convert status to bool and then convert the 2 columns into structured array
df.status = df.status.astype('bool')
df.to_records(index=False)
to recap, the point of this thread is to discuss/request that we don't need the first line
from scikit-survival.
Related Issues (20)
- Visualizing decision trees HOT 1
- Survival Random Forest predict_survival_function does not scale with `n_jobs` HOT 1
- Clarify which metrics expect output of survival function vs output of cumulative hazard function HOT 1
- conf_type is not working in kaplan_meier_estimator: HOT 2
- How to ensemble predictions from ExtraSurvivalTrees models? HOT 1
- parallelization for GradientBoostingSurvivalAnalysis? HOT 1
- plotting a tree from estimators_[i] from RandomSurvivalForest.fit() HOT 6
- Possible memory leak for FastKernelSurvivalSVM HOT 1
- Fit does not throw exception if negative event times are passed
- Description of estimate parameter in integrated_brier_score is unclear HOT 1
- Ipcw estimation: Add small value for numerical stability HOT 1
- Description of estimate parameter in brier_score is unclear HOT 4
- Ability to suppress future warnings? HOT 1
- Possible improvement in documentation of Cumulative dynamic AUC HOT 1
- concordance_index_ipcw output inconsistent with survAUC package HOT 1
- Support Scikit-Learn 1.4 (stable version)
- 'cosine' kernel in FastKernelSurvivalSVM still in documentation but not working in 0.22.2
- Can't instantiate abstract class GradientBoostingSurvivalAnalysis with abstract methods _encode_y, _get_loss HOT 1
- SurvivalTree is handling sample_weight incorrectly
- [BUG] `GradientBoostingSurvivalAnalysis` - docstring/logic mismatch on possible `criterion` values HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-survival.