Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -58,12 +58,15 @@ formatted_coefficients = [f'{coeff:.2e}' for coeff in coefficients if coeff != 0
|
|
58 |
|
59 |
terms = [f'{coeff}X^{i}' for i, coeff in enumerate(coefficients) if coeff != 0]
|
60 |
|
|
|
|
|
61 |
latex_equation = r'''
|
62 |
Our Equation: {} + {}
|
63 |
-
'''.format(
|
64 |
|
65 |
st.write("### Polynomial Equation")
|
66 |
-
st.latex(latex_equation
|
|
|
67 |
|
68 |
|
69 |
|
|
|
58 |
|
59 |
terms = [f'{coeff}X^{i}' for i, coeff in enumerate(coefficients) if coeff != 0]
|
60 |
|
61 |
+
formatted_intercept = f'{regressor.intercept_:.2e}'
|
62 |
+
|
63 |
latex_equation = r'''
|
64 |
Our Equation: {} + {}
|
65 |
+
'''.format(formatted_intercept, ' + '.join(formatted_coefficients))
|
66 |
|
67 |
st.write("### Polynomial Equation")
|
68 |
+
st.latex(latex_equation)
|
69 |
+
|
70 |
|
71 |
|
72 |
|