[Python] Accessing Lasso Regression coefficients after fitting

Discussão em 'Python' iniciado por Stack, Maio 11, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to Lasso Regression after having optimal value of Lambda and now the problem is , I want to get the coefficients (weight vector) since I want to compare them with weights of Ridge regression.

    lasso = Lasso(alpha=optimal_lmbda, fit_intercept=True, random_state=1142, max_iter=5000)
    lasso.fit(X_train, y_train)
    y_pred_lasso = lasso.predict(X_test)


    How to get coefficients(weight vectors) after fitting in Lasso Regression in python in Sklearn?

    Continue reading...

Compartilhe esta Página