Skip to content

Unsupervised clustering for the UCI-WINE dataset using Kohonen Network

Notifications You must be signed in to change notification settings

p208p2002/kohonen-network-with-wine-dataset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kohonen Network with Wine Dataset

Dataset

Kohonen Network

Kohnen Network使用@alexarnimueller所撰寫的Source Code

Source Code Ref: Kohonen, T. Self-Organized Formation of Topologically Correct Feature Maps. Biol. Cybern. 1982, 43 (1), 59–69.

Feature Normalization

進行資料特徵歸一化,為了更佳的分群效果

def feature_normalization(X):
    count_featrue = X.shape[-1]
    f_maxs = []
    f_mins = []

    for i in range(count_featrue):
        f_max = np.max(X[:,[i]])
        f_min = np.min(X[:,[i]])
        f_maxs.append(f_max)
        f_mins.append(f_min)

    for i in range(len(X)):
        x_normalizatoion = np.array([0.0]*13)
        for j in range(len(X[i])):
            f_max = f_maxs[j]
            f_min = f_mins[j]
            x_normalizatoion[j] = (X[i][j] - f_min)/(f_max - f_min)
        X[i] = x_normalizatoion
    return X

Kohonen Network Training

  • network size : 8*8
  • epoch : 10000
  • learning rate : lr = 1 / (1 + (epoch / 0.5) **4)

Results

網路權重熱力圖

各別類別權重熱力圖

分群結果視覺化

About

Unsupervised clustering for the UCI-WINE dataset using Kohonen Network

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages