Mix the flour, cocoa powder and bicarbonate of soda together in a bowl. Beat the butter and sugar together in a mixing bowl until pale and creamy. Gradually mix in alternate spoonfuls of beaten egg and flour mixture until all has been added and the mixture is smooth. Stir in the mashed sweet potato and ginger.
Pour the mixture into a 23 cm (9 inch) spring-form tin, greased and base-lined with oiled greaseproof paper, then spread the surface level. Bake in a preheated oven, 160°C (325°F), Gas Mark 3, for 45–50 minutes until the cake has risen with a slightly domed and cracked top and a skewer inserted into the centre comes out clean.
Leave to cool in the tin for 15 minutes (don't worry if it sinks slightly) then turn out on to a wire rack and peel off the lining paper. Leave to cool completely.
Make the frosting. Melt the chocolate and muscovado sugar in a heatproof bowl set over a saucepan of gently simmering water. Remove from the heat, add the crème fraîche and stir until smooth and glossy. Chill for 10–30 minutes if needed, until the frosting is thick enough to spread. Spoon the chocolate frosting over the cake top and sides and swirl with a knife.
Sprinkle with the ginger and crystallized flower petals, if using, then leave in a cool place to set.