I picked up one of your examples to train a doc2vec model. After running the piece of code below, I do not understand the logs. Whatever the document or the raw string passed in the methods nearestLabels
or inferVector
, it always returns me the same results which are not what I expected.
[info] [finance, health]
[info] [finance, health]
[info] [finance, health]
[info] [finance, health]
[info] [0.0049676113,0.0028787095,0.003321892,-0.003161574,0.0012740159,-0.0025561636,-0.0037729545,0.0031211937,6.4683676E-4,-0.0044721086,0.0032461053,0.0018189406,8.640766E-4,7.406825E-4,-0.0021893135,-0.0035865551,-0.0029473228,0.0035764086,-0.0022779887,-4.3441445E-4,0.0036415625,-2.249512E-4,-0.0020271144,-1.2530028E-4,-0.003965818,0.0035014106,0.004738228,-0.0043535195,0.001056447,0.0034712702,-0.0013758489,1.2745916E-4,0.004932679,-0.0031809532,-0.0049393554,0.0041481643,0.0030583949,1.4191866E-5,-0.004493359,-0.0041063563,-5.278683E-4,-4.500538E-4,-0.0041667484,0.0019469637,1.8355846E-5,-6.400758E-4,0.00272915,0.0014724642,-0.0038122342,7.4458716E-5,-0.0039577573,0.0025236274,0.0023528296,0.0020324527,-9.352094E-4,0.00464999,-0.0044168485,-0.0013031652,-1.313886E-4,-0.0037407083,-0.0015897963,0.004480338,-0.004225244,-0.0024998602,0.0010590708,0.0030442316,0.0030825895,-0.0020763727,-0.0041732173,-8.023769E-4,3.5224258E-4,-0.0047283247,0.0024792869,-0.0032535812,-8.4940257E-4,-0.0034813022,-0.0023037186,-0.0011500418,2.1316529E-4,-0.003058113,-0.0044661416,-1.5185654E-4,-2.1609008E-4,-3.8820563E-4,2.1732807E-4,0.0032119108,2.6806473E-4,-3.7400395E-4,-0.002717987,-0.0010265463,0.0012069005,3.8004696E-4,-0.0035895149,0.002335109,0.0034582221,0.0030708283,-0.004603518,0.0027415962,-0.0045232372,0.0036679548]
[info] [0.0049676113,0.0028787095,0.003321892,-0.003161574,0.0012740159,-0.0025561636,-0.0037729545,0.0031211937,6.4683676E-4,-0.0044721086,0.0032461053,0.0018189406,8.640766E-4,7.406825E-4,-0.0021893135,-0.0035865551,-0.0029473228,0.0035764086,-0.0022779887,-4.3441445E-4,0.0036415625,-2.249512E-4,-0.0020271144,-1.2530028E-4,-0.003965818,0.0035014106,0.004738228,-0.0043535195,0.001056447,0.0034712702,-0.0013758489,1.2745916E-4,0.004932679,-0.0031809532,-0.0049393554,0.0041481643,0.0030583949,1.4191866E-5,-0.004493359,-0.0041063563,-5.278683E-4,-4.500538E-4,-0.0041667484,0.0019469637,1.8355846E-5,-6.400758E-4,0.00272915,0.0014724642,-0.0038122342,7.4458716E-5,-0.0039577573,0.0025236274,0.0023528296,0.0020324527,-9.352094E-4,0.00464999,-0.0044168485,-0.0013031652,-1.313886E-4,-0.0037407083,-0.0015897963,0.004480338,-0.004225244,-0.0024998602,0.0010590708,0.0030442316,0.0030825895,-0.0020763727,-0.0041732173,-8.023769E-4,3.5224258E-4,-0.0047283247,0.0024792869,-0.0032535812,-8.4940257E-4,-0.0034813022,-0.0023037186,-0.0011500418,2.1316529E-4,-0.003058113,-0.0044661416,-1.5185654E-4,-2.1609008E-4,-3.8820563E-4,2.1732807E-4,0.0032119108,2.6806473E-4,-3.7400395E-4,-0.002717987,-0.0010265463,0.0012069005,3.8004696E-4,-0.0035895149,0.002335109,0.0034582221,0.0030708283,-0.004603518,0.0027415962,-0.0045232372,0.0036679548]
[info] [0.0049676113,0.0028787095,0.003321892,-0.003161574,0.0012740159,-0.0025561636,-0.0037729545,0.0031211937,6.4683676E-4,-0.0044721086,0.0032461053,0.0018189406,8.640766E-4,7.406825E-4,-0.0021893135,-0.0035865551,-0.0029473228,0.0035764086,-0.0022779887,-4.3441445E-4,0.0036415625,-2.249512E-4,-0.0020271144,-1.2530028E-4,-0.003965818,0.0035014106,0.004738228,-0.0043535195,0.001056447,0.0034712702,-0.0013758489,1.2745916E-4,0.004932679,-0.0031809532,-0.0049393554,0.0041481643,0.0030583949,1.4191866E-5,-0.004493359,-0.0041063563,-5.278683E-4,-4.500538E-4,-0.0041667484,0.0019469637,1.8355846E-5,-6.400758E-4,0.00272915,0.0014724642,-0.0038122342,7.4458716E-5,-0.0039577573,0.0025236274,0.0023528296,0.0020324527,-9.352094E-4,0.00464999,-0.0044168485,-0.0013031652,-1.313886E-4,-0.0037407083,-0.0015897963,0.004480338,-0.004225244,-0.0024998602,0.0010590708,0.0030442316,0.0030825895,-0.0020763727,-0.0041732173,-8.023769E-4,3.5224258E-4,-0.0047283247,0.0024792869,-0.0032535812,-8.4940257E-4,-0.0034813022,-0.0023037186,-0.0011500418,2.1316529E-4,-0.003058113,-0.0044661416,-1.5185654E-4,-2.1609008E-4,-3.8820563E-4,2.1732807E-4,0.0032119108,2.6806473E-4,-3.7400395E-4,-0.002717987,-0.0010265463,0.0012069005,3.8004696E-4,-0.0035895149,0.002335109,0.0034582221,0.0030708283,-0.004603518,0.0027415962,-0.0045232372,0.0036679548]
[info] [0.0049676113,0.0028787095,0.003321892,-0.003161574,0.0012740159,-0.0025561636,-0.0037729545,0.0031211937,6.4683676E-4,-0.0044721086,0.0032461053,0.0018189406,8.640766E-4,7.406825E-4,-0.0021893135,-0.0035865551,-0.0029473228,0.0035764086,-0.0022779887,-4.3441445E-4,0.0036415625,-2.249512E-4,-0.0020271144,-1.2530028E-4,-0.003965818,0.0035014106,0.004738228,-0.0043535195,0.001056447,0.0034712702,-0.0013758489,1.2745916E-4,0.004932679,-0.0031809532,-0.0049393554,0.0041481643,0.0030583949,1.4191866E-5,-0.004493359,-0.0041063563,-5.278683E-4,-4.500538E-4,-0.0041667484,0.0019469637,1.8355846E-5,-6.400758E-4,0.00272915,0.0014724642,-0.0038122342,7.4458716E-5,-0.0039577573,0.0025236274,0.0023528296,0.0020324527,-9.352094E-4,0.00464999,-0.0044168485,-0.0013031652,-1.313886E-4,-0.0037407083,-0.0015897963,0.004480338,-0.004225244,-0.0024998602,0.0010590708,0.0030442316,0.0030825895,-0.0020763727,-0.0041732173,-8.023769E-4,3.5224258E-4,-0.0047283247,0.0024792869,-0.0032535812,-8.4940257E-4,-0.0034813022,-0.0023037186,-0.0011500418,2.1316529E-4,-0.003058113,-0.0044661416,-1.5185654E-4,-2.1609008E-4,-3.8820563E-4,2.1732807E-4,0.0032119108,2.6806473E-4,-3.7400395E-4,-0.002717987,-0.0010265463,0.0012069005,3.8004696E-4,-0.0035895149,0.002335109,0.0034582221,0.0030708283,-0.004603518,0.0027415962,-0.0045232372,0.0036679548]
As you can see, the nearest labels are the same whatever the document passed to the method. I think this is due to the vectors which are exactly identical.