Why does it say "Shma Atah Vni va'Chacham"?
R. Yonah: Learn from Chachmah, in order that your heart will remain in the straight path, good Midos and the ways of Yir'as Hashem. It is proper to first use [Chachmah] to fix the heart, so it will be pure, straight and fear Elokim. The coming verse proves so; it warns about removing bad Midos and being drawn after desire - "Ki Sovei v'Zolel Yivaresh" (21).
Malbim: Corresponding to "Im Chacham Libecha Yismach Libi" (15), know that your heart is not yet Chacham. It is still far from Chachmah; when Chachmah will come in your heart, it will find war with desires and the Yetzer - the opposite of Chacham Lev.
What do we learn from "[va'Chacham] v'Asher ba'Derech Libecha"?
Rashi: After you become Chacham, you can go in the ways of your heart, for a Chacham's heart does not entice him to sin.
R. Yonah: "V'Halech b'Darchei Libecha... Ki Al Kol Eleh Yevi'acha Elokim ba'Mishpat " (Koheles 9:11) - He will judge you for all of these Midos. Rather, straighten your heart in the straight path, and acquire good Midos. Authors of Musar said, I do not learn Chachmah expecting to reach its end, rather, so I will become wise in what I may not be foolish.
Malbim: You must listen to and accept Divrei Chachmah. Be wise to acquire Chachmah. You have two paths in front of you - of Chachmah and of folly. Affirm the power that rules in you in the path of happiness. This is the difference between Me'asher and Madrich; Me'asher goes in the path of eternal happiness.