Here velocity is -1.94938. Do you know how is this obtained?
The average of all LOS velocities in the data above is -8.194897852. The mean on a yearly basis velocity is -2.13652694 [as resulting from: -8.194897852/3.835616438; where 3.835616438 is years (days between first and last acquisition (1400) / 365 = 3.835616438 ].
If I try to do the count on a yearly basis I get:

Which clearly does not match with the velocity value of -1.94938 mm/yr.

I tried several approaches but I cannot obtain the velocity value from the LOS time series. Please, could you tell me how is the LOS velocity (mm/yr) calculated?

I’m just guessing, but the average velocity could be the slope of a linear regression of all points along the investigated time rather than the mathematical mean.

Firstly, in your top example, where you have |date | LoS_Deformation| the los values are displacement (in mm) relative to the master date. Make sure you don’t confuse them for velocities.

To get velocity you need to know the average change in displacement over a time period.

As you can see in line 1615, the velocity is calculated by fitting a straight line to displacement vs time, but the fit is weighted. The weights (named sm_cov here) are usually the standard deviation (‘noise’) estimates for each interferogram.