Tag Info

9

In the documentation, you can find that the predictions are returned on the hazard ratio scale: survival:cox Cox regression for right censored survival time data (negative values are considered right censored). Note that predictions are returned on the hazard ratio scale (i.e., as HR = exp(marginal_prediction) in the proportional hazard function h(t) = h0(...

8

The proportional hazard model assumes hazard rates of the form: $h(t|X) = h_0(t) \cdot risk(X)$ where usually $risk(X) = exp(X\beta)$. The xgboost predict method returns $risk(X)$ only. What we can do is use the survival::basehaz function to find $h_0(t)$. Problem is it's not "calibrated" to the actual baseline hazard rate computed in xgboost. What we can ...

6

Whenever your task includes something like "...when XY will fail...", i'd say go for survival analysis first, it is easy and fast and it will give you overview of your data. With your data you can either turn them into intervals to be able to plot survival curves, or proceed directly to Cox regression, which can work with continuous data and will yield the ...

6

I think the analysis which you have done was good. Regarding the Survival Analysis procedure, I think using it in your scenario is good enough. Even it might take time but the results from that are good and very insightful. Since you have applied survival analysis on the data, you need to make sure that these assumptions are met: There are several ...

5

Another approach would be to model "churn" (aka "diminished use of the service, including non-use") as a process and not an event. Years ago in retention marketing this was called a "defection funnel", to mirror the "sales funnel" on the customer acquisition side (suspect -> prospect -> trial customer -> repeat customer -> loyal customer). So a defection ...

5

If I understand your problem correctly, I think it's possible¹, but you have to do some extra work and you may be limited with what models you can use. First, you have a time-varying dataset, so that must be handled correctly. Your poison comes long after birth, and that's important to model. Otherwise you are biasing your model. Ex: Suppose everyone is ...

4

If the data you show are the only data that you have, then the Markov Chain is really boring: it is a linear chain, going from Round A to Round B to Round C, and all those states are connected to a base state (which is Death, or something). You can directly calculate the transition probabilities from the data you have, since the number of companies that ...

3

There are several different approaches here. One (which you've already described) could be to impute missing values with their mean. You could then add an extra column which keeps track of whether that value was originally missing or not. So, in the example you provide, we would end up with id age sex dropout s1_q1 s1_q2 s1_q3 s1_q4 s1_q5.... s5_q10 ...

3

Some algorithms, such as SVM or Logistical regression, have possibility to add a weight to certain class, therefore fix the unbalanced issue. This really sounds like a job for Survival analysis, which is especially designed to answer questions like "When machine X fail" or "Which attribute influence the most the failure". You can simply start by plotting ...

3

First I want to say Dirk is basically correct that survival analysis doesn't have to model death it's used essentially the same way for looking at user groups in cohort analysis. However, it is unreliable for specific individual behavior activities, for say fraud management. Revenue analysis and trend forecasting are great uses of survival models. That ...

2

You should first define what your churn event is which you have started. Is it global or individual? Is it has not gambled for 3 months or has changed his pattern? Global is better to model. You can use survival models for this.

2

The problem you'll run into if you are not careful is the "immortal time bias". In short, the problem is that a subject isn't "in" the "1-2 years" group until they atleast 1 year under observation. This 1 year period is called immortal because patients can't die then. More concretely, if I naively partition my population into "First 0-6 months" vs "1-2 ...

2

To clarify the questions raised by the user in response to the correct solution given by Erwan - the solution proposes going back in time to prepare the data across a series of timestamps. There will be multiple points in time 't' where the input would be all the various features on the patients health, medication, reports etc..you need to see how best they ...

2

This could be seen as a "simple" binary classification problem. I mean the type of problem is "simple", the task itself certainly isn't... And I'm not even going to mention the serious ethical issues about its potential applications! First, obviously you need to have an entry in your data for a patient's death. It's not totally clear to ...

1

It's a matter of defining exactly which problem you want to solve, and there might be many variants: If the goal is really to estimate "time completion", then imho you should use only completed tasks, since the other tasks haven't been "completed". Note that in this case you're counting time actually spent on the task. If the goal is to ...

1

You can. You should be able to create a survival function for each type of item to give a breakdown of the probability of it being sold by that point in it's lifecycle. An issue you might run into is that the interpretation of the survival function is not the same as your outputted probability in the classification problem. In the classification problem you ...

1

You can't put v_length in the regression - that'd be a form of data leakage. However, you are right to be thinking about "how to tell the model that I've already observed some length". This can be accomplished with some survival analysis math. For censored observations, what you want is $S(l \;|\; l > \text{observed v_length})= P(L > l \;|\; L > \... 1 If you want to use survival analysis (which can be more flexible and insightful), I'd recommend this package and this great tutorial. Speaking shortly, as a result, you'll get "probability of being alive" for each customer. If you want to use logistic regression I think it's trickier. Why I think so - Like any other churn problem, it's hard to define it ... 1 👋 hi there, lifelines author here. Let me try to help. 1) Do you see any Python warnings when the fit starts running? 2) I noticed that you have 115 observations, but over 190 variables. It's very likely that system is overdetermined: there isn't a unique solution, and your model will completely overfit to the data (more evidence of this: the concordance ... 1 It seems a problem that can be solved with a correct approach for survival analysis with time-dependent covariates. https://cran.r-project.org/web/packages/survival/vignettes/timedep.pdf This vignette is useful also for those not interested in R code. Have you tried a random forest survival analysis approach? 1 From the information at hand, you could break this down into two problems - Predicting the production for the shift, and Finding the probability of breakdown during the shift For (1) you could either go down the time-series route (ARIMA, Box-Jenkins, Exponential smoothening) or the regression route (provided you have good features) For (2) you could ... 1 Most likely, SGD is not a limiting factor for you. But, have you considered taking a classification rather than regression approach? (It looks like you're predicting real values as opposed to classes). Since you state that the prediction doesn't have to be perfect, why not try grouping your outcome variable into bins, then predict the bins? You'll have a ... 1 From the description of the problem, you can just choose whatever classification algorithm you like to classify the need of intervention at$t_{0}$. The general rule for choosing a classifier for this is to start simple--e.g., by using nearest neighbor and iterate to more powerful classifiers until you get enough accuracy. If additional measurements at$...

1

Note that in the linked presentation, on the slide titled "Plotting the effects", the treat object has only 2 rows. In your case, because frame has 57k rows, fitObjGrouped has predictions for each row of newdata. You can verify this with fitObjGrouped$n. To fix the problem, try: frame <- data.frame(group = unique(dataset$group))

Only top voted, non community-wiki answers of a minimum length are eligible