For the cake:
- Heat the oven to 350°F and arrange a rack in the middle.
- Place the flour, baking powder, baking soda, cinnamon, nutmeg, allspice, and salt in a large bowl and whisk to aerate and break up any lumps; set aside.
- Place the eggs, sugars, oil, and yogurt in a large bowl and whisk until the eggs are broken up and the mixture is thoroughly combined. Using a rubber spatula, fold in the flour mixture until just combined. Stir in the carrots until evenly mixed.
- Pour the batter into a 13-by-9-inch glass baking dish (no need to coat with butter), smoothing it into the corners with the rubber spatula.
- Bake, rotating the dish after 20 minutes, until a toothpick or cake tester inserted in the center comes out dry with just a few crumbs, about 40 to 50 minutes total. Transfer to a wire rack to cool completely before frosting, at least 2 hours.
- Meanwhile, place the nuts on a baking sheet and bake until lightly browned and fragrant, about 10 minutes. Transfer the nuts to a cutting board to cool slightly, coarsely chop them, and set aside.
- Spread the frosting in an even layer over the cooled cake and evenly sprinkle the toasted nuts over the frosting. If you don’t plan to eat the cake within 4 hours, cover it with plastic wrap and refrigerate for up to 3 days. Before serving, let the cake sit at room temperature for about 45 minutes to take the chill off.