Skip to content

Commit

Permalink
add some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bob7783 committed Jun 22, 2020
1 parent 069b5d4 commit 4e5e20e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions unsupervised_class/neural_kmeans.py
Expand Up @@ -4,21 +4,24 @@
from sklearn.preprocessing import StandardScaler


# get the data and standardize it
X = get_simple_data()
scaler = StandardScaler()
X = scaler.fit_transform(X)

# get shapes
N, D = X.shape
K = 3

# initialize parameters
W = np.random.randn(D, K)


# set hyperparameters
n_epochs = 100
learning_rate = 0.001
losses = []


# training loop
for i in range(n_epochs):
loss = 0
for j in range(N):
Expand Down

0 comments on commit 4e5e20e

Please sign in to comment.