my opinion, '以为' can mean 'think', but most of time use it as 'thought and assume'
我以为你要来,所以我做了好吃的饭菜。
when I say this sentence, probably you didnt come, and I am talking with you through phone or in next day. It could mean 'I thought you would come, so I cooked some dishes'
On the other hand, 我知道你要来, 所以我做了好多好吃的。
when I say this sentence, you have already come and I am talking with you at my home. 'I know you will come, so I cook some dishes'
some other e.g.
Frank昨天没有来, 我以为他生病了。
我以为我女朋友不知道我和其他人去看电影了。
Frank以为他做的饭很好吃,其实难吃死了。