Preheat the oven to 350F (180C).
Grate the carrots.
Chop the walnuts.
In a bowl, sift the flour. Add the spices, salt, baking soda, baking powder, and both sugars. Mix.
In a separate bowl, whisk the eggs and the sour cream.
Add the wet to the dry and gently fold. Halfway through the fold, add half of the chopped walnuts and grated carrots. Fold a few more times just until incorporated, don't overmix.
Add cupcake holders (paper or silicone) to a cupcake pan. Fill each one with the batter 2/3 from the top, so they have enough space to rise. Transfer to the oven and bake for about 30 minutes. Depending on your oven, it can take more or less. Start checking after 20 minutes by inserting a toothpick at the center, if it comes out clean, they are ready.
While the cupcakes are baking, make the frosting.
In a stand mixer or hand mixer, using the paddle attachment, combine the cream cheese, mascarpone, and powdered sugar. Mix until smooth. Transfer to a piping bag, and keep in the fridge until the cupcakes are baked and cooled.* If you would like to pipe the frosting with a certain shape, you can use a nozzle. I just cut the end of the piping bag.* If you don't have a piping bag, you can simply use a spoon or a spreading knife to shape the frosting on top. It will be messier but still tasty, and the walnuts will cover any imperfections. Once the cupcakes are baked, transfer them to a cooling rack. Cool and frost. Deep each cupcake into the remaining chopped walnuts, and have a bite ;)