Tag: Data Science

  • How To Learn Python Effectively

    How To Learn Python Effectively

    Python is third in programming language popularity and people are (literally) buying in.

    TIOBE data from tiobeindexpy; visualisation codes from here

    On the data science front, Coursera’s lists of Top 10 Courses in 2020 and 2019 include:

    1. Machine Learning by Stanford University
    2. Programming for Everybody by University of Michigan
    3. AI For Everyone by DeepLearning.AI
    4. Algorithms by Princeton University
    5. What is Data Science by IBM, and the list goes on…

    I get it — data science, analytics, machine learning, AI… they all sound really kewl, trendy 😎 and because they’re so heavily thrown around as buzzwords, we become curious and want a slice of the analytics pie. People around me have spoken about picking up Python, Tableau, SQL… and if you find yourself on the brink of “jumping onto the Python bandwagon” or wanting to give programming a shot, here’s a good way to get started with analytics.

    Start with well–received course materials

    A natural first step to begin learning anything is to sign up for a Coursera or an edX course. This is easy — you can either get acquainted with this free MIT open courseware on the Introduction to Computer Science and Programming or sign yourself up on Coursera for a well-reviewed course. I audited (the famous) CS1010S during my time in NUS.

    While this is a great start, it gets increasingly difficult to follow through because your initial curiosity that prompted you to sign up for the course quickly gets extinguished by the rigour of the course content. You might find yourself zoning out, procrastinating and ultimately failing to complete the course. This happened to me when I attempted a financial engineering course on Coursera, and it brings me to the importance of a parallel point.

    Envision an easy and appreciable purpose

    Setting a goal for yourself to achieve using Python or another analytics tool is imperative and a good way to keep you focused and motivated as you’ll be aware of your own learning outcomes. In fact, with one, or even a series of clear, achievable purpose(s), you will realise that the course content does not immediately help you achieve your purposes, and you will have to google the rest. But what you find on Google is now a lot more understandable as you’ve progressed through your course materials, and you end up mastering more than what you had signed up for. Here’s what I mean:

    Deciding a purpose

    Your goal or purpose could be something as ambitious as applying text analytics on your personal credit card statements, generating stereograms, or just for starters, to simply generate the TIOBE index chart above. While it sounds innocuous and straightforward, here’s the source code to generate it:

    !pip install tiobeindexpy
    
    from tiobeindexpy import tiobeindexpy as tbpy
    import seaborn as sns
    import matplotlib.pyplot as plt
    
    sns.set(style = "whitegrid")
    sns.set(rc={'figure.figsize':(11.7,8.27)})
    
    top_20 = tbpy.top_20()
    top_20['Ratings'] = \
    top_20.loc[:,'Ratings'].apply(lambda x: float(x.strip("%")))
    top_20['Change.1'] = \
    top_20.loc[:,'Change.1'].apply(lambda x: float(x.strip("%")))
    
    labels = top_20['Programming Language']
    values = top_20['Ratings']
    rank = top_20['Feb 2021']
    
    clrs = \
    ['tab:orange' if (x == 3) else 'tab:blue' for x in rank]
    sns.barplot(x=values, y=labels, palette=clrs)\
    .set_title('TIOBE Index \n\n Programming Popularity (Feb 2021)')
    
    plt.savefig('Programming Popularity.png', bbox_inches = 'tight')
    

    Evidently, this “simple” purpose of generating a bar chart in fact necessitates your mastery of Python’s syntax, data types, understanding how to import packages, manipulate dataframes, use anonymous functions and list comprehension. This is no mean feat, but precisely because you have a purpose/ end-goal in mind where you can visualise a working example to apply these concepts, hearing or learning about them as you progress through your course should feel more exciting and less abstract.

    You’ll also realise that while your course might cover content at the conceptual level, you’ll have to google how to change the colour for a specific bar in your bar chart, how to use 2 lines for your chart header or how to change the font size of your chart labels. In this manner, your purpose will prompt you to search beyond course materials and you’ll end up learning more.

    In sum

    While it might be tempting to jump on the bandwagon for a programming trend that comes along, it’s more important to ask yourself first if you’re fundamentally interested and if there’s any real use for what you’re jumping onto. If you are and there is, then identify one or a few purposes and work towards them while you complete your course material.

  • How I Landed a Full Scholarship with Copenhagen Business School

    How I Landed a Full Scholarship with Copenhagen Business School

    I’ve always known that I was going to apply to a Master’s program at some point.

    I graduated from the National University of Singapore (NUS) back in 2017 and majored in economics. My interests lied in the intersection of quantitative and applied economics — applied econometrics, time series analysis, financial economics… all that fun stuff. But despite my interests, I’ve never had an affinity for any particular industry. I liked finance but I didn’t mind joining the Singaporean public sector; I wouldn’t mind a job in retail customer analytics, but research in labour market outcomes could be fun too. So two things became clear to me:

    1. if job opportunities that involved rigorous data-related work were to come around, I’d most likely take a second look, but
    2. my training in economics was insufficient for such work in the business/ commercial realm.

    So I had to study again but more importantly, I also wanted to study again.

    What, when and where to study?

    “What” and “when” were in fact pretty straightforward: I knew I wanted data science or business analytics, and I would ideally like to enrol ASAP. “Where” on the other hand, was trickier considering tuition fees, and many other additional costs if I were to enrol abroad, which I was actually very inclined towards.

    Master’s programs available to a Singaporean like myself are prohibitively expensive. So programs, schools and geographies aside, I also had to consider funding options and opportunities. I considered the US, the UK, Denmark, the Netherlands, Hong Kong… but my options quickly narrowed because very few schools offered partial scholarships, much less full ones. At the time of my application, the only other school besides Copenhagen Business School (CBS) that I had found to offer full scholarships for Master’s is Stanford. But with more research, DTU, ITU and KU in Denmark in fact also offer full scholarships for non-EU/ EEA students.

    This then begs the questions:

    Why CBS and what did I do for the scholarship?

    Master’s programs have (nuanced) differences between them even if they have the same title. This depends on the school that’s offering the program. An engineering or technical school offering data science will likely focus on theoretical content with heavier emphasis on research, while a business school is likely to deliver with more focus on application and industry collaborations. I knew from the outset that my interest was in the application of data tools in the business realm so CBS was a clear choice for me.

    CBS structured their Master’s application such that the motivation for your program choice and your scholarship application are all written together in a 2-page document. Full details of the application steps and guidelines are available here.

    Tip 1: Optimally structure your personal statement

    While CBS provided a list of pointers to help you craft your personal statement — which meant that you should minimally answer every point on the list — I was relatively clueless about how I should structure my statement. As advised by my mentor (thank you, Jessica!), because candidates usually apply to multiple schools, the first half of my statement should be a personal story and this part should be independent of the school that I was applying to. I would only need to amend the latter half of my statement for every application I sent.

    With her advice, I was able to first focus on writing a personal story that led to my choice of studying data science, before justifying why each school is a good match to my profile and how I could contribute. If you are writing multiple personal statements, this will increase your efficiency.

    Tip 2: Distill your personal story into actionable points

    It is my personal take to always highlight key points in a clear, numbered manner. This is perhaps even more pertinent in the case of writing a personal story, where the likelihood to ramble on is higher as we might prefer to squeeze in as many achievements as possible.

    My approach was then to simply structure my story such that it led into 3-4 actionable points that enrolling in my desired Master’s program will achieve for me.

    Tip 3: Research, research and research

    When explaining how each school, program and even geography will suit my goals, I sought to substantiate my points using information from course and program outlines, faculty members’ publications and background, alumni and seniors’ career choices and even the country’s macroeconomic indicators (I indicated my intention to seek employment in the country that I applied to).

    My intention was to demonstrate my impressions of the program and the school were based on a comprehensive set of information, and to signal that I was firmly certain of my choice after conducting (what I thought was) extensive research.

    Tip 4: Write in LaTeX

    Besides your undergraduate transcript and degree that you submit to prove that you’ve met the prerequisites for your desired Master’s program and to show your GPA, CBS does not ask for any other qualifications. They also do not consider GRE and GMAT results. Because I was applying to data science, I had imagined the quickest way for me to signal some form of “code literacy” and to hopefully boost my credibility was to write my statement in LaTeX. This is ultimately not a requirement.

    Logistically speaking however, the official CBS requirements ask for a 2-page personal statement, with no specific instructions on margin widths and line spaces. Writing in LaTeX gave me better flexibility (imo) to shape my text into the 2-page limit, while ensuring enough white-space in my document to aid comfortable reading for the selection committee. 🙂

    Writing my personal statement was the biggest step in my application to CBS. There was no admission interview and the rest was just administrative work. Overall, if it has always been on your mind to apply for a graduate program, I hope the above will help you. If you have questions regarding other specificities, feel free to reach out in the comment box below. Good luck! 🙂

    N.B. At the time of publishing this (February 2021), it is unfortunately too late for non-EU/ EEA folks to apply to CBS for this year’s enrolment. But do check out the other Danish universities or consider the following year if you’re keen!