Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Math

Awesome F# - Decision Trees – Part II

In my previous post I went over the theory behind the ID3 algorithm . Now that we got all that painful math out of the way, let’s write some code! Here is an implementation of the algorithm in F#. (It is also attached to this blog post, download it via
Posted by ChrSmith | 3 Comments
Filed under: , ,

Attachment(s): ID3.fsx

Sieve of Eratosthenes in F#

If you don’t know what the Sieve of Eratosthenes is, don’t worry because a few days ago neither did I. But in short it is a very simple way to calculate prime numbers. Essentially you loop through all integers and keep a list of numbers which are known
Posted by ChrSmith | 3 Comments
Filed under: ,

F# and Markov Chains, oh my!

Recently I started playing a collectable card game after some friends got me into it. (Who themselves got back into it after some friends of theirs started playing. Witness the economic potential of viral card games!) As it turns out, I am a pretty poor card player I figured I would get into the business of collecting cards. Which is fun, you can do alone, and requires no skill. I figured I would answer the question “If I started from scratch, how many booster packs would it take for me to collect the whole set”. Well, since booster packs give you cards randomly the best you can shoot for is a confidence interval.
Posted by ChrSmith | 2 Comments
Filed under: , ,
 
Page view tracker