remove empty lines + fix 3d cluster visualisation
continuous-integration/drone/push Build is passing Details

pull/22/head
remrem 10 months ago
parent 1a862c1ed6
commit 9ef632dcc8

@ -24,7 +24,7 @@ def visualize_clusters_3d(X, labels, centers=None, title="Clusters"):
ax.set_xlabel("Feature 1")
ax.set_ylabel("Feature 2")
ax.set_zlabel("Feature 3")
plt.show()
return plt.gcf()
def calculate_cluster_statistics_kmeans(X, labels, centers):
unique_labels = np.unique(labels)

@ -18,7 +18,6 @@ def drop_high_null_percentage(data, threshold=0.5):
data = data.loc[:, missing_percentage <= threshold]
return data
def replace_with_mean(data):
return data.apply(lambda col: col.fillna(col.mean()) if col.dtype.kind in 'biufc' else col)
@ -52,7 +51,6 @@ def impute_with_regression(data):
return data
"""
Parameters:
- data: Pandas DataFrame with the data

Loading…
Cancel
Save