<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anastasia Kaiser on Medium]]></title>
        <description><![CDATA[Stories by Anastasia Kaiser on Medium]]></description>
        <link>https://medium.com/@a.i.gorina?source=rss-1293a63e9201------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*09nmH7ED1erYa-igzIm3rw@2x.jpeg</url>
            <title>Stories by Anastasia Kaiser on Medium</title>
            <link>https://medium.com/@a.i.gorina?source=rss-1293a63e9201------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 12:16:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@a.i.gorina/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Starting with Web Development as a Data Scientist]]></title>
            <link>https://medium.com/@a.i.gorina/starting-with-web-development-as-a-data-scientist-eb85bf57576e?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb85bf57576e</guid>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Mon, 24 Aug 2020 16:41:54 GMT</pubDate>
            <atom:updated>2020-08-24T16:41:54.231Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*am1goMjVjxDVWRj3DnG7lQ.jpeg" /><figcaption>Image: Pixabay</figcaption></figure><p>I need to admit: I am absolutely obsessed with learning new things. If I discover that there exists some cool area of studies and there are resources to learn the basics of it, I won’t rest until I get to know what the hype is all about. This happened with physics, then math, then python programming, then data science, and now my newest craze is web development.</p><p>The closest I have ever gotten to the glorious world of web dev was when I was styling my blog on LiveJournal with basic HTML at the age of 14. Today I code in Python and SQL, can analyze and obtain data, even build machine learning models, but web development was something completely new.</p><p>Naturally, I had to learn it. It has been two weeks since I have started with this journey and I want to share what I have accomplished. This post may help those who also want to start learning web development and make experienced developers smile and say ‘That’s cute’.</p><h4>HTML and CSS</h4><p>Of course I have heard of this golden duo and familiarized myself with the basics when I was using Selenium for web scraping in order to obtain my data. But this time I was on the other end of it: I had to write HTML and CSS instead of looking for elements on an existing web page.</p><p>Hypertext Markup Language is used to structure the web pages and it uses so-called elements. Elements are enclosed in tags (e.g.<strong>&lt;div&gt;&lt;/div&gt;</strong>), and tags can have attributes (&lt;div <strong>class=”header”</strong> &gt; &lt;/div&gt;), and these attributes are extremely useful when you style the page with CSS.</p><p>Cascading Style Sheets allow developers to make the page beautiful: use fonts other than Times New Roman, make images appear at the center (left side, right side) of the page, change the background color and much much more.</p><p>To create a page, you need to create a directory on your local machine and at least two files: one <em>index.html</em>, and one <em>style.css.</em> They will be connected in the &lt;head&gt;&lt;/head&gt; element of the html document in the following way:</p><pre>&lt;link rel=”stylesheet” href=”./style.css”&gt;</pre><p>This element basically tells the html document (actually, it tells the browser) that all the instruction of <em>how </em>to display the page, or how it should be styled, can be found in the file with the relative path ‘./style.css’.</p><h4>JavaScript</h4><p>This was a new programming language that I had to learn, which was different in syntax (among other thing) from already familiar python. Here are the differences that I have noticed…</p><p>First of all, comments. We comment out the lines in Python by using ##, but JS developers use // for single line, and /*, */ for multiple line comments.</p><p>Second, the first thing you do when you learn how to code, is printing the infamous ‘Hello World’.</p><pre>Python: &gt;&gt; print(‘Hello World’)</pre><pre>JS: &gt;&gt; console.log(‘Hello World’)</pre><p>Console is a keyword that refers to an object, a collection of data and actions that we can use in our code. It basically tells the console to log what’s inside the parentheses.</p><p>Next, variables. It turns out, that before 2015 (or before <a href="http://es6-features.org/#Constants">ES6</a>) people used the keyword <em>var</em> in their declarations. Now there are two keywords: <em>let</em> (the one that can be changed later by reassigning it a different value) and <em>const</em> (the one that can’t be changed later). Compare:</p><p>Python:</p><pre>my_name = “Anastasia”</pre><pre>print(my_name)</pre><pre>&gt;&gt; Anastasia</pre><p>JS:</p><pre>const myName = “Anastasia”</pre><pre>console.log(myName)</pre><pre>&gt;&gt; Anastasia</pre><p>Finally, what really impressed me in the first week of learning JavaScript, is how fascinating JS functions are. In Python we have lambda (unnamed functions) and regular functions:</p><pre>def greet_world():</pre><pre> print(“Hello World”)</pre><p>In JavaScript there are many ways to declare a function and assign them to a variable:</p><pre>function greetWorld() {</pre><pre>  console.log(“Hello World”)</pre><pre>}</pre><p>This was the traditional way. There’s also something called function expressions, which is another way to define a function, where the name is usually omitted (anonymous function). These functions are usually stored in a constant variable:</p><pre>const calculateArea = function(w, h) {</pre><pre>  const area = w*h;</pre><pre>  return area;</pre><pre>}</pre><p>And there’s even a shorter way to write functions by using something called Arrow Functions. These guys have interesting syntax, but once you’ve written a bunch of them, you’ll get used to it:</p><pre>const calculateArea = (w, h) =&gt; {</pre><pre> const area w*h;</pre><pre> return area;</pre><pre>}</pre><p>I will post more about learning web development in the shoes of a data scientist, as I continue learning!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb85bf57576e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science Process: Summary]]></title>
            <link>https://medium.com/@a.i.gorina/data-science-process-summary-865abd16183d?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/865abd16183d</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Mon, 17 Aug 2020 17:06:14 GMT</pubDate>
            <atom:updated>2020-08-18T18:00:41.669Z</atom:updated>
            <content:encoded><![CDATA[<p>Once you begin studying data science, you will hear something called ‘data science process’. This expression refers to a five stage process that usually data scientists perform when working on a project. In this post I will walk through each of them, describe what is involved and what technologies are normally used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CW7H1It7z8NcUsA94s5IdA.png" /><figcaption>Screenshot from one of my presentations: logos from Selenium, picture from Pixabay, Plotly logo, Scikit-learn logo</figcaption></figure><h4>1. Data Acquisition</h4><p>When you are just studying data science, your data may be already given to you by your instructors. Also, you can find a lot of beautiful datasets on <a href="https://www.kaggle.com/">Kaggle.com</a> or <a href="https://datasetsearch.research.google.com/">Google Dataset Search</a>. In this case data acquisition is pretty simple, just download the dataset and you’re all set to go.</p><p>In real life it is a little trickier. To obtain data in a format you need you will probably be using API’s or web scraping and your basic knowledge of HTML in order to obtain everything you need. In one of my earlier posts I described how I obtained the data about beauty products from <a href="https://www.sephora.com/">Sephora.com</a> using Selenium and BeautifulSoup.</p><p><em>Technologies used: HTML, SQL, Selenium, BeautifulSoup.</em></p><h4>2. Data Cleaning</h4><p>Again, if the dataset was already given to you by your instructors, or you got it on one of the websites mentioned above, there’s a good chance that your data is already clean. However, in most cases there will be some cleaning required. You need to handle the missing values (and be smart about it), make sure that all the columns are in correct datatypes (date-time, integers, floats, strings, etc.), all column names don’t contain spaces (especially important if you’re using NLP to perform analysis and modeling). Check out my post <a href="https://medium.com/swlh/beginners-guide-to-data-cleaning-1c3f4bc475e8">Beginner’s guide to data cleaning</a> for more information.</p><p><em>Technologies used: Pandas, NumPy</em></p><h4>3. EDA</h4><p>EDA stands for Exploratory Data Analysis. At this stage of the process you need to get to know your data. What is the shape of the table? How many rows and columns there are? What are the data types (to make sure you cleaned properly)? How the numeric values are distributed? Is there some sort of correlation/multicollinearity? Is there <a href="https://towardsdatascience.com/class-imbalance-problem-in-classification-a2ddaba98f4a">class imbalance</a> if you want to perform classification? You need to answer all these questions and more before you get to the next stage. I would just write down all the questions I have and try to answer them one by one. This stage is also very important if you are about to present the results to a non-technical audience. While exploring your data in a meaningful way, you will create beautiful visualizations. And someone with no background in math and coding will better respond to an interactive 3D map rather than to you saying “My adjusted R² is 0.92!”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XaW0wYKSnAIIz3Bcs9EuMg.png" /><figcaption>Screenshot from one of my project presentations</figcaption></figure><p><em>Technologies used: Pandas, Numpy, Matplotlib, Seaborn, Plotly (GO and Express)</em></p><h4>4. Modeling</h4><p>This is the most fun part (IMO). After all the preparation you get to create a machine learning/deep learning model that will make some sort of predictions. This can be a simple linear regression, multiple regression, classification, time series, NLP analysis, or a huge computer vision project with image recognition. Describing how each and every one of these works is beyond the scope of this post, but check out my <a href="https://medium.com/datadriveninvestor/it-depends-3d9af77f99f1">earlier post</a> about how to talk about regression with babies and I’m-really-bad-at-math people.</p><p><em>Technologies used: Scikit-Learn, SciPy, NumPy, Keras, Tensorflow, PyTorch, XGBoost, and many, many more (really depends on what you’re trying to model).</em></p><h4>5. Model Interpretation and Applications</h4><p>The results of your model are probably going to look something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQC_LOo0tkeV8ie_bDRxpQ.png" /><figcaption>Screenshot of my project: binary classification with XGBoost</figcaption></figure><p>What the heck does this all mean? You can’t just go to the investors and marketing department and say something like ‘my validation accuracy achieved 93% after I handled the class imbalance’ or ‘the proportion of the variance for a dependent variable y is explained by independent variables X by R-squared of 0.75’, you will immediately hear back “English, please!”.</p><p>The goal of the final stage of the data science process is to learn how to translate back from Math to English. It doesn’t matter how high or low your adjusted R² or validation accuracy is if you can’t explain what it means in real life.</p><p>The results of this whole data science process can be wrapped up in a presentation or they can be used to build a useful web application or some other sort of software. You will need basic knowledge of web development to make it happen, but if I built an app in four days, you certainly can too! Here’s a <a href="https://medium.com/datadriveninvestor/how-i-built-a-front-end-for-one-of-my-ml-projects-19396c07b821">post</a> about how I did it.</p><p><em>Technologies used: Your knowledge of math for data interpretation, Flask and Dash for creating a front-end.</em></p><p>This is a quick summary of what a data science process looks like in a nutshell. Of course, there’s more to it in real life, but if you’re just learning, it’s a nice structure to stick to. Enjoy your data!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=865abd16183d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL 101]]></title>
            <link>https://medium.com/@a.i.gorina/sql-101-2616d7064320?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/2616d7064320</guid>
            <category><![CDATA[beginner-coding]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Fri, 07 Aug 2020 19:49:27 GMT</pubDate>
            <atom:updated>2020-08-07T19:49:27.062Z</atom:updated>
            <content:encoded><![CDATA[<h4>What I wish I knew one year ago</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ezzijA-C-0cIgsD7oyy7Hw.png" /><figcaption>Image: TutorialRepublic</figcaption></figure><p>Fresh out of college I was applying for jobs, looking for companies hiring entry-level data scientists and analysts. I had experience with Python programming and a degree in applied mathematics, which made me thinking that it would be enough. It wasn’t. One sunny afternoon I was feeling pretty good completing a coding challenge in Python (god bless FizzBuzz) for one of the companies that I was very interested in. But after I was done, the interviewer said: ‘Now let’s test your SQL’. I panicked. I had zero experience with this programming language and didn’t even know what SQL stands for. I confessed to the interviewer and noted that I am a very fast learner. She said that it’s not a problem, but they ended up hiring someone else. I have learned my lesson and decided to learn SQL asap. If you are in the same position right now as I was a back then, keep reading, I hope I can help!</p><h4>Terms to know</h4><ul><li>SQL stands for Structured Query Language. When you code in SQL, you are ‘querying’ the data, communicating with the information stored in RDBMS.</li><li>RDBMS stands for Relational Database Management System. There are several, and you’ve probably heard of them: MySQL, PorstgreSQL, Oracle DB, SQLite, etc. Fun fact: there are different ‘dialects’ or ‘flavors’ of the query language, corresponding to each of the RDBMS.</li><li>Database and Relational Database. Databases organizes and stores data into one or more tables, that are <em>related</em> to each other (orders and customers, professors and departments, etc.). This data can be queried and analyzed.</li></ul><h4>Data Types</h4><p>Most popular data types in SQL are: integer, text, date (“YYYY-MM-DD”), Null (in Python these values are called NaN), and real (float in Python).</p><h4>Syntax</h4><p>Statements are usually ended with a semicolon (;), tasks, such as creating or altering tables are called clauses, most of the code is written in capital letters. Here’s how a line of SQL code would look like:</p><pre>SELECT * FROM table;</pre><p>Here, the asterisk (*) indicates that we need all the information from the table.</p><p>We can also CREATE TABLE or insert some information into one:</p><pre>INSERT INTO my_cats(name, age, breed)</pre><pre>VALUES(‘Mittens’, 1, ‘Maine Coon&#39;);</pre><h4>Commands</h4><p>The goal of writing SQL commands is to retrieve the information stored in a database — ‘querying’. Here are some examples. Say we want to figure out how many unique cat breeds we have in our table:</p><pre>SELECT DISTINCT breed</pre><pre>FROM my_cats;</pre><p>Or, if we want to look at older cats, we can use a query restriction ‘WHERE’:</p><pre>SELECT * FROM my_cats</pre><pre>WHERE age &gt; 8;</pre><p>We can also look at cats that are between certain ages, using ‘BETWEEN’:</p><pre>SELECT * FROM my_cats</pre><pre>WHERE age BETWEEN 5 and 8;</pre><p>‘BETWEEN’ works with text, too!</p><h4>Order by and Group By</h4><p>Just like in Pandas, we can use ‘group by’ command to analyze our data by displaying it in a specific way. ORDER BY sorts the result, and you can specify how: ASC (A-Z, 1–10), or DESC (Z-A, 10–1). You can also specify how many rows you want to see by using ‘LIMIT’. Say, we want to figure out who is our oldest cat:</p><pre>SELECT * FROM my_cats</pre><pre>ORDER BY age DESC </pre><pre>LIMIT 1;</pre><p>GROUP BY , as the name suggests, groups data by some category: cats per breed, movies by genre, etc.</p><p>Here is a little cheat sheet that I still use and find very helpful. The order of statements in your query matters:</p><p>GROUP BY -&gt; HAVING -&gt; ORDER BY -&gt; LIMIT</p><p>WHERE -&gt; GROUP BY -&gt; ORDER BY -&gt; LIMIT</p><p>Notice a new word: HAVING. It is like WHERE, but to filter groups, and WHERE is for the rows.</p><h4>Aggregate Functions</h4><p>Aggregate functions are calculations performed on multiple rows of a table. These are used to calculate basic statistics and answer questions like ‘What is the average age of my cats? What about average age per breed?’, ‘What is the total number of money I made last month?’.</p><ul><li>COUNT() — calculates the number of non-empty rows</li><li>AVG() — calculates the mean of a numeric column</li><li>MAX()/MIN() — returns largest or smallest value in a column</li><li>SUM() — sums all the numeric values in a column</li><li>ROUND() — rounds values in a column. Important: you need to specify to how many decimal points you want the value rounded: ROUND(AVG(age), 2) — rounds the average age to two decimal points. Very useful for data interpretation.</li></ul><h4>When data in stored in multiple tables</h4><p>As mentioned above, it is not always meaningful to store all data in one table. Sometimes it is better to have all the information about out cats divided into several tables. But in order to not get confused and be able to query the entire database, we need to relate these tables. Say we have a table with the description of our cats (id, name, age, breed), but we also keep record of their activities (id, activity, duration, etc). In each table there is a unique identification, the id column. This column is called the primary key. Important: none of the values in the primary key column can be null, each value must be unique, and only one column in a table can be the primary key column. Also, when primary key appears in a different table, it is called foreign key. For instance, in the activity table, cat_id would be the foreign key.</p><p>If we want to manipulate our data stored in different tables we need to join them somehow. Here is how the join query would look like:</p><pre>SELECT * FROM my_cats</pre><pre>JOIN activities</pre><pre>ON my_cats.id = activities.cat_id;</pre><p>There are several types of joins and it’s important to know them.</p><ul><li>Inner join returns rows with at least one match in both tables</li><li>Left join returns rows from left table and the matched rows from right table</li><li>Right join returns rows from right table and the matched rows from left table</li><li>Outer join (Full join) returns rows with a match in either of the two tables</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*vW6SU3f2lkHCKKBVyaQKQw.png" /><figcaption>Illustration: Educba</figcaption></figure><h4>Practice</h4><p>One thing I learnt is that you can spend hours watching YouTube tutorials and reading about the theory of SQL, but the only way to actually get familiar with this programming language is through practice. Where?</p><ul><li><a href="https://www.codecademy.com/catalog/language/sql">Codecademy</a> — fantastic way to learn the basics and practice it. Highly recommend!</li><li><a href="https://learn.datacamp.com/courses/tech:sql">DataCamp</a> — After the first free chapter it gets a bit pricey, but at least do the introduction, you will definitely learn something even from the free part of the course.</li><li><a href="https://www.hackerrank.com/dashboard">Hackerrank</a> — Loved by technical recruiters, Hackerrank gives you a ton of coding challenges of three levels of difficulty. After reading and completing some online courses it is probably the best way to challenge your skills.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2616d7064320" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Statistically better burger]]></title>
            <link>https://medium.com/@a.i.gorina/statistically-better-burger-f3f266b97381?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/f3f266b97381</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Fri, 31 Jul 2020 19:30:20 GMT</pubDate>
            <atom:updated>2020-07-31T19:30:20.469Z</atom:updated>
            <content:encoded><![CDATA[<h4>Hypothesis testing and NYC fast food</h4><p>In class professors usually give very boring examples to explain statistical testing. Why would you care about the average height of men and women? Or the weight of elephants? Let’s perform hypothesis test on something that is more fun and useful in real life. Burgers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-AUSVMkl10LwrnqQRWO4g.jpeg" /><figcaption>Image: Pixabay</figcaption></figure><p>There exist a lot of burger chains in the US, and maybe I will compare more of them with each other later (ANOVA?), but for now let’s focus on a simple T-test to compare two means. We have Shake Shack (my personal favorite) and its competitor, McDonald’s. I found the table with nutritional information about their menu items and decided to check if Shake Shack’s food is lower in calories, cholesterol, fat, etc. and higher in fiber than food in McDonald’s. Because that would be an indication of a statistically better fast food.</p><p>So, let’s state the <strong>Null Hypothesis</strong>: There is no significant difference in calories, cholesterol, fat, etc. If you want a burger, either of the chains are equally harmful to your health.</p><p><strong>Alternative Hypothesis: </strong>SS is better than McD, and if you want a burger, go there for a healthier option.</p><p>In order to accept the alternative hypothesis we need to perform the T-test comparing two means, and get the p-value. Let’s recall: if a p-value is small (p&lt;0.05), we can safely reject the null hypothesis and conclude that SS is healthier. If it is large, we can’t reject the null and are forced to assume that all fast food is equally bad. But let’s look at the distributions first!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*wpYScs3aMsa2rsBogOOKNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*Ku3RvJzekca3Q3W6QL69Xg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*c8tEGVXRZqQ2kGilru9U0A.png" /></figure><p>Even without hypothesis testing we see that food in McDonald’s is not the obvious choice for those who care about their health. But to prove it, we need to actually perform the test. It is done with just one line of code thanks to scipy.stats:</p><pre>stats.ttest_ind(c_mcd[‘Calories’], c_ss[‘Calories’])</pre><p>Here, c_mcd and c_ss are the two dataframes I was using.</p><p>With statistic=-7.12 and p-value=2.1e-12 for calories, I am concluding that Shake Shack is a better treat if you are on a diet. Also, with statistic=-11.5 and p-value=7.04e-29 for cholesterol, I am also concluding that Shake Shack is good for people watching their cholesterol. Same test for other categories made me certain that Shake Shack is better if you care about your health.</p><p><a href="https://github.com/agorina91/burgers">GitHub repo</a></p><p><a href="https://www.kaggle.com/mcdonalds/nutrition-facts">McDonald’s Menu</a></p><p><a href="https://cdn.shakeshack.com/wp-content/uploads/2016/11/SHA_NutritionFacts_ShakeShack-10.27.17.pdf">Shake Shack Menu</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3f266b97381" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 branches of math to get started with data science]]></title>
            <link>https://medium.com/@a.i.gorina/3-branches-of-math-to-get-started-with-data-science-eb640a594f22?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb640a594f22</guid>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[calculus]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[linear-algebra]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Sat, 25 Jul 2020 23:12:19 GMT</pubDate>
            <atom:updated>2020-07-25T23:12:19.784Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VdacD6Qmdio6JoqU3dTvyg.png" /><figcaption>My mid-semester notes on Linear Algebra</figcaption></figure><p>Data science combines different fields of study, and it is essential to understand logic and know how to code. But the fundamental thing about it is certainly mathematics. Without it you won’t have any profound understanding of how the algorithms work, functions function (sorry), and machine learning models improve.</p><p>I got interested in data science when I was a math student, so in a way, I got lucky. But I truly believe that in the XXI century a person who wants to become a data scientist one day can learn the basics of math just by using free or very affordable resources available online. To be honest, even though I studied math as an undergraduate student, attended lectures and office hours, I still had to educate myself a lot.</p><h4>#1 Linear Algebra</h4><p><strong>Why:</strong></p><p>Data scientists study, um, well, data. And data is usually structured before it is somehow manipulated and investigated and used to build machine learning models. And usually what you want to work with is a table. And a table from a mathematical point of view is a matrix. Linear algebra is a branch of mathematics that deals with vectors and matrices, which also represent systems of linear equations. For example, imagine you work with the following table:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*Zyje5rV7DCUvMI2Wty-ymw.png" /></figure><p>You generally understand what is happening here. Tom started off as a great student, but maybe partied too much on his second year, Lucy will probably graduate with honors, etc. But if you try to make some predictions, not only you, but your mathematical model has to ‘understand’ the picture. For a mathematician (and the model) this table will be a 3x3 matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*cBSJgdXSA6VoR7JlNqnRkg.png" /></figure><p>That is something scientists can actually work with.</p><p><strong>Where to learn:</strong></p><p><a href="https://www.youtube.com/playlist?list=PLAFEC355DFEADC30C">Linear Algebra by PatrickJMT</a> Not only does he give the definitions and state theorems, he also gives some very digestible examples and walks you through them. He saved my life more times than I can count and a lot of people would say the same (just read the comments below his videos).</p><p><a href="https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab">Essence of Linear Algebra by 3Blue1Brown</a> If you were ever curious about math, you have already heard of 3Blue1Brown. His series <em>Essence of Linear Algebra </em>will help you develop the intuition behind vectors, matrices, linear transformations, determinants, and so on. Developing intuition is probably even more important than just knowing how to compute something by hand, so pay attention and enjoy his beautiful videos.</p><p>There are also some good structured courses online provided by <a href="https://www.khanacademy.org/math/linear-algebra">Khan Academy</a>, <a href="https://www.coursera.org/learn/linear-algebra-machine-learning">Coursera</a>, and <a href="https://ocw.mit.edu/courses/mathematics/18-06-linear-algebra-spring-2010/">MIT OpenCourseWare</a>.</p><p>When you’re done, check out my posts about <a href="https://medium.com/@a.i.gorina/why-do-we-always-have-to-compute-the-determinant-585cef263a48">determinants</a> and <a href="https://medium.com/swlh/singular-value-decomposition-and-why-it-matters-5534fdff3f22">singular value decomposition</a>! They explain even further why you need to learn linear algebra for data science.</p><h4>#2 Calculus</h4><p><strong>Why:</strong></p><p>Usually math students study calculus I, II, III and sometimes IV, so it takes a while to understand everything that Newton invented while self-isolating during the plague. Calculus is studied to understand the derivatives and integrals. But before you get to differentiate the functions you will need to understand the limits, and before integrating, you will need to understand the derivatives and the Sigma-notation. So you get it, it does take time. So why study it at all?</p><p>Without knowing differential calculus you won’t be able to understand how to optimize your loss function, for example. Your model will be making predictions, but how far these predictions are from the truth? You want them to be pretty close, right? Calculating and optimizing the error function is very important in data science and machine learning. And it is studied in calculus.</p><p><strong>Where to learn:</strong></p><p><a href="https://www.youtube.com/watch?v=cIVpemcoAlY&amp;list=PL58C7BA6C14FD8F48">PatrickJMT</a> Again. I can’t recommend his videos enough. His playlist <em>Calculus/First semester </em>covers everything from trigonometry to limits, from concept of continuity to derivatives, from derivative rules to function optimization. This should really be enough to get started.</p><p>You guessed it. <a href="https://www.youtube.com/playlist?list=PLZHQObOWTQDMsr9K-rj53DwVRMYO3t5Yr">Essence of Calculus by 3Blue1Brown</a> is the best way to develop intuition.</p><p><a href="https://play.google.com/store/books/details?id=hEF-BAAAQBAJ&amp;gl=us&amp;hl=en-US&amp;source=productsearch&amp;utm_source=HA_Desktop_US&amp;utm_medium=SEM&amp;utm_campaign=PLA&amp;pcampaignid=MKTAD0930BO1&amp;gclid=CjwKCAjwsO_4BRBBEiwAyagRTQDDFl5se7ctxlhFR3cb-qrIHwaNcMBOGL2RZOhl7Tw9bt8jSSbV4hoCSCoQAvD_BwE&amp;gclsrc=aw.ds">Stewart Calculus: Early Transcendentals</a> If you are really serious about learning calculus, here is the bible of it. It is huge, heavy, and expensive, but it contains <em>everything </em>you need to know. I used this book in all my calculus classes (I-IV). You can even check your answers on <a href="https://www.slader.com/textbook/9781285741550-stewart-calculus-early-transcendentals-8th-edition/">Slader</a>, just don’t cheat.</p><h4># 3 Statistics</h4><p><strong>Why:</strong></p><p>Statistics is a heart and soul of data science, but I feel a little uncomfortable calling it a branch of mathematics, when it is actually a separate discipline and science. If you made it this far and are pretty serious about data science, you probably understand why you need to learn statistics. So let’s better talk about where to learn it.</p><p><strong>Where to learn:</strong></p><p><a href="https://www.youtube.com/playlist?list=PL8dPuuaLjXtNM_Y-bUAhblSAdWRnmBUcr">Crash Course Statistics with Adriene Hill</a> All Crash Course series on YouTube give fun, colorful, animated videos that explain the fundamentals of some topic.They are very entertaining to watch and help you truly understand, not just learn how to calculate something by hand. I highly recommend starting with this course, just because from now on your brain will link statistics with something cheerful and fun. And trust me, this science can be very frustrating at times.</p><p><a href="https://www.google.com/books/edition/Statistics_For_Dummies/klEzDAAAQBAJ?hl=en&amp;gbpv=1&amp;printsec=frontcover">Statistics For Dummies</a> This book helped me a lot. When I failed to understand some concepts in class and homework was making it even more confusing and frustrating, I would take this book and bam! — I get it!</p><p><a href="https://www.google.com/books/edition/An_Introduction_to_Statistical_Learning/qcI_AAAAQBAJ?hl=en&amp;gbpv=1&amp;printsec=frontcover">An Introduction to Statistical Learning: With Applications in R</a> This is a very very VERY serious book written by super smart scientists for super smart people. It also has a sequel, called <a href="https://web.stanford.edu/~hastie/ElemStatLearn/">The Elements of<br>Statistical Learning</a>, which is even smarter and even more serious. I don’t think that it is suitable for beginners, but when you understand every concept in statistics both calculus-based and non calculus-based, you can open this masterpiece and dive into the beautiful world of machine learning. Despite the name, it is also helpful if you code in Python, not just R.</p><h4>In conclusion</h4><p>There is a lot more math to learn to become an actual data scientist. These recommendations are for those who are just getting started, but are serious about data science and willing to learn and practice. And those are my personal recommendations, so don’t get offended if I missed some of your favorite courses!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb640a594f22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is the Data Science bootcamp right for you?]]></title>
            <link>https://medium.com/data-science/is-the-data-science-bootcamp-right-for-you-65ff341edd39?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/65ff341edd39</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[bootcamp]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Wed, 15 Jul 2020 20:12:24 GMT</pubDate>
            <atom:updated>2020-07-21T02:04:19.181Z</atom:updated>
            <content:encoded><![CDATA[<h4>Sharing a personal story that may help you make a decision</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nHS7PWvsegTG5qbGCrTDKQ.jpeg" /><figcaption>Image: Pixabay</figcaption></figure><p>These days a lot of people are exploring the option of joining a coding bootcamp if they what to break into tech. More and more people realize that being ‘nerdy’ and ‘geeky’ is a good thing, working with technologies is cool, and knowing how to code is the new kind of literacy. However, not everyone is ready to go back to school for another four-five-seven years to get a traditional degree. Enter the bootcamps. In just a few months they promise to give you all necessary skills and knowledge to become a developer, or a data scientist, or a UX designer, or a cyber security professional. What’s that catch, right?</p><p>I’d like to share my personal story that will hopefully help you make a decision.</p><h4>Background</h4><p>As many people who want to join a bootcamp, I’m a career changer. My first degree was in journalism (BA and MA from Moscow State University), and I have been working in science journalism for several years when I lived in Moscow. My special skill was to read a science paper, understand what the researchers did, and translate it into a ‘human’ language. After some time of writing about the heroes, I wanted to become one.</p><p>I moved to New York and I remember studying math for several hours every day as a hobby. I was really passionate about it, but didn’t even hope that my hobby would change my future. Until I decided to test my luck and apply to Columbia University. I know, this story is supposed to be about the bootcamp, not the traditional education, but bear with me.</p><p>After graduating with a degree in applied mathematics, I didn’t even know what to do with it. I wanted to do research and analytics, but there was one big problem: I didn’t have any marketable skills. Honestly, who would pay a woman for solving differential equations by hand?</p><p>That’s when my friend told me about coding bootcamps. I knew that I didn’t want to study software engineering, I wanted to study something a little more heavy on math. So I picked data science.</p><h4>Application Process</h4><p>There are several bootcamps in New York city that teach data science. Some only accept applicants with a PhD in technical discipline, some are more competitive, some a less, but in my experience that application process is similar across all of them. First, it’s a good idea to book a campus tour and actually breath the same air as the students breath. Watch them work, interact with the instructors, feel the atmosphere, ask as many questions as possible. After all, you also need to understand what your daily commute would be like once you get in.</p><p>Next, you need to fill a form, where you talk about yourself, your background, and your experience with coding. And yes, you do need some experience with coding, or at least a burning desire to learn how to code. I recommend starting with free or very affordable courses, such as youtube tutorials or Codecademy. If you are like me and interested in data science, you need to know the fundamentals of Python and SQL.</p><p>After that, you need to complete the first part of the pre-work that will be sent to you after you apply. There will be some programming, some linear algebra, some calculus. You guessed, the math part was pretty easy for me, but I promise, there is nothing you can’t learn with some passion and determination. Then come the interviews.</p><p>There will be two interviews — cultural and technical. Cultural interview is the chance for you to show that you are interested, share your story, ask questions, and demonstrate determination and eagerness to learn. This is important: bootcamps are called bootcamps for a reason, you are expected to learn and do a lot of work by yourself, without people ‘spoon-feeding’ you the skills. Technical interview is the stressful part (at least it was for me). For data science program, there will be two parts: programming and math. You will be asked to share your screen with the interviewer and complete some fairly simple challenges (they will be simple if you honestly did the pre-work). The important part here is not to panic: they are not trying to trick you, don’t overthink the questions.</p><p>If you passed both interviews, you’re in. If not, they will ask you to level up your skills and try again in three to four months. Once you’re in, you need to complete the second part of the pre-work, it will get you ready for day one. There will be more coding, learning how to use the command line, and other fun and exciting stuff.</p><h4>Structure of the course</h4><p>The bootcamp where I studied data science offered a fifteen-week full time program. What does it mean? There were 12 weeks of studying and 3 final weeks of working on your most important final project. Those 12 weeks were roughly divided into 7 modules, each of those modules covered a specific data science topic: Python programming, SQL programming, statistics, regression, classification, natural language processing, time series analysis, deep learning, and many more.</p><p>The first few weeks are mostly introductory, so it is important to pay attention. There will be lectures — make notes and ask questions. There will be working alone on so-called labs, and there will also be pair programming. You are expected to learn how to work on your own and with a partner.</p><p>Starting with Mod 4, your routine will be divided into two parts: lecture weeks and project weeks. During the lecture weeks you will learn from the instructors and do daily coding challenges with a partner. Project weeks are when you work on a topic of your choosing, but using the skills and technologies that you just covered: you can classify the pokemons for your classification project, predict the quality of wine for your regression project, analyze The New York Times articles for your natural language processing — anything you want. But keep in mind that these projects will later be on your resume, so don’t pick anything too wild.</p><h4>A day as a bootcamp student</h4><p>If you chose a full-time in-person program, you are expected to be on campus between 9 AM and 6 PM. It will be like your new full-time job. Attendance will be taken, so don’t make it a habit of running late or leaving early: if you’re present on campus less than 95% of the time, you won’t graduate.</p><p>Typically I would come to campus at 8:45–8:50 AM, get some coffee and get ready for the day. Almost every day at 9 AM sharp there will be a coding challenge. Our coaches would pair us up and send us to the lecture room. They will also send us a coding challenge (typically from <a href="https://www.hackerrank.com/">Hackerrank</a> or <a href="https://leetcode.com/">Leetcode</a>) and we would have 15–20 minutes to figure it out. The first pair to send the solution to the slack channel will explain it to the rest of the class. No grades, just practice.</p><p>Next, we would go back to our seats and work individually. You can do the labs and practice new skills, watch tutorials, research a new topic. Or, if it’s a project week, you are expected to be working on your project. Coaches and instructors are almost always there. And they’re there to help. You can pick their brains with your data science related questions at any time.</p><p>You have one hour to go get lunch in the afternoon, so you can choose between actually going out or just buying something to go and coming back to campus, because you are too excited about what you’re working on and don’t mind eating at the desk.</p><p>In the afternoon there will be lectures, typically one or two per day. This is your chance to gain as much knowledge as possible. Practicing your skills is extremely important, but these lectures are you chance to learn the fundamentals, and what’s happening under the hood, when you’re typing those two lines of code.</p><p>After lectures you’ll have a couple of hours to continue your individual work until you go home at 6 PM. Sometimes you’ll leave even later, but nobody will force you to stay after 6.</p><p>You are not expected to work at home in your free time, or do extra over the weekend. It is important to take care of yourself, and your coaches and instructors know it. But at least do some reading: new publications on Medium may be your inspiration for the next project.</p><h4>People</h4><p>The best part of being a full-time bootcamp student is people. All these amazing people that you get to know. There will be instructors who give lectures — these guys have real professional experience, and you should really pay attention to what they say. There are coaches, who are happy to help and answer any questions that you have (they give lectures sometimes too). There are students from the cohort start started before you, you can learn from their experience, there are students from the cohort that started after you, you can share your experience with them. Students from other programs, such as software engineers and UX designers, and finally, students from your cohort. These are your best friends and your family. You will work with most of them on the morning coding challenges, and with some of them you will spend an entire week working on a project, and later presenting it together to the entire class.</p><h4>Challenges</h4><p>Almost every student and former student that I personally talked to would describe this program as a roller coaster. There will be moments when you are absolutely amazed by what you just learned or did, there will be moments of complete frustration, when you don’t understand anything and the future seems hopeless. Sometimes these moments can be back to back. It is important to understand that even the best students don’t get some of the topics, but you need to make an effort and ask questions, talk to the instructors, do some research. You will get it eventually.</p><p>There were times when it seemed that I bit off more than I could chew. I remember panicking and figuring out the plan B, bugging the instructors and other students, trying to figure out things on my own. But looking back I’d say I did a pretty good job. I finished every project that I planned (not without help, of course).</p><h4>So is it right for you?</h4><p>It is if you:</p><ul><li>Are absolutely sure that programming should be a big part of your job and your life</li><li>Are not scared of math. Maybe a little scared, but you will never again say the words ‘I hate math’</li><li>Are ready to work hard</li><li>Need practical, marketable skills</li><li>Tried all the free programs and courses and need a more structured, and organized one</li><li>Are looking for connections in tech, and are open to making new friends</li></ul><p>It is NOT for you if:</p><ul><li>You were just casually browsing and asked yourself ‘why not join a bootcamp?’. Trust me, you’ll just lose your money, time, and every little bit of motivation</li><li>You have absolutely no idea what data science is, you just heard that it is ‘the sexiest profession of the century’ and decided to try</li><li>You are expecting to be ‘spoon-fed’ the information and skills</li><li>You are not a social creature. Not necessarily a 100% pure-bred extrovert, but you need to be comfortable working with people, asking questions, presenting in front of the class, etc.</li><li>The only thing that speaks to you in the bootcamp ad is the job placement rate. Bootcamps do work with excellent career coaches and employer partnership teams, but nobody will ‘get’ you a job the day after you graduate. Heck, I myself am still job hunting, three months after graduation. Their goal is to equip you with skills, knowledge, and resources to break into the field. The rest is up to you.</li></ul><p>I hope my story helps you make a decision. If you have any questions, I’d be happy to help. <a href="https://www.linkedin.com/in/anastasia-gorina/">Connect with me on LinkedIn</a>, and feel free to shoot me a message.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65ff341edd39" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/is-the-data-science-bootcamp-right-for-you-65ff341edd39">Is the Data Science bootcamp right for you?</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Partial differential equations. Part III: Schrödinger]]></title>
            <link>https://medium.com/@a.i.gorina/partial-differential-equations-part-iii-schr%C3%B6dinger-dbb66727a00d?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/dbb66727a00d</guid>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[quantum-physics]]></category>
            <category><![CDATA[differential-equations]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Sat, 11 Jul 2020 20:31:03 GMT</pubDate>
            <atom:updated>2020-07-11T20:31:03.477Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pmb0TzEwdU6mSfi479kwTQ.jpeg" /><figcaption>Image: Live Science</figcaption></figure><p>This is the third a final part of the series on partial differential equation. If you are reading this, I assume you have already read the first two parts, where I talk about the <a href="https://medium.com/@a.i.gorina/partial-differential-equations-part-i-waves-464830cea027">wave</a> and heat <a href="https://medium.com/@a.i.gorina/partial-differential-equations-part-ii-heat-75f6e500911d">equations</a>. If not, take a couple of minutes to familiarize yourself with these equations!</p><p>When talking about the PDE’s, it is hard to pick the most significant equations. Math professors would definitely walk you through the wave and heat equations, explain the <a href="https://sites.math.northwestern.edu/~mlerma/courses/math214-2-03f/notes/c2-logist.pdf">logistic</a> equations, and also spend several weeks discussing <a href="https://en.wikipedia.org/wiki/Laplace%27s_equation">Laplace’s equation</a>, since its solutions (so-called harmonic functions) are key to understanding gravity, fluid mechanics, electrostatics, and many other branches of physics.</p><p>But I would like to talk about the Schrödinger’s equation, since it is the heart and soul of quantum mechanics, the most mysterious and exciting theory in physics. And there is some magic happening when one’s trying to solve it.</p><p>Even non-physicists have heard of Schrödinger and his poor cat that is dead and alive at the same time for the sake of science: Erwin tried to illustrate the concept of superposition. But Schrödinger’s equation is telling a different story. It describes the wave function of a quantum mechanical system. Here is how it looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZaPECRg7hRsYE50Wh7tgzw.png" /></figure><p>The first symbol here, <em>i,</em> is an imaginary unit. It is simply a square root of -1. Second symbol, the <em>h</em>-looking one, is a constant, specifically, the reduced Planck’s constant, that is computed in a following way:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tIWJ-4rNDGYPL5EWBdlzwA.png" /><figcaption>h=6.62607015x10^-34 J s. It’s just a number</figcaption></figure><p>Moving forward: d/dt here, of course, refers to the first derivative with respect to time, and Psi is a function of time, which is essentially a state vector of a quantum system — that’s what we want to solve for. Finally, H with a funny looking hat is something called the Hamiltonian operator.</p><p>Note: the formula given above is a time-dependent version of the Schrödinger’s equation, there is also a time independent equation, we’ll get to it in a moment.</p><p>Since Psi describes the state of a quantum system, we need to understand that it is a function of both space (3 by 1 vector x) and time. Linear operators acting on the function correspond to <a href="https://en.wikipedia.org/wiki/Observable">observables</a>, and observables have well-defined values. In the case of our Hamiltonian operator (H with a funny looking hat), observable is energy, that is again, well-defined:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bk0c-RQEHBx-9kTkgru9XQ.png" /></figure><p>This is also known as time-independent version of the Schrödinger’s equation, and here E is a constant energy level of our quantum system. Another observable is the momentum operator, which is also well-defined:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OjYL12vGixv-DTF5s0nYlw.png" /></figure><p>In classical mechanics total energy of the system is a sum of its potential and kinetic energies, and KE and PE are also specifically defined.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CicPmyovC2lkCfyBWzgWZQ.png" /></figure><p>If we rethink the quantum system in terms described above, we can rewrite the Schrödinger’s equation in the following way (keep in mind that the vectors are 3-dimensional, so we have 3 x’s):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y9FKsmcGTAY7i2nB2y7vNw.png" /></figure><p>To solve this equation, we need to assume that our space is a circle. Why? Because in that case we can use Fourier series! Remember, Fourier series approximate functions as series of sines and cosines, and make solving partial differential equations manageable, we’ll just need to compute some coefficients by plugging in the numbers in Fourier’s formulas. If we want solve the equation above (let’s assume this time that we are talking about a free particle, aka V=0), we can do it the following way:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mzCcOAgb7g8-a7Sw6Ob99w.png" /></figure><p>Here comes magic. After rewriting this equation, we get another equation that states that the first derivative of a certain function (the one we are solving for) with respect to time is equal to some constant times the second derivative of the same function with respect to space. Let me make this even clearer:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*seRRbRpXC-3RT6F3c4cJTA.png" /></figure><p>Exactly! Our scary Schrödinger’s equation is reduced to the heat equation that is solvable using Fourier series (<a href="https://medium.com/@a.i.gorina/partial-differential-equations-part-ii-heat-75f6e500911d">we talked about it last time</a>). All we had to do is remember the definition of energy, make some assumptions, and carefully rewrite the equation. Finally, let me just give you the solution formula obtained by the same method as the heat equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*2Asy6e73UQDyD25UVs8x5g.png" /></figure><p>Sources:</p><p>My personal class notes, <a href="https://en.wikipedia.org/wiki/Schr%C3%B6dinger_equation">Wikipedia</a>, <a href="http://prof.usb.ve/bueno/Libros/069111384X%20-%20Princeton%20University%20-%20Fourier%20Analysis~%20An%20Introduction%20-%20%282003%29.pdf">Fourier Analysis textbook</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbb66727a00d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Partial differential equations. Part II: Heat]]></title>
            <link>https://medium.com/@a.i.gorina/partial-differential-equations-part-ii-heat-75f6e500911d?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/75f6e500911d</guid>
            <category><![CDATA[differential-equations]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[physics]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Thu, 02 Jul 2020 13:11:01 GMT</pubDate>
            <atom:updated>2020-07-02T13:11:01.140Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u3zz5uk5vp2vbxMflmjofA.jpeg" /><figcaption>A lot of heat</figcaption></figure><p>Let’s continue our discussion of PDE’s. Last time we talked about <a href="https://medium.com/@a.i.gorina/partial-differential-equations-part-i-waves-464830cea027">the wave equation</a> and d’Alembert’s formula which is a simple and elegant way to solve the initial value problem and find a unique solution.</p><p>This time let’s focus on something that’s called the heat equation and is also sometimes referred to as diffusion equation. This beast needs a lot more attention and understanding, but the heat equation is almost magical: a lot of partial differential equations after some manipulations boil down to the heat equation. Including the famous <a href="https://medium.com/@a.i.gorina/how-a-friend-of-napoleons-helped-the-modern-day-market-d818dfbf5fe5">Black-Scholes equation</a> that I discussed a while ago.</p><p>Here is how we usually write the heat equation in 1D:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*VEjE3c6r4G8wqVgVPryx8w.png" /></figure><p>Where <strong>u </strong>is a function of two variables, x and t, representing the temperature of a uniform material, and k is a constant that can be equal to 1 for simplicity. Unlike the wave equation, heat equation satisfies something called the maximum principle. Imagine heating a rod (with some length=L): after some time the temperature of the rod will even out, and the initially heated spot will cool down, there is no other scenario. Mathematically speaking, if we assume that the heat equation has a solution u(x, t) for x on an interval (0, L) and t on an interval (0, T), then this function u reaches its maximum over the rectangle (0, L)x(0, T) at either t=0 (the very first moment) or at the lateral sides of the rectangle (x=0)(x=L). Quick reminder, t is time and x is position.</p><p>Since it is easier to understand something through things that we already know, I believe it is best to look at how the wave equation and the heat equation differ from one another.</p><ol><li>Wave equation deals with finite propagation speed (&lt;1), when the heat equation deals with infinite propagation speed.</li><li>Wave equation can be solved both forward and backward in time (mathematicians say that it is symmetric with respect to time reversal), but heat equation can only be solved forward in time (aka not invariant under time reversal).</li><li>Maximum principle holds only for the heat equation.</li><li>Singularities (or jumps) in the initial data persist in later times and propagate with speed=1 for the wave equation. Heat: singularities in the initial data smooth out immediately.</li></ol><p>But wave and heat equation do share one thing (in fact, all PDE’s do): it is meaningless to just write down the equation, we need this little ‘<em>subject to</em>’ line. We need initial conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*Y_Af5ba4yZfg1LpmtEGLkw.png" /></figure><p>By uniqueness theorem, there could only be one bounded solution to the heat equation with this initial condition. And to understand it, I need to make a quick introduction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*TzYZVkaF9v_SDOJbD2V1pA.jpeg" /><figcaption>Joseph Fourier, Wikimedia Commons</figcaption></figure><p>A true hero on the battlefield of the heat equation is a French mathematician Joseph Fourier (1768–1830), who introduced and solved this problem. Fourier took a very interesting approach: he made an observation that functions can be represented (approximated) with a series of sines and cosines, which lead to the solution of the diffusion equation. So this function, Phi, that we see on the right hand side of the initial value problem can be approximated as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*HIUEdtGUkzdXy2w4BzxuuA.png" /></figure><p>Here A’s and B are so-called Fourier coefficients and this approximation is called Fourier series. It is similar to Taylor series expansion, but much more useful for solving partial differential equations, and especially the heat equation. The formula above is also called <em>full </em>Fourier series, but if the function Phi is odd, then it is enough to represent it as sine Fourier series (B-coefficient). Similarly, if Phi is even, it can be approximated with cosine Fourier series (A-coefficient).</p><p>So how do we calculate these A’s and B’s? All we need is the length of the rod that we are heating (L) and the function Phi itself. The formulas are given to the humanity by out brilliant friend Joseph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VWVOOFW_J1ganxOu6g0emg.png" /></figure><p>In fact, any 2L periodic function can be represented as full Fourier series! Let’s look at an example. Say, we need to solve the heat equation subject to the same condition as above, where the function Phi is defined as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*aLUlQ5OtJUjLIbU3wjDWNA.png" /></figure><p>Notice that this function is periodic and odd, where L (length) is just equal to pi. This significantly simplifies the calculation: we only need to compute the B coefficient, since everything else would be 0 (vanish).</p><p>By plugging in the known values and computing the integral, we get the B Fourier coefficient:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6hrJzoFNKs5UWn_xnuvYyw.png" /></figure><p>That is for all odd n, when for even n it is just equal to zero. So the Fourier series representation of our function looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*65PmvsM637r5BTtxZMMoeA.png" /></figure><p>It is impossible to cover everything related to the heat equation in one blog post, but I hope I have covered enough basics to develop some intuition and curiosity. Mathematicians have been studying and using this equation for centuries, and even undergrad math students spend months studying kernels, Fourier series, even and odd reflections and extensions, Dirichlet and Neumann boundary conditions, complex exponential and trigonometric notations, 2D and 3D versions of the diffusion equation, its relation to Brownian motion and even quantum mechanics.</p><p>I would like to thank my professors at Columbia University for all this wonderful knowledge and I hope you enjoy my notes (all formulas written by me in LaTeX, nothing stolen from any external sources).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75f6e500911d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Partial differential equations. Part I: Waves]]></title>
            <link>https://medium.com/@a.i.gorina/partial-differential-equations-part-i-waves-464830cea027?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/464830cea027</guid>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[differential-equations]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Thu, 25 Jun 2020 23:44:44 GMT</pubDate>
            <atom:updated>2020-06-25T23:44:44.074Z</atom:updated>
            <content:encoded><![CDATA[<h4>PDE’s play a big part in mathematics, physics, and even machine learning and AI</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*TDAqWhPHKC519_SHXaek1g.jpeg" /></figure><p>Aside from linear algebra and analysis of all flavors, math students need to learn how to solve, think about, and interpret differential equations. Differential equations describe the world around us, and they make use of the fact that even if don’t know what the original function looks like, we can understand it through its derivatives.</p><p>Derivatives are very useful. Let’s look at acceleration. By definition, it is the rate of change of the velocity of some object with respect to time. We can write it down in the following way:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aHrLbyRXlM8boBTkxD5cHg.png" /></figure><p>We may not know the original velocity of an object <strong>v </strong>or its position<strong> x</strong>, but if we understand that acceleration is the first derivative of velocity with respect to time, and the second derivative of position with respect to time, we can reverse engineer the problem, integrate and restore this information. Pretty cool.</p><p>Partial differential equations or PDE’s are a little trickier than that, but because they are tricky, they are very powerful. A PDE is an identity that relates the partial derivatives of a function (let’s call it <strong>u</strong>), and the function <strong>u</strong> itself and the independent variables. If in ODE’s (ordinary differential equations) the function depends only on a single variable, PDE’s depend on multiple variables.</p><p>There are multiple examples of PDE’s, but the most famous ones are wave equation, heat equation, and Schrödinger equation. We’ll look at all of them, in order.</p><p>First, wave equation. It was formulated in 1740’s by a French Jean-Baptiste le Rond d’Alembert, and it touches the problem of a so-called vibrating string (think guitar string). But wave equation is useful for studying waves of all sorts and kinds, not just vibrating strings: water waves, sound waves, seismic waves, light waves. It is usually written in one the following ways:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9UOKzNJ0TwtsL1hrElR8w.png" /></figure><p>Here c is a constant describing the propagation speed (it should be greater than zero). The ‘indices’ (tt and xx) describe the fact that the second derivative with respect to time on the left and with respect to x on the right is taken. And of course, since we’re talking about partial differential equations, <strong>u</strong> is a function of two variables, both x and t.</p><p>Just writing down the equation (relations between functions, derivatives, etc.) is insufficient if we are talking about finding a unique solution. We need something called initial condition and boundary condition. We say that we need to solve a wave equation (first line) <em>subject to </em>(second and third line)<em>:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*iPljvynQLUKyl235VWU0iA.png" /></figure><p>Don’t ask me why these functions of x are called Phi and Psi, it is just common to name them this way. The key observation made by d’Alembert, who actually found a solution formula (named after him, of course), is that we are actually dealing with a superposition of traveling waves — to the right (x+t) and to the left (x-t). Here is how it looks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPVbAcTAPFCMxJ3DRh3rLw.png" /></figure><p>Since the functions Phi and Psi are given as part of initial value problems, solving wave equation essentially boils down to computing an integral after plugging in the values into the d’Alembert’s formula. Here’s an example. Assume that u(x, 0)=cos(x) and its first derivative with respect to time is equal to 0:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z6XbE2I2-GrjOL9amIQ62g.png" /></figure><p>Then we can just plug in cos(x) for Phi and and zero for Psi, and solve:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eyuS9Wd_GhvcOMsJorDJeg.png" /></figure><p>One more example. Assume the same initial value problem, but this time Phi is 0 and Psi is cos(x):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GfyTb0_NSB0NehjrHNNtWQ.png" /></figure><p>Then solution is given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aaOdbEymp0NXv_3lKNFboA.png" /></figure><p>These are the basics of the wave equation and how it can be solved using d’Alembert’s formula. If the functions Phi and Psi are not too complicated, solution to this PDE is fairly straightforward and simple. One little note: we already know that to compute the function <strong>u </strong>it is enough to know the values of Phi and Psi on an interval (x-t, x+t). And if Phi and Psi vanish on some interval, say (a, b), then the function u(x, t) also vanishes for x on an interval (a+t, b-t). This is called <em>causality principle</em>.</p><p>Next time we’ll talk about more complicated PDE’s, such as heat equation and Schrödinger equation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=464830cea027" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why do we always have to compute the determinant]]></title>
            <link>https://medium.com/@a.i.gorina/why-do-we-always-have-to-compute-the-determinant-585cef263a48?source=rss-1293a63e9201------2</link>
            <guid isPermaLink="false">https://medium.com/p/585cef263a48</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[linear-algebra]]></category>
            <category><![CDATA[matrix]]></category>
            <category><![CDATA[mathematics]]></category>
            <dc:creator><![CDATA[Anastasia Kaiser]]></dc:creator>
            <pubDate>Sat, 20 Jun 2020 20:53:00 GMT</pubDate>
            <atom:updated>2020-06-20T20:53:00.088Z</atom:updated>
            <content:encoded><![CDATA[<p>Since we have already covered the hardcore of Linear Algebra when we talked about <a href="https://medium.com/swlh/singular-value-decomposition-and-why-it-matters-5534fdff3f22">Singular Value Decomposition</a>, I have decided that it may be a good idea to take a step back and discuss what I assumed the reader already knows — the determinant. Reminder, we care about matrices because they are essentially tables of data, and data is the elephant on whose back the modern world is resting. But why would we care about det(A)? What does it represent?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*qLkHkf4YNrUeRsLFZYji0w.png" /></figure><h4>Quick note on computing</h4><p>Computing the determinant is pretty simple, especially if we have a 2x2 matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*f60NqdNMEccO9l2qSnjhBA.png" /></figure><p>Given the matrix above, to compute its determinant we just need to take the difference of the products of its diagonals: det(A) = ad-bc. It is a little trickier if we have a 3x3 matrix, but also very doable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*f2LtwGUSNuclrehJHXST6Q.png" /></figure><p>The exact formula for computing the determinant of a 3x3 matrix is given by:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*v6jNzQaeiSaWQPfZxgMmeA.png" /></figure><p>But here is how to think about it without actually memorizing the formula. You write down all the entries of the first row (a, b, c), and after that you close the first column and first row with your finger, compute the determinant of the remaining 2x2 matrix and put the value next to a. Then, you close the second column and the first row with your fingers, compute the determinant of the remaining 2x2 matrix and put the value next to b. Repeat with the third column and the first row. The only thing left to do is to put alternating signs: start with positive before a, negative before b, and positive again before c.</p><p>This also works with rows. You can write down all the entries of the first column, then close the first column with your finger and start by looking at the remaining matrices after closing the first row, second row, etc. It is a consequence of the first property of the determinant: det(A)=det(A-transpose).</p><h4>So, why determinant?</h4><p>Matrices essentially represent linear transformations of the unit vectors (those that only contain zeros and ones). If we had a vector [0,1], it means that it points vertically and its length is equal to 1. But if we multiply this vector by 2, it will turn into [0, 2], and will now be still pointing vertically, but its length would be 2.</p><p>The determinant works pretty much in the same manner: it is a scaling factor <em>by which a linear transformation changes </em>any area (for 2D) or volume (for 3D).</p><p>If you look at the picture on top of this post (again, sorry for my poor artistic skills), on the left we see a 1x1 square, which is a matrix of unit vectors. One points in the x-direction and has a magnitude of 1 (1, 0), and the other points in the y-direction and has a magnitude of 1 (0, 1). This is the starting point. A linear transformation associated with the matrix ([2,0][0,3]) means that we stretch the first vector by the factor of 2 and the second vector by the factor of 3. If we compute the determinant of this matrix, (2*3–0*0), we get 6, which is exactly the area of the resulting rectangle.</p><p>What happens if the determinant is zero? In 2D case, when we only have a 2x2 matrix, it means that the resulting figure after the linear transformation has the area of zero. It is probably just a flat line (I say probably because it also may be a point). If it is a 3x3 matrix, then the resulting figure after the linear transformation has the volume of zero: it can be a flat surface, a line, or even a point.</p><p>Matrices with zero determinants are non-invertible, which opens the next chapter of the linear algebra discussion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=585cef263a48" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>