![]() This is fine if you need to find the sum of a small set of terms. There’s a more Pythonic way to do it: # Python 3.11 Keep in mind that range(1, 5) means “a range of integers starting at 1 and going up but not including 5.” In other words, it means “1, 2, 3, 4.” You could express this calculation in Python this way… # Python 3.11 If you write out this sum one term at a time, starting with n = 1 and ending with n = 4, you get this… So you can read the equation pictured above as “The sum of all the values of 2n + 3, starting at n = 1 and ending with n = 4.” The thing above the Σ specifies the final value of the index variable, which in this case is 4.The thing below the Σ specifies the index variable - the variable we’ll use for counting terms in the series (which in this case is n) - and its initial value (which in this case is 1).The thing to the right of the Σ describes each term in the series: 2n + 3, or as we’d say in code, 2 * n + 3.The series in question is determined by the things above, below, and to the right of the Σ: ![]() Σ, or sigmaĪs explained in the infographic above, the letter Σ - called “sigma” - is the Greek equivalent of our letter S. So welcome to the first article in the Math WTF series, where I’ll explain something you’re likely to run into when reading notes or papers on AI and data science: the Σ symbol. I’m going to keep it as layperson-friendly as possible, and in the end, you’ll find yourself understanding stuff like the page I posted above. Over the next little while, I’m going to post articles in a series called Math WTF that will explain the math that you might encounter while learning AI and doing programming. It can’t be helped - machine learning and data science are at the root of the way artificial intelligence is currently being implemented, and both involve number-crunching.Īnd now, the good news: I’m here to help! I’m decent at both math and explaining things. There’s linear algebra, continuous functions, statistics, and a dash of calculus. If you’re planning to really get into AI programming and take great pains to avoid mathematics, I have good news and bad news for you.įirst, the bad news: A lot of AI involves “college-level” math. For many, the first reaction upon being confronted with it would be something like “What is this ℝ thing in the second paragraph? What’s with the formulas on the first page? What the hell is that Σ thing? This is programming…nobody told me there would be math!” This is the sort of material that sends people running away screaming.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |