我想在python 3中重新創建這個密度圖:math.stackexchange.com/questions/845424/the-expected-outcome-of-a -random-遊戲的棋 End Goal: I need my density plot to look like this 藍色曲線下面積等於紅色,綠色,紫色曲線相結合的,因爲不同的結果(繪圖,黑勝,和白色勝利)是總數(
我想實現一個KNN 1D估計: # nearest neighbors estimate
def nearest_n(x, k, data):
# Order dataset
#data = np.sort(data, kind='mergesort')
nnb = []
# iterate over all data and get k nearest