In a medium skillet, heat two tablespoons each of the olive oil and butter. Add shallots and cook, stirring often, until very soft and golden. Season with salt and pepper to taste and set aside.
Boil sweet potatoes in water until cooked but still hard to the touch. Cool them down under running cold water.
Grate the potatoes in a food processor fitted with a medium grating disk then combine them with the eggs and ricotta in a large bowl. Stir in the flour and season with salt and pepper.
In a large heavy skillet over medium heat, heat the remaining oil and butter. Shape the potato mixture into 16 equal balls. Then, in batches, put them in the skillet and press on each with a flat spatula to make a flat cake.
Cook until first side is lightly browned, and then flip to lightly brown the second side. Flip to recrisp the first side then drain briefly on paper towels. Keep warm.
Serve garnished with a large spoon of mascarpone cheese and the caramelized shallots.