As G explained, the AI takes the opinion score (the sum total of those numbers visible with TD), aka OPINION; which is gradually adjusted by modifiers.
Then, OPINION is one of several factors used to calculate APPROACH.
APPROACH = NEUTRAL, FRIENDLY, GUARDED, DECEPTIVE (fake "FRIENDLY") etc.
However, the AI does not only factor in OPINION, it also considers military strength, proximity, how much it can gain, etc.
It's unclear how it does this; I have been unable to find the code for it, so I'm assuming it's in one of the binary files that Github doesn't display and I'm not yet sure how to view.
But anyway, TD is not actually that useful. Knowing the opinion is a bit useful, but it also does other calculations under the hood to decide how it will act towards you. However the intention of it is to act as an information cheat, is it not? So I think it'd be more useful if it could be used that way - otherwise it's not actually as transparent as it claims to be.
TD has nothing to do with AI deal valuation, as Moi Magnus said.