Malaysia
2025-04-29 02:47
IndustryChoose Number of Regimes
#CurrencyPairPrediction
Choose Number of Regimes (k)
Finding best k:
• Elbow Method: Plot SSE (Sum of Squared Errors) vs. k
• Silhouette Score: Measures cluster separation quality
• Domain knowledge: (e.g., we expect 3 regimes: Bull, Bear, Sideways) from sklearn.cluster import KMeans import matplotlib.pyplot as plt sse = [] for k in range(2, 10):
kmeans = KMeans(n_clusters=k, random_state=42)
kmeans.fit(data_scaled) sse.append(kmeans.inertia_) plt.plot(range(2,10), sse) plt.xlabel(‘k’) plt.ylabel(‘SSE’) plt.title(‘Elbow Method’) plt.show()
Like 0
bysas
Trader
Hot content
Industry
Event-A comment a day,Keep rewards worthy up to$27
Industry
Nigeria Event Giveaway-Win₦5000 Mobilephone Credit
Industry
Nigeria Event Giveaway-Win ₦2500 MobilePhoneCredit
Industry
South Africa Event-Come&Win 240ZAR Phone Credit
Industry
Nigeria Event-Discuss Forex&Win2500NGN PhoneCredit
Industry
[Nigeria Event]Discuss&win 2500 Naira Phone Credit
Forum category

Platform

Exhibition

Agent

Recruitment

EA

Industry

Market

Index
Choose Number of Regimes
#CurrencyPairPrediction
Choose Number of Regimes (k)
Finding best k:
• Elbow Method: Plot SSE (Sum of Squared Errors) vs. k
• Silhouette Score: Measures cluster separation quality
• Domain knowledge: (e.g., we expect 3 regimes: Bull, Bear, Sideways) from sklearn.cluster import KMeans import matplotlib.pyplot as plt sse = [] for k in range(2, 10):
kmeans = KMeans(n_clusters=k, random_state=42)
kmeans.fit(data_scaled) sse.append(kmeans.inertia_) plt.plot(range(2,10), sse) plt.xlabel(‘k’) plt.ylabel(‘SSE’) plt.title(‘Elbow Method’) plt.show()
Like 0
I want to comment, too
Submit
0Comments
There is no comment yet. Make the first one.
Submit
There is no comment yet. Make the first one.