import numpy as np from sklearn.cluster import KMeans import matplotlib.pyplot as plt # Sample data: customer_id, total_purchases, avg_time_between_purchases (hours) customer_data = np.array([ [1, 25, 0.5], [2, 10, 5], [3, 15, 2], [4, 30, 1], [5, 7, 10], [6, 20, 3], [7, 12, 7], [8, 28, 0.8], [9, 6, 12], [10, 18, 1.5] ]) # Extract customer IDs and feature data customer_ids = customer_data[:, 0].astype(int) features = customer_data[:, 1:] # Perform k-means clustering n_clusters = 2 kmeans = KMeans(n_clusters=n_clusters, random_state=42) cluster_labels = kmeans.fit_predict(features) # Find the cluster with the lowest average time between purchases impulsive_cluster = np.argmin(kmeans.cluster_centers_[:, 1]) # Get the customer IDs in the impulsive cluster impulsive_buyers = customer_ids[cluster_labels == impulsive_cluster] print("Impulsive buyers:", impulsive_buyers) # Visualize the clustering results (optional) plt.scatter(features[:, 0], features[:, 1], c=cluster_labels, cmap='viridis') plt.scatter(kmeans.cluster_centers_[:, 0], kmeans.cluster_centers_[:, 1], c='red', marker='x') plt.xlabel('Total Purchases') plt.ylabel('Average Time Between Purchases (hours)') plt.show()
top of page
Effortless style combined with everyday versatility. Thanks to the breathable lining and soft insole, these men’s lace-up canvas shoes will withstand even the wildest nights with friends. 

• 100% polyester canvas upper side
• Ethylene-vinyl acetate (EVA) rubber outsole
• Breathable lining
• Padded collar and tongue
• Removable insole
• White laces
• Blank product sourced from China

Important: This product is available in the following countries: United States, Canada, Australia, United Kingdom, New Zealand, Japan, Austria, Andorra, Belgium, Bulgaria, Croatia, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Holy See (Vatican city), Hungary, Iceland, Ireland, Italy, Latvia, Lithuania, Liechtenstein, Luxemburg, Malta, Monaco, Netherlands, Norway, Poland, Portugal, San Marino, Slovakia, Slovenia, Switzerland, Spain, Sweden, and Turkey. If your shipping address is outside these countries, please choose a different product.

This product is made especially for you as soon as you place an order, which is why it takes us a bit longer to deliver it to you. Making products on demand instead of in bulk helps reduce overproduction, so thank you for making thoughtful purchasing decisions!

Men’s lace-up canvas shoes

$49.50가격
제외: 부가세
수량
    Product Page: Stores_Product_Widget
    bottom of page