Three stages of romance: attraction, rapport, sexual contact (e.g. kissing). The process from no relationship to having a relationship happens as two people experience these three stages together. So I suppose the answer to calculating romantic compatibility lies in how smoothly those three steps can happen between two people.
The attraction part involves how well you compare to paragon of your stereotype. (e.g. What's the current stereotype of an attractive man, and how you compare to him. What's the current stereotype of an attractive woman and how well you compare to her.) The attraction only happens if the person feels they "have a chance".
Attraction alone of course is not enough. You can tell someone is attractive and hate their guts. So that's where rapport comes in.
The rapport part involves telling the other person about yourself and whether the other person can emphasise with you, and vice versa. I guess that's where the factors you mentioned come in. Often people like people who have personality traits of their parents, because that's easier to empathise with. Rapport alone makes great friends, you need attraction to create romance.
And then finally, I hope if you're thinking about this stuff you know enough about the last part...
Movies & TV shows are often instructive. The protagonist first impression sees an attractive man/woman, then they approach/get approached, and now thinks he's a dick or she's a bitch. Finally after some drama they end up alone together and tell each other about their growing up. And finally the kiss.