How can I convey my knowledge about a field without publications in a PhD application? I'm a CS undergrad interested in Machine Learning. During the past year, I've delved deep into a theoretical book in Machine Learning and wrote many programs to demonstrate / visualize concepts and algorithms. I hope, when I apply to a PhD program, the advisor can know about this, because it displays my dedication and passion about this field. However, I don't know how.

Any broad or specific advice will help. 



Additional notes: I'm not in a desperate situation in which I have to depend on showing off the books I've read to get into a PhD -- I have relevant research experiences and recommendations.  I am currently a sophomore.
Given that you're a sophomore at a fairly selective liberal arts college [*], you still have plenty of time. Indeed, in two years time the work you're doing now might seem rather simplistic and quaint to you, due to your likely much greater "maturity" in relevant subject-matter knowledge by then.


[*] You mentioned this in a comment. You should probably include this information in your question, but perhaps omit the name of the college.


I recommend considering doing a more advanced independent study course with an appropriate faculty member, impress the faculty member, and ask this faculty member be one of those who will write a letter of recommendation for you when you apply to graduate programs. And also do what @Dan Romik suggests.