Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -62,8 +62,17 @@ if uploaded_file is not None:
|
|
| 62 |
if len(set(cluster_labels)) > 1:
|
| 63 |
st.write("Cluster Labels:", np.unique(cluster_labels))
|
| 64 |
|
|
|
|
| 65 |
fig = px.scatter(x=data_scaled[:, 0], y=data_scaled[:, 1], color=cluster_labels, title="Clustering Results",
|
| 66 |
labels={'x': numerical_cols[0], 'y': numerical_cols[1]})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
st.plotly_chart(fig)
|
| 68 |
|
| 69 |
# Step 5: ARIMA Time Series Analysis
|
|
|
|
| 62 |
if len(set(cluster_labels)) > 1:
|
| 63 |
st.write("Cluster Labels:", np.unique(cluster_labels))
|
| 64 |
|
| 65 |
+
# Create Plotly scatter plot
|
| 66 |
fig = px.scatter(x=data_scaled[:, 0], y=data_scaled[:, 1], color=cluster_labels, title="Clustering Results",
|
| 67 |
labels={'x': numerical_cols[0], 'y': numerical_cols[1]})
|
| 68 |
+
|
| 69 |
+
# Update y-axis range to be from -1 to 1 with 0.2 intervals
|
| 70 |
+
fig.update_layout(
|
| 71 |
+
yaxis=dict(range=[-1, 1], dtick=0.2),
|
| 72 |
+
xaxis_title=numerical_cols[0],
|
| 73 |
+
yaxis_title=numerical_cols[1]
|
| 74 |
+
)
|
| 75 |
+
|
| 76 |
st.plotly_chart(fig)
|
| 77 |
|
| 78 |
# Step 5: ARIMA Time Series Analysis
|