I need you to go over my capstone report wherever you see python code) for some, there’s no outputs. so if you can run the code and create output visualizations, and send me screenshots of those visuals you got.
scaler = StandardScaler()
scaled_data = scaler.fit_transform(numeric_data)
plt.figure(figsize=(10, 7))
plt.title(“Dendrogram”)
dend = shc.dendrogram(shc.linkage(scaled_data, method=’ward’))
num_clusters = 5
hierarchical_clustering = AgglomerativeClustering(n_clusters=num_clusters, affinity=’euclidean’, linkage=’ward’)
train_data[‘Cluster’] = hierarchical_clustering.fit_predict(scaled_data)
plt.figure(figsize=(10, 7))
plt.scatter(train_data[‘Flight Distance’], train_data[‘Departure Delay in Minutes’], c=train_data[‘Cluster’], cmap=’viridis’)
plt.xlabel(‘Flight Distance’)
plt.ylabel(‘Departure Delay in Minutes’)
plt.title(‘Hierarchical Clustering’)
plt.show()