Algorithms for affective and ubiquitous sensing systems and for protein structure prediction