lifelines icon indicating copy to clipboard operation
lifelines copied to clipboard

Using CRCSplineFitter without sklearn_adapter:ValueError: initial_point is not the correct shape

Open SurajitTest opened this issue 5 years ago • 1 comments

I am on version 0.24.15 and with regards to using CRCSplineFitter without sklearn_adapter,I am facing the given below error scenario : 'ValueError: initial_point is not the correct shape'

Code: #Import libraries(from lifeline) from lifelines import LogLogisticAFTFitter, WeibullAFTFitter, LogNormalAFTFitter,CRCSplineFitter from lifelines.datasets import load_rossi from lifelines.utils.sklearn_adapter import sklearn_adapter

#Obtain the Train and Test Sets rossi = load_rossi().sample(frac=1.0,random_state=20) train_rossi = rossi.iloc[:400] #400 rows in the train dataset test_rossi = rossi.iloc[400:] #32 rows in the test dataset

#Build model crc = CRCSplineFitter(n_baseline_knots=3).fit(train_rossi,duration_col='week',event_col='arrest')

SurajitTest avatar Jul 11 '20 05:07 SurajitTest

have you found any workaround? I'm struggling with the same issue

Unessam avatar Apr 03 '22 00:04 Unessam