cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

error tu run btyd model

chagoo
New Contributor
I run the model in april and ok but today I need run the model and I have error and it is not possible continue 
I change the penalizer_coef and nothing 
# fit a model with a larger penalizer coefficient
bgf_engagement = BetaGeoFitter(penalizer_coef=100000.0)  # Increase the penalizer coefficient
bgf_engagement.fit(
    bg_training_data['frequency_cal'],
    bg_training_data['recency_cal'],
    bg_training_data['T_cal']
)
message: Desired error not necessarily achieved due to precision loss. success: False status: 2 fun: -22.17548856616192 x: [-6.111e+00 -1.005e+01 -1.339e+01 -8.842e+00] nit: 84 jac: [ 2.953e-04 -1.193e-03 4.319e-04 5.391e-04] hess_inv: [[ 5.006e-01 -1.666e-01 -5.504e-01 -2.107e-01] [-1.666e-01 1.067e+02 1.749e+02 9.615e+01] [-5.504e-01 1.749e+02 3.339e+02 1.197e+02] [-2.107e-01 9.615e+01 1.197e+02 1.170e+02]] nfev: 135 njev: 123
ConvergenceError: The model did not converge. Try adding a larger penalizer to see if that helps convergence.
File <command-2995118494231631>, line 3 1 # fit a model with a larger penalizer coefficient 2 bgf_engagement = BetaGeoFitter(penalizer_coef=100000.0) # Increase the penalizer coefficient ----> 3 bgf_engagement.fit( 4 bg_training_data['frequency_cal'], 5 bg_training_data['recency_cal'], 6 bg_training_data['T_cal'] 7 )
1 REPLY 1

Retired_mod
Esteemed Contributor III

Hi @chagoo,To fix this, try lowering the penalizer coefficient, checking the data quality for anomalies, scaling the data, increasing the number of iterations, or experimenting with different initial parameters. These steps should help resolve the convergence issue. Let me know if you need further assistance or if thereโ€™s anything else I can help with!