In [30]:
from parameter_search import util
import numpy as np
import time
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame
import csv
import gensim
from gensim.models.doc2vec import TaggedDocument
from gensim.models import Doc2Vec
from gensim.models import Phrases
assert gensim.models.doc2vec.FAST_VERSION == 1, "this will be painfully slow otherwise"
import nltk, re, random
import datetime
import multiprocessing
from ast import literal_eval
import pickle
from tqdm import tqdm
from sklearn.cross_validation import train_test_split
from sklearn.cross_validation import KFold
from sklearn import linear_model
import datetime
from scipy.cluster.hierarchy import dendrogram, linkage
#%matplotlib inline
In [2]:
data_path = "E:/dataset/Amazon/"
save_path = "E:/dataset/MasterThesis/FINAL/preprocess_data/"
model_path = "E:/dataset/MasterThesis/FINAL/doc2vec/"
category_list = ["Electronics","Beauty","Clothing_Shoes_and_Jewelry"]
In [32]:
%%time
documents = util.load_data(save_path, category_list, tagby=True)
Electronics category is finished
Beauty category is finished
Clothing_Shoes_and_Jewelry category is finished
Wall time: 4min 27s
In [33]:
len(documents)
Out[33]:
300000
In [ ]:
In [34]:
#parameters
y = np.array([1] * 100000 + [0] * 100000 + [-1] * 100000)
tags = [doc.tags[0] for doc in documents]
tag_dict = {}
for index, tag in enumerate(tags):
tag_dict[tag] = y[index]
window = [2,4,6,8,10]
size = [50,100,200,300,400,500]
alpha, min_alpha, passes = (0.02, 0.001, 10)
alpha_delta = (alpha-min_alpha)/passes
df_param = pd.DataFrame(columns=[['epoch', 'training_time', 'modeling_time', 'dimension', 'window', 'avg_accuracy']])
print("start : ", datetime.datetime.now())
for s in size:
for w in window:
#PV_DM w/average
model = Doc2Vec(dm=1, dm_mean=1, size=s, min_count=50, window=w, workers=12,
alpha=alpha, min_alpha=min_alpha)
model.build_vocab(documents)
for epoch in range(passes):
print("num of epoch %s "%(epoch+1))
start = time.time()
random.shuffle(documents)
model.train(documents)
model.alpha -= alpha_delta # decrease the learning rate
model.min_alpha = model.alpha # fix the learning rate, no decay
end = time.time()
start2 = time.time()
X = np.array([model.docvecs[tag] for tag in tags])
y = [tag_dict[tag] for tag in tags]
y = np.array(y)
accuracy = []
kf = KFold(X.shape[0], n_folds=10, shuffle=True, random_state=10)
for k, (train_index, test_index) in enumerate(kf):
X_train, X_test = X[train_index], X[test_index]
y_train, y_test = y[train_index], y[test_index]
sgdreg = linear_model.SGDClassifier(loss='log', penalty='l2', n_jobs=-1, alpha=0.0001, n_iter=5, random_state =111)
sgdreg.fit(X_train, y_train)
accuracy.append(np.mean(sgdreg.predict(X_test) == y_test))
end2 = time.time()
print("epoch : %i, training time: %f, modeling time: %f, dimension size : %i, window size : %i, avg accuracy : %f" %(epoch+1, end-start, end2-start2, s, w, np.mean(accuracy)))
df_param.loc[len(df_param)] = [epoch+1, start-end, start2-end2, s, w, np.mean(accuracy)]
#model.save(model_path + "model_" + str(w) + '_' + str(s) + '_' + str(epoch+1))
print("end : ", datetime.datetime.now())
start : 2016-12-12 02:19:23.873986
num of epoch 1
epoch : 1, training time: 94.910786, modeling time: 7.684298, dimension size : 50, window size : 2, avg accuracy : 0.805577
num of epoch 2
epoch : 2, training time: 94.926707, modeling time: 7.632461, dimension size : 50, window size : 2, avg accuracy : 0.846273
num of epoch 3
epoch : 3, training time: 95.410011, modeling time: 7.764786, dimension size : 50, window size : 2, avg accuracy : 0.859070
num of epoch 4
epoch : 4, training time: 95.008087, modeling time: 7.397732, dimension size : 50, window size : 2, avg accuracy : 0.864263
num of epoch 5
epoch : 5, training time: 95.168256, modeling time: 7.753154, dimension size : 50, window size : 2, avg accuracy : 0.866477
num of epoch 6
epoch : 6, training time: 95.471654, modeling time: 7.480951, dimension size : 50, window size : 2, avg accuracy : 0.867317
num of epoch 7
epoch : 7, training time: 95.164119, modeling time: 7.908519, dimension size : 50, window size : 2, avg accuracy : 0.867590
num of epoch 8
epoch : 8, training time: 94.485579, modeling time: 7.689636, dimension size : 50, window size : 2, avg accuracy : 0.867793
num of epoch 9
epoch : 9, training time: 95.619172, modeling time: 7.760576, dimension size : 50, window size : 2, avg accuracy : 0.867597
num of epoch 10
epoch : 10, training time: 95.648172, modeling time: 7.480480, dimension size : 50, window size : 2, avg accuracy : 0.867470
num of epoch 1
epoch : 1, training time: 95.985193, modeling time: 7.708891, dimension size : 50, window size : 4, avg accuracy : 0.808720
num of epoch 2
epoch : 2, training time: 95.021187, modeling time: 7.827334, dimension size : 50, window size : 4, avg accuracy : 0.840533
num of epoch 3
epoch : 3, training time: 96.060538, modeling time: 7.751967, dimension size : 50, window size : 4, avg accuracy : 0.854417
num of epoch 4
epoch : 4, training time: 95.407035, modeling time: 7.892474, dimension size : 50, window size : 4, avg accuracy : 0.860697
num of epoch 5
epoch : 5, training time: 95.927204, modeling time: 7.829961, dimension size : 50, window size : 4, avg accuracy : 0.864157
num of epoch 6
epoch : 6, training time: 101.415483, modeling time: 7.666568, dimension size : 50, window size : 4, avg accuracy : 0.865753
num of epoch 7
epoch : 7, training time: 94.882056, modeling time: 7.766237, dimension size : 50, window size : 4, avg accuracy : 0.866363
num of epoch 8
epoch : 8, training time: 95.370203, modeling time: 7.987982, dimension size : 50, window size : 4, avg accuracy : 0.867180
num of epoch 9
epoch : 9, training time: 95.233908, modeling time: 7.689811, dimension size : 50, window size : 4, avg accuracy : 0.867413
num of epoch 10
epoch : 10, training time: 94.387086, modeling time: 7.706984, dimension size : 50, window size : 4, avg accuracy : 0.867430
num of epoch 1
epoch : 1, training time: 96.511691, modeling time: 7.680370, dimension size : 50, window size : 6, avg accuracy : 0.804593
num of epoch 2
epoch : 2, training time: 96.043197, modeling time: 7.790175, dimension size : 50, window size : 6, avg accuracy : 0.829993
num of epoch 3
epoch : 3, training time: 102.703386, modeling time: 7.772690, dimension size : 50, window size : 6, avg accuracy : 0.842697
num of epoch 4
epoch : 4, training time: 101.529539, modeling time: 7.792926, dimension size : 50, window size : 6, avg accuracy : 0.849240
num of epoch 5
epoch : 5, training time: 99.584792, modeling time: 8.167925, dimension size : 50, window size : 6, avg accuracy : 0.853343
num of epoch 6
epoch : 6, training time: 99.338187, modeling time: 8.399225, dimension size : 50, window size : 6, avg accuracy : 0.855860
num of epoch 7
epoch : 7, training time: 98.125195, modeling time: 7.654441, dimension size : 50, window size : 6, avg accuracy : 0.857293
num of epoch 8
epoch : 8, training time: 99.075206, modeling time: 7.835770, dimension size : 50, window size : 6, avg accuracy : 0.858293
num of epoch 9
epoch : 9, training time: 97.842523, modeling time: 7.637531, dimension size : 50, window size : 6, avg accuracy : 0.858657
num of epoch 10
epoch : 10, training time: 97.481833, modeling time: 7.721786, dimension size : 50, window size : 6, avg accuracy : 0.858727
num of epoch 1
epoch : 1, training time: 96.507440, modeling time: 7.857562, dimension size : 50, window size : 8, avg accuracy : 0.795573
num of epoch 2
epoch : 2, training time: 96.712679, modeling time: 7.779955, dimension size : 50, window size : 8, avg accuracy : 0.816020
num of epoch 3
epoch : 3, training time: 95.827857, modeling time: 7.901669, dimension size : 50, window size : 8, avg accuracy : 0.828317
num of epoch 4
epoch : 4, training time: 99.162270, modeling time: 7.809842, dimension size : 50, window size : 8, avg accuracy : 0.835187
num of epoch 5
epoch : 5, training time: 98.087966, modeling time: 7.810312, dimension size : 50, window size : 8, avg accuracy : 0.839383
num of epoch 6
epoch : 6, training time: 98.305388, modeling time: 7.898095, dimension size : 50, window size : 8, avg accuracy : 0.841583
num of epoch 7
epoch : 7, training time: 98.005543, modeling time: 7.796983, dimension size : 50, window size : 8, avg accuracy : 0.843080
num of epoch 8
epoch : 8, training time: 98.287882, modeling time: 7.794000, dimension size : 50, window size : 8, avg accuracy : 0.844120
num of epoch 9
epoch : 9, training time: 97.816772, modeling time: 7.767962, dimension size : 50, window size : 8, avg accuracy : 0.844610
num of epoch 10
epoch : 10, training time: 98.591846, modeling time: 7.971370, dimension size : 50, window size : 8, avg accuracy : 0.844830
num of epoch 1
epoch : 1, training time: 99.774295, modeling time: 7.768061, dimension size : 50, window size : 10, avg accuracy : 0.788323
num of epoch 2
epoch : 2, training time: 97.926256, modeling time: 7.790662, dimension size : 50, window size : 10, avg accuracy : 0.806730
num of epoch 3
epoch : 3, training time: 96.648530, modeling time: 7.849429, dimension size : 50, window size : 10, avg accuracy : 0.817787
num of epoch 4
epoch : 4, training time: 97.835552, modeling time: 7.761726, dimension size : 50, window size : 10, avg accuracy : 0.824240
num of epoch 5
epoch : 5, training time: 97.941299, modeling time: 7.771809, dimension size : 50, window size : 10, avg accuracy : 0.828310
num of epoch 6
epoch : 6, training time: 96.320775, modeling time: 7.814663, dimension size : 50, window size : 10, avg accuracy : 0.830920
num of epoch 7
epoch : 7, training time: 97.064499, modeling time: 7.749414, dimension size : 50, window size : 10, avg accuracy : 0.832387
num of epoch 8
epoch : 8, training time: 97.119556, modeling time: 7.842331, dimension size : 50, window size : 10, avg accuracy : 0.833290
num of epoch 9
epoch : 9, training time: 97.389316, modeling time: 7.668760, dimension size : 50, window size : 10, avg accuracy : 0.833907
num of epoch 10
epoch : 10, training time: 97.477592, modeling time: 7.786455, dimension size : 50, window size : 10, avg accuracy : 0.834117
num of epoch 1
epoch : 1, training time: 97.772316, modeling time: 11.367375, dimension size : 100, window size : 2, avg accuracy : 0.827743
num of epoch 2
epoch : 2, training time: 97.242387, modeling time: 10.991893, dimension size : 100, window size : 2, avg accuracy : 0.853937
num of epoch 3
epoch : 3, training time: 97.637961, modeling time: 11.230720, dimension size : 100, window size : 2, avg accuracy : 0.862703
num of epoch 4
epoch : 4, training time: 96.849477, modeling time: 11.300398, dimension size : 100, window size : 2, avg accuracy : 0.865160
num of epoch 5
epoch : 5, training time: 96.108051, modeling time: 11.131224, dimension size : 100, window size : 2, avg accuracy : 0.865563
num of epoch 6
epoch : 6, training time: 96.525809, modeling time: 11.337811, dimension size : 100, window size : 2, avg accuracy : 0.864670
num of epoch 7
epoch : 7, training time: 97.642301, modeling time: 11.337871, dimension size : 100, window size : 2, avg accuracy : 0.864150
num of epoch 8
epoch : 8, training time: 98.295291, modeling time: 11.255976, dimension size : 100, window size : 2, avg accuracy : 0.863483
num of epoch 9
epoch : 9, training time: 96.514372, modeling time: 11.369366, dimension size : 100, window size : 2, avg accuracy : 0.862893
num of epoch 10
epoch : 10, training time: 97.417124, modeling time: 11.032053, dimension size : 100, window size : 2, avg accuracy : 0.862357
num of epoch 1
epoch : 1, training time: 98.353335, modeling time: 11.522533, dimension size : 100, window size : 4, avg accuracy : 0.824893
num of epoch 2
epoch : 2, training time: 97.102675, modeling time: 11.459244, dimension size : 100, window size : 4, avg accuracy : 0.846427
num of epoch 3
epoch : 3, training time: 97.598952, modeling time: 11.301922, dimension size : 100, window size : 4, avg accuracy : 0.856550
num of epoch 4
epoch : 4, training time: 97.208431, modeling time: 11.090281, dimension size : 100, window size : 4, avg accuracy : 0.860883
num of epoch 5
epoch : 5, training time: 104.130908, modeling time: 11.467291, dimension size : 100, window size : 4, avg accuracy : 0.862403
num of epoch 6
epoch : 6, training time: 108.637652, modeling time: 11.353493, dimension size : 100, window size : 4, avg accuracy : 0.863413
num of epoch 7
epoch : 7, training time: 105.663459, modeling time: 11.386100, dimension size : 100, window size : 4, avg accuracy : 0.863420
num of epoch 8
epoch : 8, training time: 105.009875, modeling time: 11.133373, dimension size : 100, window size : 4, avg accuracy : 0.863040
num of epoch 9
epoch : 9, training time: 105.473003, modeling time: 11.507952, dimension size : 100, window size : 4, avg accuracy : 0.862883
num of epoch 10
epoch : 10, training time: 105.659156, modeling time: 11.248288, dimension size : 100, window size : 4, avg accuracy : 0.862620
num of epoch 1
epoch : 1, training time: 107.444453, modeling time: 11.588594, dimension size : 100, window size : 6, avg accuracy : 0.814113
num of epoch 2
epoch : 2, training time: 107.484423, modeling time: 11.417046, dimension size : 100, window size : 6, avg accuracy : 0.833560
num of epoch 3
epoch : 3, training time: 108.140485, modeling time: 11.440959, dimension size : 100, window size : 6, avg accuracy : 0.843570
num of epoch 4
epoch : 4, training time: 106.278127, modeling time: 11.279302, dimension size : 100, window size : 6, avg accuracy : 0.848600
num of epoch 5
epoch : 5, training time: 106.181874, modeling time: 11.461387, dimension size : 100, window size : 6, avg accuracy : 0.851437
num of epoch 6
epoch : 6, training time: 108.512925, modeling time: 11.997840, dimension size : 100, window size : 6, avg accuracy : 0.852703
num of epoch 7
epoch : 7, training time: 108.053198, modeling time: 11.360303, dimension size : 100, window size : 6, avg accuracy : 0.853153
num of epoch 8
epoch : 8, training time: 104.034764, modeling time: 11.229464, dimension size : 100, window size : 6, avg accuracy : 0.853460
num of epoch 9
epoch : 9, training time: 104.610960, modeling time: 10.910285, dimension size : 100, window size : 6, avg accuracy : 0.853377
num of epoch 10
epoch : 10, training time: 104.847548, modeling time: 11.247652, dimension size : 100, window size : 6, avg accuracy : 0.853477
num of epoch 1
epoch : 1, training time: 105.045554, modeling time: 11.107920, dimension size : 100, window size : 8, avg accuracy : 0.807180
num of epoch 2
epoch : 2, training time: 104.211194, modeling time: 11.399123, dimension size : 100, window size : 8, avg accuracy : 0.822997
num of epoch 3
epoch : 3, training time: 105.459237, modeling time: 11.078738, dimension size : 100, window size : 8, avg accuracy : 0.832733
num of epoch 4
epoch : 4, training time: 104.434665, modeling time: 11.452276, dimension size : 100, window size : 8, avg accuracy : 0.837663
num of epoch 5
epoch : 5, training time: 105.327762, modeling time: 11.612976, dimension size : 100, window size : 8, avg accuracy : 0.839730
num of epoch 6
epoch : 6, training time: 105.590011, modeling time: 11.470301, dimension size : 100, window size : 8, avg accuracy : 0.841007
num of epoch 7
epoch : 7, training time: 105.170676, modeling time: 11.298806, dimension size : 100, window size : 8, avg accuracy : 0.841413
num of epoch 8
epoch : 8, training time: 105.013155, modeling time: 11.306391, dimension size : 100, window size : 8, avg accuracy : 0.841717
num of epoch 9
epoch : 9, training time: 104.951044, modeling time: 11.322352, dimension size : 100, window size : 8, avg accuracy : 0.841660
num of epoch 10
epoch : 10, training time: 104.690306, modeling time: 11.473388, dimension size : 100, window size : 8, avg accuracy : 0.841723
num of epoch 1
epoch : 1, training time: 105.639504, modeling time: 11.330600, dimension size : 100, window size : 10, avg accuracy : 0.793840
num of epoch 2
epoch : 2, training time: 106.569234, modeling time: 11.413828, dimension size : 100, window size : 10, avg accuracy : 0.806610
num of epoch 3
epoch : 3, training time: 105.771199, modeling time: 11.539334, dimension size : 100, window size : 10, avg accuracy : 0.815650
num of epoch 4
epoch : 4, training time: 106.860032, modeling time: 11.652927, dimension size : 100, window size : 10, avg accuracy : 0.820330
num of epoch 5
epoch : 5, training time: 106.776093, modeling time: 11.471375, dimension size : 100, window size : 10, avg accuracy : 0.822817
num of epoch 6
epoch : 6, training time: 107.883348, modeling time: 11.344701, dimension size : 100, window size : 10, avg accuracy : 0.823573
num of epoch 7
epoch : 7, training time: 106.231408, modeling time: 11.130049, dimension size : 100, window size : 10, avg accuracy : 0.824097
num of epoch 8
epoch : 8, training time: 105.778570, modeling time: 11.350393, dimension size : 100, window size : 10, avg accuracy : 0.824377
num of epoch 9
epoch : 9, training time: 106.824792, modeling time: 11.278334, dimension size : 100, window size : 10, avg accuracy : 0.824317
num of epoch 10
epoch : 10, training time: 108.370288, modeling time: 11.358579, dimension size : 100, window size : 10, avg accuracy : 0.824497
num of epoch 1
epoch : 1, training time: 107.329733, modeling time: 17.237167, dimension size : 200, window size : 2, avg accuracy : 0.837277
num of epoch 2
epoch : 2, training time: 107.028125, modeling time: 17.585290, dimension size : 200, window size : 2, avg accuracy : 0.858283
num of epoch 3
epoch : 3, training time: 107.587175, modeling time: 17.818207, dimension size : 200, window size : 2, avg accuracy : 0.866237
num of epoch 4
epoch : 4, training time: 109.170259, modeling time: 17.477657, dimension size : 200, window size : 2, avg accuracy : 0.868243
num of epoch 5
epoch : 5, training time: 109.075440, modeling time: 17.333456, dimension size : 200, window size : 2, avg accuracy : 0.869230
num of epoch 6
epoch : 6, training time: 108.200291, modeling time: 17.951704, dimension size : 200, window size : 2, avg accuracy : 0.869480
num of epoch 7
epoch : 7, training time: 107.767636, modeling time: 17.556831, dimension size : 200, window size : 2, avg accuracy : 0.869440
num of epoch 8
epoch : 8, training time: 107.814095, modeling time: 17.802654, dimension size : 200, window size : 2, avg accuracy : 0.869657
num of epoch 9
epoch : 9, training time: 108.257390, modeling time: 17.917108, dimension size : 200, window size : 2, avg accuracy : 0.869553
num of epoch 10
epoch : 10, training time: 107.581749, modeling time: 17.600928, dimension size : 200, window size : 2, avg accuracy : 0.869667
num of epoch 1
epoch : 1, training time: 107.570666, modeling time: 17.502574, dimension size : 200, window size : 4, avg accuracy : 0.832107
num of epoch 2
epoch : 2, training time: 108.280152, modeling time: 17.437518, dimension size : 200, window size : 4, avg accuracy : 0.852063
num of epoch 3
epoch : 3, training time: 108.239809, modeling time: 17.662406, dimension size : 200, window size : 4, avg accuracy : 0.860030
num of epoch 4
epoch : 4, training time: 110.264311, modeling time: 17.096394, dimension size : 200, window size : 4, avg accuracy : 0.864057
num of epoch 5
epoch : 5, training time: 108.344003, modeling time: 16.929231, dimension size : 200, window size : 4, avg accuracy : 0.865640
num of epoch 6
epoch : 6, training time: 109.604213, modeling time: 16.937238, dimension size : 200, window size : 4, avg accuracy : 0.866010
num of epoch 7
epoch : 7, training time: 110.890055, modeling time: 17.538506, dimension size : 200, window size : 4, avg accuracy : 0.866527
num of epoch 8
epoch : 8, training time: 109.344753, modeling time: 17.416225, dimension size : 200, window size : 4, avg accuracy : 0.866680
num of epoch 9
epoch : 9, training time: 110.129771, modeling time: 17.538834, dimension size : 200, window size : 4, avg accuracy : 0.866550
num of epoch 10
epoch : 10, training time: 107.935608, modeling time: 16.817126, dimension size : 200, window size : 4, avg accuracy : 0.866800
num of epoch 1
epoch : 1, training time: 109.477087, modeling time: 17.253545, dimension size : 200, window size : 6, avg accuracy : 0.824073
num of epoch 2
epoch : 2, training time: 109.356971, modeling time: 17.283575, dimension size : 200, window size : 6, avg accuracy : 0.840050
num of epoch 3
epoch : 3, training time: 109.445042, modeling time: 17.063377, dimension size : 200, window size : 6, avg accuracy : 0.848910
num of epoch 4
epoch : 4, training time: 109.639230, modeling time: 17.183494, dimension size : 200, window size : 6, avg accuracy : 0.853077
num of epoch 5
epoch : 5, training time: 108.985616, modeling time: 17.147482, dimension size : 200, window size : 6, avg accuracy : 0.854420
num of epoch 6
epoch : 6, training time: 108.942580, modeling time: 16.790099, dimension size : 200, window size : 6, avg accuracy : 0.855207
num of epoch 7
epoch : 7, training time: 108.694339, modeling time: 16.917219, dimension size : 200, window size : 6, avg accuracy : 0.855990
num of epoch 8
epoch : 8, training time: 108.698341, modeling time: 17.018320, dimension size : 200, window size : 6, avg accuracy : 0.856213
num of epoch 9
epoch : 9, training time: 108.940573, modeling time: 16.964268, dimension size : 200, window size : 6, avg accuracy : 0.856563
num of epoch 10
epoch : 10, training time: 109.083709, modeling time: 17.176472, dimension size : 200, window size : 6, avg accuracy : 0.856623
num of epoch 1
epoch : 1, training time: 108.635271, modeling time: 16.831149, dimension size : 200, window size : 8, avg accuracy : 0.814420
num of epoch 2
epoch : 2, training time: 108.519172, modeling time: 16.985283, dimension size : 200, window size : 8, avg accuracy : 0.826620
num of epoch 3
epoch : 3, training time: 108.457107, modeling time: 16.850159, dimension size : 200, window size : 8, avg accuracy : 0.834890
num of epoch 4
epoch : 4, training time: 108.337001, modeling time: 16.758063, dimension size : 200, window size : 8, avg accuracy : 0.838760
num of epoch 5
epoch : 5, training time: 108.348007, modeling time: 16.953254, dimension size : 200, window size : 8, avg accuracy : 0.840683
num of epoch 6
epoch : 6, training time: 108.371012, modeling time: 16.709037, dimension size : 200, window size : 8, avg accuracy : 0.841617
num of epoch 7
epoch : 7, training time: 108.230896, modeling time: 16.910212, dimension size : 200, window size : 8, avg accuracy : 0.841930
num of epoch 8
epoch : 8, training time: 108.363018, modeling time: 16.771091, dimension size : 200, window size : 8, avg accuracy : 0.842530
num of epoch 9
epoch : 9, training time: 108.366026, modeling time: 17.229533, dimension size : 200, window size : 8, avg accuracy : 0.842727
num of epoch 10
epoch : 10, training time: 108.715341, modeling time: 17.121433, dimension size : 200, window size : 8, avg accuracy : 0.842973
num of epoch 1
epoch : 1, training time: 110.119672, modeling time: 16.967284, dimension size : 200, window size : 10, avg accuracy : 0.803063
num of epoch 2
epoch : 2, training time: 110.046620, modeling time: 17.002320, dimension size : 200, window size : 10, avg accuracy : 0.815357
num of epoch 3
epoch : 3, training time: 110.470027, modeling time: 16.983300, dimension size : 200, window size : 10, avg accuracy : 0.822557
num of epoch 4
epoch : 4, training time: 110.618168, modeling time: 17.109422, dimension size : 200, window size : 10, avg accuracy : 0.825760
num of epoch 5
epoch : 5, training time: 110.673221, modeling time: 16.876197, dimension size : 200, window size : 10, avg accuracy : 0.826927
num of epoch 6
epoch : 6, training time: 110.679228, modeling time: 17.022338, dimension size : 200, window size : 10, avg accuracy : 0.827650
num of epoch 7
epoch : 7, training time: 110.632195, modeling time: 16.839149, dimension size : 200, window size : 10, avg accuracy : 0.827737
num of epoch 8
epoch : 8, training time: 110.915467, modeling time: 16.873182, dimension size : 200, window size : 10, avg accuracy : 0.828113
num of epoch 9
epoch : 9, training time: 110.206775, modeling time: 17.129440, dimension size : 200, window size : 10, avg accuracy : 0.828293
num of epoch 10
epoch : 10, training time: 109.847429, modeling time: 16.991308, dimension size : 200, window size : 10, avg accuracy : 0.828657
num of epoch 1
epoch : 1, training time: 111.048583, modeling time: 21.936053, dimension size : 300, window size : 2, avg accuracy : 0.840590
num of epoch 2
epoch : 2, training time: 110.200768, modeling time: 22.083195, dimension size : 300, window size : 2, avg accuracy : 0.863467
num of epoch 3
epoch : 3, training time: 110.235802, modeling time: 22.130240, dimension size : 300, window size : 2, avg accuracy : 0.871597
num of epoch 4
epoch : 4, training time: 110.751311, modeling time: 21.987088, dimension size : 300, window size : 2, avg accuracy : 0.875290
num of epoch 5
epoch : 5, training time: 110.594160, modeling time: 21.873980, dimension size : 300, window size : 2, avg accuracy : 0.876917
num of epoch 6
epoch : 6, training time: 110.217798, modeling time: 21.852961, dimension size : 300, window size : 2, avg accuracy : 0.877743
num of epoch 7
epoch : 7, training time: 110.063652, modeling time: 22.016116, dimension size : 300, window size : 2, avg accuracy : 0.878497
num of epoch 8
epoch : 8, training time: 110.145732, modeling time: 21.943043, dimension size : 300, window size : 2, avg accuracy : 0.878863
num of epoch 9
epoch : 9, training time: 110.190758, modeling time: 22.255361, dimension size : 300, window size : 2, avg accuracy : 0.879070
num of epoch 10
epoch : 10, training time: 110.171755, modeling time: 21.971073, dimension size : 300, window size : 2, avg accuracy : 0.879330
num of epoch 1
epoch : 1, training time: 110.852379, modeling time: 22.369470, dimension size : 300, window size : 4, avg accuracy : 0.836290
num of epoch 2
epoch : 2, training time: 111.582094, modeling time: 21.670800, dimension size : 300, window size : 4, avg accuracy : 0.856320
num of epoch 3
epoch : 3, training time: 110.844385, modeling time: 22.144254, dimension size : 300, window size : 4, avg accuracy : 0.864713
num of epoch 4
epoch : 4, training time: 110.684234, modeling time: 21.850970, dimension size : 300, window size : 4, avg accuracy : 0.868830
num of epoch 5
epoch : 5, training time: 111.145671, modeling time: 21.898017, dimension size : 300, window size : 4, avg accuracy : 0.870840
num of epoch 6
epoch : 6, training time: 110.854395, modeling time: 22.104215, dimension size : 300, window size : 4, avg accuracy : 0.871600
num of epoch 7
epoch : 7, training time: 110.780325, modeling time: 22.195301, dimension size : 300, window size : 4, avg accuracy : 0.872793
num of epoch 8
epoch : 8, training time: 111.124655, modeling time: 21.639769, dimension size : 300, window size : 4, avg accuracy : 0.873393
num of epoch 9
epoch : 9, training time: 110.789333, modeling time: 22.118229, dimension size : 300, window size : 4, avg accuracy : 0.873777
num of epoch 10
epoch : 10, training time: 110.829372, modeling time: 21.773898, dimension size : 300, window size : 4, avg accuracy : 0.873830
num of epoch 1
epoch : 1, training time: 120.097249, modeling time: 21.948103, dimension size : 300, window size : 6, avg accuracy : 0.828160
num of epoch 2
epoch : 2, training time: 115.712058, modeling time: 22.050179, dimension size : 300, window size : 6, avg accuracy : 0.844587
num of epoch 3
epoch : 3, training time: 114.515905, modeling time: 22.071185, dimension size : 300, window size : 6, avg accuracy : 0.852490
num of epoch 4
epoch : 4, training time: 115.119489, modeling time: 22.257378, dimension size : 300, window size : 6, avg accuracy : 0.855843
num of epoch 5
epoch : 5, training time: 115.307669, modeling time: 21.646776, dimension size : 300, window size : 6, avg accuracy : 0.858407
num of epoch 6
epoch : 6, training time: 118.905122, modeling time: 22.009125, dimension size : 300, window size : 6, avg accuracy : 0.859923
num of epoch 7
epoch : 7, training time: 115.229595, modeling time: 21.816956, dimension size : 300, window size : 6, avg accuracy : 0.860500
num of epoch 8
epoch : 8, training time: 118.748967, modeling time: 21.772897, dimension size : 300, window size : 6, avg accuracy : 0.861303
num of epoch 9
epoch : 9, training time: 112.777241, modeling time: 21.805966, dimension size : 300, window size : 6, avg accuracy : 0.861703
num of epoch 10
epoch : 10, training time: 115.097468, modeling time: 22.155293, dimension size : 300, window size : 6, avg accuracy : 0.862250
num of epoch 1
epoch : 1, training time: 122.704766, modeling time: 22.184292, dimension size : 300, window size : 8, avg accuracy : 0.815887
num of epoch 2
epoch : 2, training time: 120.538690, modeling time: 21.934052, dimension size : 300, window size : 8, avg accuracy : 0.830133
num of epoch 3
epoch : 3, training time: 118.746971, modeling time: 22.047162, dimension size : 300, window size : 8, avg accuracy : 0.837787
num of epoch 4
epoch : 4, training time: 120.344502, modeling time: 22.264368, dimension size : 300, window size : 8, avg accuracy : 0.841273
num of epoch 5
epoch : 5, training time: 119.448644, modeling time: 21.969087, dimension size : 300, window size : 8, avg accuracy : 0.842590
num of epoch 6
epoch : 6, training time: 125.674620, modeling time: 21.785910, dimension size : 300, window size : 8, avg accuracy : 0.843650
num of epoch 7
epoch : 7, training time: 120.178342, modeling time: 21.832956, dimension size : 300, window size : 8, avg accuracy : 0.844500
num of epoch 8
epoch : 8, training time: 125.706649, modeling time: 21.963079, dimension size : 300, window size : 8, avg accuracy : 0.845007
num of epoch 9
epoch : 9, training time: 120.583732, modeling time: 22.256361, dimension size : 300, window size : 8, avg accuracy : 0.845643
num of epoch 10
epoch : 10, training time: 123.345384, modeling time: 22.166274, dimension size : 300, window size : 8, avg accuracy : 0.846030
num of epoch 1
epoch : 1, training time: 129.854629, modeling time: 21.793917, dimension size : 300, window size : 10, avg accuracy : 0.806173
num of epoch 2
epoch : 2, training time: 126.178103, modeling time: 21.997112, dimension size : 300, window size : 10, avg accuracy : 0.818280
num of epoch 3
epoch : 3, training time: 128.756577, modeling time: 22.241347, dimension size : 300, window size : 10, avg accuracy : 0.825280
num of epoch 4
epoch : 4, training time: 130.074843, modeling time: 21.786911, dimension size : 300, window size : 10, avg accuracy : 0.828790
num of epoch 5
epoch : 5, training time: 127.079969, modeling time: 21.710837, dimension size : 300, window size : 10, avg accuracy : 0.830280
num of epoch 6
epoch : 6, training time: 129.184989, modeling time: 21.925043, dimension size : 300, window size : 10, avg accuracy : 0.830793
num of epoch 7
epoch : 7, training time: 131.273991, modeling time: 22.160269, dimension size : 300, window size : 10, avg accuracy : 0.831253
num of epoch 8
epoch : 8, training time: 128.116962, modeling time: 22.056169, dimension size : 300, window size : 10, avg accuracy : 0.831877
num of epoch 9
epoch : 9, training time: 127.846704, modeling time: 22.188296, dimension size : 300, window size : 10, avg accuracy : 0.832160
num of epoch 10
epoch : 10, training time: 131.765465, modeling time: 21.952069, dimension size : 300, window size : 10, avg accuracy : 0.832450
num of epoch 1
epoch : 1, training time: 115.916268, modeling time: 26.734643, dimension size : 400, window size : 2, avg accuracy : 0.841050
num of epoch 2
epoch : 2, training time: 116.631941, modeling time: 27.106015, dimension size : 400, window size : 2, avg accuracy : 0.864347
num of epoch 3
epoch : 3, training time: 113.624054, modeling time: 26.956872, dimension size : 400, window size : 2, avg accuracy : 0.872817
num of epoch 4
epoch : 4, training time: 112.897371, modeling time: 27.137031, dimension size : 400, window size : 2, avg accuracy : 0.877133
num of epoch 5
epoch : 5, training time: 113.239685, modeling time: 26.958875, dimension size : 400, window size : 2, avg accuracy : 0.879330
num of epoch 6
epoch : 6, training time: 113.891310, modeling time: 27.145053, dimension size : 400, window size : 2, avg accuracy : 0.880627
num of epoch 7
epoch : 7, training time: 113.998413, modeling time: 26.734659, dimension size : 400, window size : 2, avg accuracy : 0.881543
num of epoch 8
epoch : 8, training time: 112.712179, modeling time: 26.502436, dimension size : 400, window size : 2, avg accuracy : 0.881933
num of epoch 9
epoch : 9, training time: 112.835297, modeling time: 26.775698, dimension size : 400, window size : 2, avg accuracy : 0.882350
num of epoch 10
epoch : 10, training time: 112.773238, modeling time: 26.665592, dimension size : 400, window size : 2, avg accuracy : 0.882447
num of epoch 1
epoch : 1, training time: 126.824724, modeling time: 26.757680, dimension size : 400, window size : 4, avg accuracy : 0.835687
num of epoch 2
epoch : 2, training time: 121.526639, modeling time: 26.943860, dimension size : 400, window size : 4, avg accuracy : 0.858163
num of epoch 3
epoch : 3, training time: 122.578648, modeling time: 26.923841, dimension size : 400, window size : 4, avg accuracy : 0.867083
num of epoch 4
epoch : 4, training time: 121.258381, modeling time: 26.909827, dimension size : 400, window size : 4, avg accuracy : 0.870997
num of epoch 5
epoch : 5, training time: 124.488482, modeling time: 26.853773, dimension size : 400, window size : 4, avg accuracy : 0.873297
num of epoch 6
epoch : 6, training time: 120.453609, modeling time: 27.202108, dimension size : 400, window size : 4, avg accuracy : 0.874870
num of epoch 7
epoch : 7, training time: 121.074205, modeling time: 26.760684, dimension size : 400, window size : 4, avg accuracy : 0.876097
num of epoch 8
epoch : 8, training time: 117.043335, modeling time: 26.528462, dimension size : 400, window size : 4, avg accuracy : 0.877003
num of epoch 9
epoch : 9, training time: 120.541694, modeling time: 26.871791, dimension size : 400, window size : 4, avg accuracy : 0.877447
num of epoch 10
epoch : 10, training time: 124.458451, modeling time: 26.628557, dimension size : 400, window size : 4, avg accuracy : 0.877740
num of epoch 1
epoch : 1, training time: 131.481347, modeling time: 26.860780, dimension size : 400, window size : 6, avg accuracy : 0.827860
num of epoch 2
epoch : 2, training time: 127.888745, modeling time: 26.610539, dimension size : 400, window size : 6, avg accuracy : 0.846253
num of epoch 3
epoch : 3, training time: 129.506297, modeling time: 26.818740, dimension size : 400, window size : 6, avg accuracy : 0.854320
num of epoch 4
epoch : 4, training time: 131.023754, modeling time: 26.625556, dimension size : 400, window size : 6, avg accuracy : 0.858630
num of epoch 5
epoch : 5, training time: 133.259899, modeling time: 26.505440, dimension size : 400, window size : 6, avg accuracy : 0.860960
num of epoch 6
epoch : 6, training time: 129.569357, modeling time: 26.760684, dimension size : 400, window size : 6, avg accuracy : 0.862357
num of epoch 7
epoch : 7, training time: 128.286127, modeling time: 26.813735, dimension size : 400, window size : 6, avg accuracy : 0.863353
num of epoch 8
epoch : 8, training time: 131.594302, modeling time: 27.132040, dimension size : 400, window size : 6, avg accuracy : 0.864437
num of epoch 9
epoch : 9, training time: 128.355192, modeling time: 26.636565, dimension size : 400, window size : 6, avg accuracy : 0.865103
num of epoch 10
epoch : 10, training time: 128.552381, modeling time: 27.331233, dimension size : 400, window size : 6, avg accuracy : 0.865253
num of epoch 1
epoch : 1, training time: 134.681264, modeling time: 26.960876, dimension size : 400, window size : 8, avg accuracy : 0.817293
num of epoch 2
epoch : 2, training time: 135.780318, modeling time: 27.110035, dimension size : 400, window size : 8, avg accuracy : 0.832340
num of epoch 3
epoch : 3, training time: 138.855269, modeling time: 26.529462, dimension size : 400, window size : 8, avg accuracy : 0.840383
num of epoch 4
epoch : 4, training time: 135.313869, modeling time: 27.070982, dimension size : 400, window size : 8, avg accuracy : 0.844377
num of epoch 5
epoch : 5, training time: 139.965336, modeling time: 26.852773, dimension size : 400, window size : 8, avg accuracy : 0.846367
num of epoch 6
epoch : 6, training time: 139.669051, modeling time: 27.017931, dimension size : 400, window size : 8, avg accuracy : 0.848330
num of epoch 7
epoch : 7, training time: 135.120686, modeling time: 26.740665, dimension size : 400, window size : 8, avg accuracy : 0.849283
num of epoch 8
epoch : 8, training time: 134.033643, modeling time: 26.669597, dimension size : 400, window size : 8, avg accuracy : 0.850173
num of epoch 9
epoch : 9, training time: 139.181583, modeling time: 26.897816, dimension size : 400, window size : 8, avg accuracy : 0.850833
num of epoch 10
epoch : 10, training time: 134.106712, modeling time: 27.240144, dimension size : 400, window size : 8, avg accuracy : 0.851253
num of epoch 1
epoch : 1, training time: 147.995026, modeling time: 26.869789, dimension size : 400, window size : 10, avg accuracy : 0.806853
num of epoch 2
epoch : 2, training time: 143.137380, modeling time: 26.787710, dimension size : 400, window size : 10, avg accuracy : 0.819143
num of epoch 3
epoch : 3, training time: 144.245443, modeling time: 27.034948, dimension size : 400, window size : 10, avg accuracy : 0.825770
num of epoch 4
epoch : 4, training time: 147.852906, modeling time: 26.645573, dimension size : 400, window size : 10, avg accuracy : 0.829183
num of epoch 5
epoch : 5, training time: 145.395548, modeling time: 27.029942, dimension size : 400, window size : 10, avg accuracy : 0.830690
num of epoch 6
epoch : 6, training time: 138.243683, modeling time: 26.632561, dimension size : 400, window size : 10, avg accuracy : 0.831620
num of epoch 7
epoch : 7, training time: 145.086251, modeling time: 27.181087, dimension size : 400, window size : 10, avg accuracy : 0.832400
num of epoch 8
epoch : 8, training time: 144.804981, modeling time: 26.922842, dimension size : 400, window size : 10, avg accuracy : 0.832860
num of epoch 9
epoch : 9, training time: 149.900871, modeling time: 27.190096, dimension size : 400, window size : 10, avg accuracy : 0.833430
num of epoch 10
epoch : 10, training time: 144.064270, modeling time: 27.022936, dimension size : 400, window size : 10, avg accuracy : 0.833773
num of epoch 1
epoch : 1, training time: 128.090925, modeling time: 30.756519, dimension size : 500, window size : 2, avg accuracy : 0.842500
num of epoch 2
epoch : 2, training time: 131.324042, modeling time: 32.082874, dimension size : 500, window size : 2, avg accuracy : 0.866453
num of epoch 3
epoch : 3, training time: 129.091899, modeling time: 30.969740, dimension size : 500, window size : 2, avg accuracy : 0.875677
num of epoch 4
epoch : 4, training time: 127.358235, modeling time: 31.382135, dimension size : 500, window size : 2, avg accuracy : 0.879550
num of epoch 5
epoch : 5, training time: 131.874583, modeling time: 31.465199, dimension size : 500, window size : 2, avg accuracy : 0.881727
num of epoch 6
epoch : 6, training time: 126.570479, modeling time: 31.454189, dimension size : 500, window size : 2, avg accuracy : 0.882927
num of epoch 7
epoch : 7, training time: 127.218101, modeling time: 31.436172, dimension size : 500, window size : 2, avg accuracy : 0.883903
num of epoch 8
epoch : 8, training time: 128.807626, modeling time: 31.295037, dimension size : 500, window size : 2, avg accuracy : 0.884703
num of epoch 9
epoch : 9, training time: 125.527478, modeling time: 31.357096, dimension size : 500, window size : 2, avg accuracy : 0.884937
num of epoch 10
epoch : 10, training time: 123.842860, modeling time: 31.144892, dimension size : 500, window size : 2, avg accuracy : 0.885210
num of epoch 1
epoch : 1, training time: 140.095460, modeling time: 31.078831, dimension size : 500, window size : 4, avg accuracy : 0.837290
num of epoch 2
epoch : 2, training time: 133.409043, modeling time: 31.848582, dimension size : 500, window size : 4, avg accuracy : 0.859113
num of epoch 3
epoch : 3, training time: 136.556063, modeling time: 31.190936, dimension size : 500, window size : 4, avg accuracy : 0.868120
num of epoch 4
epoch : 4, training time: 135.501051, modeling time: 30.954729, dimension size : 500, window size : 4, avg accuracy : 0.873283
num of epoch 5
epoch : 5, training time: 137.646108, modeling time: 31.708433, dimension size : 500, window size : 4, avg accuracy : 0.875813
num of epoch 6
epoch : 6, training time: 130.510261, modeling time: 31.491238, dimension size : 500, window size : 4, avg accuracy : 0.877603
num of epoch 7
epoch : 7, training time: 135.594138, modeling time: 31.219965, dimension size : 500, window size : 4, avg accuracy : 0.878750
num of epoch 8
epoch : 8, training time: 137.802260, modeling time: 31.684412, dimension size : 500, window size : 4, avg accuracy : 0.879293
num of epoch 9
epoch : 9, training time: 139.935306, modeling time: 31.464198, dimension size : 500, window size : 4, avg accuracy : 0.879847
num of epoch 10
epoch : 10, training time: 130.431183, modeling time: 31.115864, dimension size : 500, window size : 4, avg accuracy : 0.880103
num of epoch 1
epoch : 1, training time: 141.398708, modeling time: 31.273015, dimension size : 500, window size : 6, avg accuracy : 0.828493
num of epoch 2
epoch : 2, training time: 142.004292, modeling time: 31.525271, dimension size : 500, window size : 6, avg accuracy : 0.847057
num of epoch 3
epoch : 3, training time: 141.762059, modeling time: 31.244988, dimension size : 500, window size : 6, avg accuracy : 0.856073
num of epoch 4
epoch : 4, training time: 142.534800, modeling time: 31.607336, dimension size : 500, window size : 6, avg accuracy : 0.860433
num of epoch 5
epoch : 5, training time: 146.282398, modeling time: 31.027780, dimension size : 500, window size : 6, avg accuracy : 0.863293
num of epoch 6
epoch : 6, training time: 141.567868, modeling time: 31.660387, dimension size : 500, window size : 6, avg accuracy : 0.865143
num of epoch 7
epoch : 7, training time: 141.144465, modeling time: 31.403140, dimension size : 500, window size : 6, avg accuracy : 0.866527
num of epoch 8
epoch : 8, training time: 143.775992, modeling time: 31.604347, dimension size : 500, window size : 6, avg accuracy : 0.867617
num of epoch 9
epoch : 9, training time: 140.464800, modeling time: 31.928659, dimension size : 500, window size : 6, avg accuracy : 0.868190
num of epoch 10
epoch : 10, training time: 140.473823, modeling time: 31.349103, dimension size : 500, window size : 6, avg accuracy : 0.868507
num of epoch 1
epoch : 1, training time: 149.502474, modeling time: 31.041808, dimension size : 500, window size : 8, avg accuracy : 0.817747
num of epoch 2
epoch : 2, training time: 148.986994, modeling time: 31.173933, dimension size : 500, window size : 8, avg accuracy : 0.832313
num of epoch 3
epoch : 3, training time: 148.243280, modeling time: 31.292033, dimension size : 500, window size : 8, avg accuracy : 0.840477
num of epoch 4
epoch : 4, training time: 153.414240, modeling time: 31.497245, dimension size : 500, window size : 8, avg accuracy : 0.844907
num of epoch 5
epoch : 5, training time: 143.725945, modeling time: 31.640371, dimension size : 500, window size : 8, avg accuracy : 0.847353
num of epoch 6
epoch : 6, training time: 153.472300, modeling time: 32.157864, dimension size : 500, window size : 8, avg accuracy : 0.849563
num of epoch 7
epoch : 7, training time: 157.800451, modeling time: 32.215935, dimension size : 500, window size : 8, avg accuracy : 0.850723
num of epoch 8
epoch : 8, training time: 146.958047, modeling time: 32.136848, dimension size : 500, window size : 8, avg accuracy : 0.851710
num of epoch 9
epoch : 9, training time: 148.576600, modeling time: 31.941673, dimension size : 500, window size : 8, avg accuracy : 0.852377
num of epoch 10
epoch : 10, training time: 150.039004, modeling time: 32.105828, dimension size : 500, window size : 8, avg accuracy : 0.852957
num of epoch 1
epoch : 1, training time: 163.485895, modeling time: 32.045758, dimension size : 500, window size : 10, avg accuracy : 0.808430
num of epoch 2
epoch : 2, training time: 161.987472, modeling time: 31.760483, dimension size : 500, window size : 10, avg accuracy : 0.820803
num of epoch 3
epoch : 3, training time: 166.051273, modeling time: 31.757481, dimension size : 500, window size : 10, avg accuracy : 0.828500
num of epoch 4
epoch : 4, training time: 163.170668, modeling time: 32.540428, dimension size : 500, window size : 10, avg accuracy : 0.832063
num of epoch 5
epoch : 5, training time: 158.504590, modeling time: 33.070312, dimension size : 500, window size : 10, avg accuracy : 0.833460
num of epoch 6
epoch : 6, training time: 168.355695, modeling time: 32.997456, dimension size : 500, window size : 10, avg accuracy : 0.835007
num of epoch 7
epoch : 7, training time: 158.624243, modeling time: 33.096953, dimension size : 500, window size : 10, avg accuracy : 0.835657
num of epoch 8
epoch : 8, training time: 170.299777, modeling time: 32.679254, dimension size : 500, window size : 10, avg accuracy : 0.836347
num of epoch 9
epoch : 9, training time: 165.297154, modeling time: 32.554044, dimension size : 500, window size : 10, avg accuracy : 0.836950
num of epoch 10
epoch : 10, training time: 161.321805, modeling time: 32.552951, dimension size : 500, window size : 10, avg accuracy : 0.837617
end : 2016-12-12 13:46:24.136835
In [ ]:
In [36]:
df_param.to_csv('D:/Dropbox/2016-2/졸업논문/FINAL_result/ParamSearch/result.csv',index=False)
In [ ]:
Content source: dedert/Brand2Vec
Similar notebooks: