Skip to content

Commit

Permalink
printouts update
Browse files Browse the repository at this point in the history
  • Loading branch information
mohaseeb committed Dec 23, 2018
1 parent 8969dd1 commit 0c4523f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ def main():
print('\nLoading data...')
x_train, y_train, x_test, y_test = _load_train_test_datasets()

# create a classifier. (200 epochs yielded a 0.99 accuracy)
# create a classifier
Q = x_train.shape[1]
K = int(0.15 * Q)
L_min = int(0.2 * Q)
clf = LtsShapeletClassifier(
K=K,
R=3,
L_min=L_min,
epocs=200,
epocs=30, # (200 epochs yielded a 0.99 accuracy)
lamda=0.01,
eta=0.01,
shapelet_initialization='segments_centroids',
Expand Down
6 changes: 4 additions & 2 deletions shapelets_lts/classification/shapelet_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ def _train_network(self):

valid_accur[0, epoc] = valid_epoc_accur
# print current loss info
print("epoc=" + str(epoc) + "/" + str(self.epocs - 1) + " (iteration=" + str(iteration) + ") loss=" + str(l)
+ " validation accuracy=" + str(valid_epoc_accur))
print(
'epoch={}/{} (iteration={}) loss={} validation accuracy={}'
''.format(epoc + 1, self.epocs, iteration, l, valid_epoc_accur)
)
# plot if needed
if self.plot_loss:
self._plot_loss(loss, valid_accur, epoc)
Expand Down

0 comments on commit 0c4523f

Please sign in to comment.