python rescal.py --latent 2 --lmbda 0 --input tiny-example --outputentities entity.embeddings.csv --outputfactors latent.factors.csv --log rescal.log
The number of entities: 4
loaded 1: 1-rows
loaded 2: 2-rows
The number of tensor slices: 2
The number of non-zero values in the tensor: 3
Objective function value: 0.166667938222720551921796072747
# of iterations: 8
For matrix A::
cat entity.embeddings.csv
-7.071067811865472397e-01 7.071067811865471286e-01
5.294305317939924649e-01 5.294305317939912436e-01
5.294305317939924649e-01 5.294305317939912436e-01
2.068088014820283066e-03 2.068088014820278295e-03
For matrix R::
cat latent.factors.csv
-6.677943034708067049e-01 6.677943034708085923e-01
-6.677943034708074821e-01 6.677943034708093695e-01
-1.304285748966419346e-03 -1.304285748966421297e-03
1.304285748966423249e-03 1.304285748966424767e-03
cat rescal.log
DEBUG:RESCAL:[Config] rank: 2 | maxIter: 50 | conv: 1.0e-05 | lmbda: 0.0e+00
DEBUG:RESCAL:[Algorithm] The tensor norm: 3.00000
DEBUG:RESCAL:[Algorithm] The eigenvector based initialization will be performed.
DEBUG:RESCAL:Initializing tensor slices by summation required secs: 0.00496
DEBUG:RESCAL:eigenvector decomposition required secs: 0.00453
DEBUG:RESCAL:[Algorithm] Finished initialization.
DEBUG:RESCAL:[Algorithm] Preheating is going on.
DEBUG:RESCAL:[ 0] total fit: 0.0000000000 | delta: 0.0000000000 | secs: 0.00377
DEBUG:RESCAL:[ 1] total fit: 0.1717171717 | delta: 0.1717171717 | secs: 0.00356
DEBUG:RESCAL:[ 2] total fit: 0.1679586563 | delta: 0.0037585154 | secs: 0.00348
DEBUG:RESCAL:[ 3] total fit: 0.1669915530 | delta: 0.0009671034 | secs: 0.00347
DEBUG:RESCAL:[ 4] total fit: 0.1667480072 | delta: 0.0002435458 | secs: 0.00357
DEBUG:RESCAL:[ 5] total fit: 0.1666870092 | delta: 0.0000609979 | secs: 0.00345
DEBUG:RESCAL:[ 6] total fit: 0.1666717528 | delta: 0.0000152565 | secs: 0.00347
DEBUG:RESCAL:[ 7] total fit: 0.1666679382 | delta: 0.0000038146 | secs: 0.00344
===========
cat entity.embeddings.csv
5.287400282344740798e-01 -2.648288074937905172e-17
6.472985753526332431e-01 -1.883524571199644730e-17
6.472985753526332431e-01 -1.883524571199644730e-17
2.528510059971223606e-03 -8.399779633628449750e-20
9.723663381107547794e-17 7.118437655042088030e-01
9.723718319815804104e-17 7.118437655042088030e-01
cat term.embeddings.csv
4.730825851270915039e-01 -6.977337002813972351e-17
1.157697052140589156e+00 -1.451761439325526721e-16
4.522254109924176389e-03 -5.860147020766050828e-19
4.822701779013331954e-17 1.404572401961088790e+00
cat latent.factors.csv
5.476271649231128080e-01 -1.168831819383593920e-16
-6.070133651429397840e-17 1.295001708078205427e-32
1.069584306490454703e-03 -1.659206118320981211e-19
-2.282874647233581876e-19 3.540155448418387818e-35
1.741390346565283288e-33 5.092367925378079864e-17
5.092333426231983632e-17 1.478663144852583988e+00
Thursday, May 3, 2018
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment