Preheat the oven to 350°F (175°C) and grease a 9x13 inch baking pan.
In a large bowl, cream the softened butter, granulated sugar, and brown sugar together until light and fluffy.
Add eggs, one at a time, mixing well after each addition.
Stir in the mashed sweet potatoes and sour cream until well combined.
In a separate bowl, whisk together the flour, baking powder, baking soda, spices, and salt.
Gradually add the dry ingredients to the wet mixture, alternating with the milk, mixing until just combined.
Fold in the chopped pecans gently using a spatula.
Pour the batter into the prepared baking pan and spread evenly.
Bake in the preheated oven for 40-45 minutes, or until a toothpick inserted in the center comes out clean.
Remove from oven and allow the cake to cool in the pan for about 10 minutes, then transfer to a wire rack to cool completely.