<?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 Christian Lomboy on Medium]]></title>
        <description><![CDATA[Stories by Christian Lomboy on Medium]]></description>
        <link>https://medium.com/@christian.lomboy?source=rss-d366b7a3f9f5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*SnCyhxD0QmLBEaHBCJjS_A.jpeg</url>
            <title>Stories by Christian Lomboy on Medium</title>
            <link>https://medium.com/@christian.lomboy?source=rss-d366b7a3f9f5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 18:44:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@christian.lomboy/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[How I built an Audio-Based Music Genre Predictor using Python and the Spotify Web API]]></title>
            <link>https://medium.com/data-science/how-i-built-an-audio-based-music-genre-predictor-using-python-and-the-spotify-web-api-a957e427a515?source=rss-d366b7a3f9f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a957e427a515</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[music]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Christian Lomboy]]></dc:creator>
            <pubDate>Fri, 03 Jan 2020 21:42:19 GMT</pubDate>
            <atom:updated>2020-01-04T18:34:11.185Z</atom:updated>
            <content:encoded><![CDATA[<h4>An introduction to music information retrieval (MIR) — an interdisciplinary field concerned with analyzing and categorizing musical data</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FrehZF_Q8bNiu1n0" /><figcaption>Photo by <a href="https://unsplash.com/@agebarros?utm_source=medium&amp;utm_medium=referral">Agê Barros</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Odds are you’re probably subscribed to some sort of popular music streaming service. Whether it’s Spotify or Apple Music, you’ve likely been exposed to an application of music information retrieval. Consider this — when building a playlist using Spotify, the app will give you song suggestions based on your previously added songs or your playlist title. In Apple Music, you’ll see mixes curated just for you based on your previous listening history. There’s no magic going on behind the scenes here. (well, maybe you, Apple — we have no idea what goes on in Apple Park’s magical kingdom) These examples are popular applications powered by music information retrieval.</p><p><strong>Music information retrieval is the science of analyzing and categorizing musical data</strong>. <strong>Some applications of MIR are closely related with the field of data science, while also combining several fields such as psychoacoustics, signal processing, machine learning, and computational intelligence.</strong></p><p>In this article, I’ll be giving a high-level walk-through of one application of MIR: <strong>genre prediction</strong>. Built in Python, this whole project contains two classifier models that predict a song’s genre. Both models are exposed to various data points gathered from a bunch of songs. The first model predicts a song’s genre based on its lyrics. The second model predicts a song’s genre based on its audio attributes, or how it sounds. <strong>We will be focusing on the second audio-based model</strong>, but feel free to check out the whole project on <a href="https://github.com/christianlomboy/MIR-Genre-Predictor">GitHub</a>! Let’s get started.</p><p><em>My work here is heavily inspired by my love for music and the many applications of MIR I’ve been exposed to. I’m always looking for new music, and I’ve discovered a ton of artists thanks to Spotify and Apple Music’s recommendations.</em></p><h3>1. Gathering data</h3><p>In order to begin building a classifier, <strong>we need data</strong> — and <em>lots</em> of it. For classifiers, it is not only <em>better</em> to teach them how to fish; it is <em>required</em>. We need to feed them a ton of data in order for them to make accurate class label assignments.</p><p>Our classifier will be making predictions based on how songs sound. Luckily, Spotify has a particularly useful <a href="https://developer.spotify.com/documentation/web-api/">web API</a> we can utilize to get the data we need. In this project, we will access Spotify’s song data using the <a href="https://spotipy.readthedocs.io/en/latest/">Spotipy Python library</a>. This lightweight Python library supports all of the features of Spotify’s Web API. By using Spotipy, we can retrieve various data points of any given song, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bRd1m4an5mD4MsxCB8jwLg.png" /><figcaption>Data gathered using Spotipy given the track, artist, and genre</figcaption></figure><p>There are quite a few data points we can take into consideration when predicting a song’s genre. <strong>Just by looking at the example provided above, we can tell that the hip-hop song by Empire Cast has a higher degree of danceability than the two punk/metal songs above it. The degree of speechiness is higher as well, which isn’t surprising. Punk/metal songs have lyrics that are often screamed or shouted over noisy instruments, making them harder to understand, while hip-hop songs contain lyrics that are sung or rapped alongside rhythmic instrumentals that hardly ever get in the way.</strong></p><p>In order to get a sufficient amount of song data, I started off by importing two data sets from Kaggle and Ranker. Both data sets contain tens of thousands of songs, along with their associated genres. To get the audio attributes for these songs, I created a function that runs through both data sets, stopping at each song to search for the song’s audio attributes. Thanks to Spotipy, I was able to get plenty of data to train these models.</p><h3>2. Exploratory data analysis</h3><p>As shown in the above example, we were able to get one small insight into a handful of gathered songs. <strong>However, the songs shown above are not even a fraction of a percentage of the amount of songs in the entire data set, so we must not make any assumptions yet.</strong> In order to reach a conclusion regarding the nature of each genre’s audio attributes, <strong>we must conduct an exploratory data analysis, or EDA.</strong></p><p>EDAs allow us to summarize a data set’s main characteristics. <strong>It is the process that allows data scientists to become acquainted with their data, gathering key understandings regarding the nature of the data being experimented on. </strong>It is also used to check the quality of the data; whether or not our experiment will yield any meaningful results.</p><p>Beginning my EDA, I first grouped the songs by genre, then found each audio attribute’s numerical average. Next, I normalized the data set’s attributes to gain a better understanding of the differences between each genre’s audio features. I used a variance threshold function to find the variance between each genre’s audio attribute, then listed the variances in a row to be shown at the bottom of the dataframe. Once added, I sorted the columns in descending order by variance. <strong>I ended up with a dataframe that showed me the average audio attribute for each genre, and which attributes had the most similarities and differences between genres.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ArEjB_2TdRLy1KlRtbiIaw.png" /><figcaption>Columns are sorted by variance (bottom row), or how much each attribute differs between genres</figcaption></figure><p>Judging by the dataframe shown above, we can now make some key assumptions regarding the data set. <strong>Instrumentalness, acousticness, and speechiness have the highest variances between each genre, while time signature, key, and tempo have the lowest variances</strong>. Intuitively this makes sense, especially when we consider the example shown in section one of this article. Punk/metal has very high instrumentalness due to the usual presence of screaming guitars, heavy bass, misunderstood lyrics, and thunderous drums. Hip-hop has very low instrumentalness due to the usual presence of electronic beats and synth basses. Country/folk/rock lies somewhere in between.</p><p><strong><em>What are some other ways you can apply your musical intuition to the results shown above?</em></strong></p><h3>3. Building the classifier</h3><p>A <strong>decision tree</strong>, a popular tool in the field of machine learning, uses its tree-like structure to make decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*XMId5sJqPtm8-RIwVVz2tg.png" /><figcaption>Photo by <a href="https://en.wikipedia.org/wiki/File:CART_tree_titanic_survivors.png">Stephen Milborrow on Wikipedia</a> —<em> “A tree showing survival of passengers on the </em><a href="https://en.wikipedia.org/wiki/Titanic"><em>Titanic</em></a><em> (“sibsp” is the number of spouses or siblings aboard). The figures under the leaves show the probability of survival and the percentage of observations in the leaf. Summarizing: Your chances of survival were good if you were (i) a female or (ii) a male younger than 9.5 years with less than 2.5 siblings.”</em></figcaption></figure><p>Above is an image found on the <a href="https://en.wikipedia.org/wiki/Decision_tree_learning">Decision tree learning Wikipedia article</a>. This tree references the movie Titanic to give us an intuitive example of how decision trees work.</p><p><strong>The audio-based classifier will utilize decision trees by making predictions determined by each of the tree’s leaves.</strong> For instance, one leaf may have a statement such as <strong>“is acousticness &gt; 0.5?” </strong>which it will then decide whether the song in question is predicted to be a hip-hop song or a punk/metal song. Now, the songs in our data set surely have more attributes than the people on the Titanic did, so our tree will look much more complex than the tree listed above. Above, we see that there are only three attributes the decision tree is taking into consideration. Our songs have 12 attributes. <strong>These attributes are what the decision tree bases its predictions off of,</strong> so it makes sense that the tree will be a lot bigger — not to mention the enormous amount of songs we will be feeding into it.</p><p>I chose to use <a href="https://scikit-learn.org/stable/index.html">scikit-learn</a>’s Python tools — specifically the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html">train-test-split function</a> and the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html">decision tree classifier</a>. When building a classifier, the first step we must take is called <strong>fitting the classifier</strong>. We can think of fitting as exposing the classifier to data and telling it which classification it belongs to.</p><p>It’s pretty similar to the idea of studying. When studying for tests, you’re exposed to a lot of information that you must remember when it comes time to take the test. <strong>The key here </strong><em>(this is important)</em><strong> is that on the test, you will see problems you must solve that you have never seen before — but these problems have similarities to the ones you studied before taking the test. Using what you know about the problems you’ve studied, you solve these test problems to the best of your ability, hoping that you get a good exam grade in the end.</strong></p><p>When fitting the decision tree classifier, its decision tree leaves are generated by the data its exposed to. After fitting, we can then test the classifier by exposing it to data it has never seen before, hoping it makes accurate predictions.</p><p>I built my decision tree classifier by splitting up the entire data set into <strong>70% training </strong>and <strong>30% testing data</strong>. I also decided to drop two audio attributes from consideration, as the difference between genres was too little. I made these decisions after researching <a href="https://elitedatascience.com/overfitting-in-machine-learning#how-to-prevent">how to avoid overfitting</a>.</p><p>Before fitting, I utilized a method called <a href="https://scikit-learn.org/stable/modules/ensemble.html#bagging"><strong>bagging</strong></a><strong> </strong>to further optimize the classifier. Bagging essentially takes your initial classifier, creates a bunch of copies of it, then trains them on random subsets of the original data set. All their averages are taken after training, resulting in one single averaged classifier. <strong>Bagging introduces randomization in the construction of classifiers, making it a great way to improve a single complex tree classifier.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9M8c0c2IUkWHOWDS9Md-Ig.png" /><figcaption>The final decision tree</figcaption></figure><h3>4. Results</h3><p>Now to finally fit and test the classifier. We run a simple scoring function to see how the classifier performs when exposed to data it hasn’t seen before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*bh0N_zkfTYmHd8xDxLZ2Kg.png" /><figcaption>The classifier scores ~79%</figcaption></figure><p>Not bad — a score of just under 80%. Let’s feed it some songs and see it in action; songs by Paul Mccartney, Drake, and Title Fight.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*7xF__6kLu7wF6rCqfdtySA.png" /><figcaption>Predictions are correct!</figcaption></figure><p>All three predictions are correct! <em>Science, baby</em>.</p><h3>Conclusion</h3><p>Data science is a huge field. It’s one of the reasons I love it so much. It allows me to combine my computer science skills with my passion for music, and the MIR field offers a perfect playground for me to gain musical insight while also further developing my skills.</p><p><a href="https://github.com/christianlomboy/MIR-Genre-Predictor">GitHub project link</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a957e427a515" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-i-built-an-audio-based-music-genre-predictor-using-python-and-the-spotify-web-api-a957e427a515">How I built an Audio-Based Music Genre Predictor using Python and the Spotify Web API</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[How to Bid Imposter Syndrome Farewell — a Junior Programmer’s Perspective]]></title>
            <link>https://medium.com/@christian.lomboy/how-to-bid-imposter-syndrome-farewell-a-junior-programmers-perspective-4058cd5f5784?source=rss-d366b7a3f9f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4058cd5f5784</guid>
            <category><![CDATA[imposter-syndrome]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[career-advice]]></category>
            <dc:creator><![CDATA[Christian Lomboy]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 22:48:39 GMT</pubDate>
            <atom:updated>2019-12-29T22:58:13.055Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Bid Imposter Syndrome Farewell — a Junior Programmer’s Perspective</h3><h4>Three confidence building tips for your new job</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Kumm0lV_5nLVuR8L" /><figcaption>Photo by <a href="https://unsplash.com/@mroz?utm_source=medium&amp;utm_medium=referral">Filip Mroz</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>See that baby? You and I used to be the same size. I was born on a hot July afternoon in 1996. Fast forward 23 years and I’m currently a software developer working at a big financial institution. However, I still share a lot of similarities with the tinier, younger version of me. I might not need my diapers changed anymore, but the feeling of uncertainty upon entering a new world is still very present — working in tech exposes us to a “world” that is constantly changing.</p><p>If you’re reading this, you know what I’m talking about. <strong>As a developer, it is our duty to write clean code, collaborate with our teams, follow best practices, and deliver quality solutions to whoever’s asking for it.</strong> Whether you’re trying to impress your professor with your image classification app that can recognize soda labels or writing enterprise Java APIs for your company’s back-end, the concept remains the same.</p><p>What they don’t educate you on is how to handle yourself in a new workplace setting. You know Python? Awesome! You designed and built that entire app yourself? Congratulations. Now you found yourself freshly employed in a new workplace working with developers and project managers that are already months (or even years) into a project — and you’re expected to take the reins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*ubRHMY5VayZDIdUCQBfCmg.gif" /></figure><p>My first ever task was to write test cases for an API that has recently finished its development stage. We were to use a testing framework that I’ve never even heard of before. Now I got a pretty decent grade in my software design class in college, where we learned fundamentals of unit testing and test-driven development, but I found myself lost and very frustrated for days after the task was delegated to me. What branches do I push to? Where is the code’s documentation? Who do I ask for help? <em>How the hell do I even pronounce the name of this testing framework?</em></p><p>All of these questions can send new developers into a spiral of confusion and frustration, leaving them feeling unmotivated, unfulfilled, and even depressed. I know this because I’ve experienced it myself. We can identify these symptoms and give ourselves a formal diagnosis called <strong>imposter syndrome</strong>.</p><p><strong>I find that this feeling does not stem from our lack of experience, but rather from our attitude and mindset, as well as our surroundings.</strong></p><p>There exists a controversial argument that developers don’t need a formal education from a four-year institution, but I won’t touch on that here. What I will argue, however, is that it is pretty much impossible for an educational institution to prepare anybody for a real-world setting, simply because every workplace is different. This inevitably forces us to figure it out as we go.</p><p>In this article, you will find three tips to help you overcome imposter syndrome. I provide these tips based on first-hand experiences working as a junior developer.</p><h3>1. Accept your place as the rookie.</h3><blockquote>“I would say the greatest challenge, for me, had been my rookie year and learning my spot. It is an emotional battle, as you have good days and bad days. Being young and thrown into this big business is challenging.”</blockquote><blockquote>— Julian Edelman</blockquote><p>You are the freshman. The rest of your team knows this. You aren’t expected to know much, other than how to write bazillions of lines of code and recite textbook definitions of Agile methodologies. <strong>One big step towards overcoming the feeling of imposter syndrome is accepting the position you’re in.</strong></p><p>You will come across developers who seem much more skilled than you. You may feel intimidated by them. They are able to talk about their precious codebase in casual conversation, knowing every little detail associated with the project. You may feel like you are required to have the same level of knowledge as them. You feel inferior and less valuable in comparison. This will cause you to be less productive, shy, and unhappy with your place as a rookie.</p><p><strong>Identify this behavior as it emerges. It’s extremely important to become mindful of your own thoughts and emotions as you progress through your career, and life in general.</strong> In terms of being a software developer, there are a multitude of options available to us once we are able to identify imposter syndrome’s dangerous symptoms.</p><p>As a newbie, you should not feel ashamed of feeling inexperienced. This feeling proves that you’re only human. <strong>When you come across individuals who appear intimidating, they might just be the most important resources available to you in the workplace.</strong> It is extremely important to hang around these people as much as you can. <strong>Sit near them.</strong> This will allow you to ask them questions periodically while also getting their input on your current tasks. Again, our surroundings play a critical role in the effects of imposter syndrome. If you surround yourselves with experts, they will benefit your growth as a developer. It will become less uncomfortable after a while, and their professionalism and expertise will begin to rub off on you.</p><p>I find this practice similar to the basic idea of sitting in the front row of a classroom. As a student who struggled with mathematics in high school, I excelled in all of my calculus classes in college. I am confident that I wouldn’t have done so well if I wasn’t sitting in the front row of my classroom every lecture. Sure, it was uncomfortable at first, but we adapt. <strong>As humans, we should all take advantage of our extraordinary ability to adapt to new surroundings.</strong> Luckily, there are plenty of opportunities to apply our abilities in the workplace.</p><h3>2. Utilize your team. Ask questions.</h3><blockquote>“I know that I know nothing.”</blockquote><blockquote>— Socratic paradox</blockquote><p>Throughout school, I found it very easy to adopt a stubborn, lonely attitude towards learning. After all, there are a ton of resources available to us where we are able to learn on our own, without even feeling like we need to attend our lectures.</p><p>By the way, if you’re still in school while reading this article, do your future professional self a favor and <strong>attend your lectures.</strong> I find that being present in a classroom atmosphere promotes collaboration and face time with your peers and professors. This will help you forge communication skills and beneficial relationships as you progress into the real world. <strong>Remember, imposter syndrome stems from our attitude and mindset, as well as our surroundings. Get comfortable with being uncomfortable — and start early.</strong> College is the perfect starting point.</p><p>If you’re a junior developer working at a company, then it is essential to eliminate this type of stubborn behavior in the workplace. Practice by asking your team members questions instead of pulling up Google and Stack Overflow. Ask them to walk you through previous projects to get a better idea of your organization’s best practices. Instead of consulting YouTube for framework tutorials, try to find previous applications of them on your company’s repository.</p><p>Once you have received all the answers you could get from your organization, then you may begin consulting resources available on the internet, keeping your team in close touch along the way.</p><h3>3. Accept that no one in this industry actually knows what they’re doing (for the most part).</h3><blockquote>“We’re all just figuring it out as we go.”</blockquote><blockquote>— Unknown</blockquote><p>I have adopted a saying that applies to most aspects of my young adulthood, especially my career as a developer. I’ve kind of turned it into my tagline. I use it a ton when I’m problem solving with my teammates. I’m not sure if someone has said it before and it’s just stored in my memory from who knows when, but it goes like this: <strong>“We’re all just figuring it out as we go.”</strong></p><p>If we take time to reflect on this saying, we can directly apply it to the rapidly changing world of software development. There are countless languages and frameworks that exist, and it is virtually impossible master all of them.</p><p><strong>As developers, we need to acknowledge this constant change. We will be put in countless situations where we have no idea where to start. It’s important to identify these situations and familiarize ourselves with them. If we don’t, we will catastrophize every situation involving change. To be familiar with the feeling of uncertainty in our jobs allows us to expect change and tackle it head-on as soon as it shows its face. The more challenges we overcome, the more confident we will grow.</strong></p><p>Senior developers are definitely experienced, but they are in no way shielded from the constant change of the industry — they are just used to it. For instance, a company may want to migrate existing applications to Node. I’m currently experiencing this myself as a junior developer. We have a multitude of applications written in Java. The architects want them to be re-developed in Node. I have little experience working with Node, but I’m able to remind myself of a time I’ve felt this uncertainty before, and I remember being able to conquer it. I’m confident I’ll be able to figure it out. <strong>Mindset is everything.</strong></p><p>So, if you’re ever faced with something you’ve never worked with before, just think of a time where you were able to overcome an obstacle in the past. Maybe it was working on a project in college. Maybe it doesn’t even have to do with software development. <strong>In order to be confident when faced with uncertainty, remind yourself of a time you were able to overcome a challenge.</strong></p><h3>Conclusion</h3><p>In a spontaneous effort to provide a remedy to those of you who found themselves in a similar position as me, I hope to have inspired some of you to build the confidence you need to excel in your careers. <strong>Imposter syndrome stems from our attitude and mindset, as well as our surroundings. </strong>If you feel like you have imposter syndrome, just remember that there’s a very, very good reason that you were hired. You have the skills they need. All that’s left for you to do is to practice acceptance and adopt a learning mindset.</p><p>Thanks for checking out my first article! Here’s to a happy New Year. Good luck to all of you. Peace and love.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4058cd5f5784" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>