Preheat the oven to 350 degrees F. Coat the bottom and sides of two 8-inch cake pans with nonstick cooking spray and set aside.
In a large bowl, whisk together the whole-wheat flour, all-purpose flour, baking powder, and baking soda; set aside.
In a medium bowl, stir together the sugar, crushed pineapple, soy yogurt, coconut oil, vanilla, cardamom, cinnamon, ginger, nutmeg, and salt until well blended.
Stir the pineapple mixture into the dry ingredients until blended. Stir in the shredded carrots, raisins, and walnuts.
Scrape the batter into the prepared cake pans and bake until a toothpick inserted into the centers of the cake comes out clean, 25 to 30 minutes.
Cool the cakes in the pans on a wire rack for 15 minutes. Invert the cakes onto the rack and cool completely.
Place one of the cake layers on a cardboard round or a flat plate and cover with a generous layer of frosting, spreading it to the edges of the cake, with a metal spatula. Top with the remaining layer, then frost the top and sides of the cake with the remaining frosting.