Learning continuous functions through a new linear regression method