I did not see any function in SQL layer can do this.
But using pal libary (predictive analysis libary) come with HANA, you may be able to achive that.
Or you can write a LL language function to compute that. I am not sure the LL language is public available or not.