Jayabalambika
commited on
Commit
·
5076126
1
Parent(s):
0c93937
Update app.py
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ def compare_lasso_sparse():
|
|
65 |
# compare the regression coefficients
|
66 |
coeff_diff = linalg.norm(sparse_lasso.coef_ - dense_lasso.coef_)
|
67 |
print(f"Distance between coefficients : {coeff_diff:.2e}")
|
68 |
-
return f"Matrix density : {(Xs_sp.nnz / float(X.size) * 100):.3f}%\t\n"+ f"Sparse Lasso done in {(
|
69 |
|
70 |
|
71 |
X,X_sp,y = load_dataset()
|
|
|
65 |
# compare the regression coefficients
|
66 |
coeff_diff = linalg.norm(sparse_lasso.coef_ - dense_lasso.coef_)
|
67 |
print(f"Distance between coefficients : {coeff_diff:.2e}")
|
68 |
+
return f"Matrix density : {(Xs_sp.nnz / float(X.size) * 100):.3f}%\t\n"+ f"Sparse Lasso done in {(elapses1):.3f}s\t\n" + f"Dense Lasso done in {(elapses2):.3f}s\t\n" + f"Distance between coefficients : {coeff_diff:.2e}\t\n"
|
69 |
|
70 |
|
71 |
X,X_sp,y = load_dataset()
|