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