<?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 Raffaele Nolli on Medium]]></title>
        <description><![CDATA[Stories by Raffaele Nolli on Medium]]></description>
        <link>https://medium.com/@raffaelenolli?source=rss-1c571759632f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HJvuLeRDygFFEVR1</url>
            <title>Stories by Raffaele Nolli on Medium</title>
            <link>https://medium.com/@raffaelenolli?source=rss-1c571759632f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 17:00:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raffaelenolli/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[My experience with Pivigo’s Science to Data Science programme]]></title>
            <link>https://medium.com/data-science/my-experience-with-pivigos-science-to-data-science-programme-fd62fda8f20a?source=rss-1c571759632f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd62fda8f20a</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[work-experience]]></category>
            <dc:creator><![CDATA[Raffaele Nolli]]></dc:creator>
            <pubDate>Thu, 03 Dec 2020 19:57:13 GMT</pubDate>
            <atom:updated>2020-12-03T19:57:13.206Z</atom:updated>
            <content:encoded><![CDATA[<h3>Science to Data Science: my experience</h3><h4>A 5-week programme that packs a punch</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*khGZ-SQ2YVCsBv6Yi134aA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@avirichards?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Avi Richards</a> on <a href="https://unsplash.com/collections/4481458/remote-work?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>.</figcaption></figure><h3>The Programme</h3><p><a href="http://www.s2ds.org/">Science to Data Science (S2DS)</a> is a project-based, 5 week-long programme that aims to facilitate the transition from academic research to data science. It is run three times a year by <a href="https://www.pivigo.com/">Pivigo</a>, a London-based tech consultancy, in a fully remote or (not this year) in person way. Participants, organised in teams (4–5 people), are assigned a data science project with a commercial partner.</p><p><strong>Why is S2DS useful to aspiring data scientists?</strong> In today’s job market, and I have seen it very clearly in <a href="https://towardsdatascience.com/how-to-identify-the-most-requested-skills-on-the-data-science-job-market-with-data-science-726845ca9638">my research</a>, advertised job openings usually list previous work experience as required, and employers seem to be reluctant to hire junior candidates. S2DS provides bite-sized data science work experience, a clear and demonstrable achievement, and a chance to get a sneak-peek in the industry.</p><p><strong>How does it compare to other courses, on a surface level?</strong> Compared to other bootcamps, S2DS is relatively cheap, and short in time (5 weeks), although very intense, with extra work hours in weekends and evenings often required. It does not come with its own learning material, however a list of recommended books and courses is provided beforehand, most of them free.</p><h4>Teamwork</h4><p>My team was made of other 4 members, all with a background in scientific academic research, similar career paths, and balanced skill-sets. We were assigned a technical mentor from Pivigo, and a project mentor from the partner company, with whom we had meetings at least twice a week. For other issues concerning the programme, a community coordinator and a programme manager were available.</p><p>The programme mainly relies on Slack for communications within teams and across the cohort, in a well organised and easy to pick-up way, and all meetings were done via Zoom or MS Teams. Use of project management tools and Scrum/Agile methods is encouraged, and in our case we had two short stand-up meetings per day, and managed our project tasks with the GitHub Project interface.</p><h4>Programme Structure</h4><p>Besides project work and team meetings, the project offers daily Q&amp;A social meetings, in which people from different team can chat and discuss about various topics. Socialisation is encouraged during weekly events, such as chat roulettes and a pub quiz, while useful seminars and panel discussions with industry experts are also organised.</p><p>At the end of the programme, we had two final presentations, one within S2DS and one with the project partner, in which we demonstrated the outcomes of our work.</p><h3>Our Project</h3><p>Our project partner was the <a href="https://www.food.gov.uk/">Food Standards Agency,</a> a non-ministerial government department responsible for protecting public health in relation to food in England, Wales and Northern Ireland.</p><p>The aim of our project was to build a pilot tool to explore online marketplaces, and identify optimal strategies to search and collect information about potentially hazardous food sold online.</p><p>To achieve that:</p><ul><li>we did a <strong>data ethics review </strong>of the problem;</li><li>we developed a tool that would <strong>automatically collect information from online marketplaces</strong>;</li><li>we trained <strong>a model to</strong> <strong>classify ads as food or non-food related</strong>;</li><li>we realised an <strong>interactive data dashboard</strong> to display the results.</li></ul><p>As regards the <strong>data ethics review</strong>, we have analysed the issues concerning web data collection and analysis, such as treatment of sensitive personal information, ethical web scraping, and bias of any kind in data, and applied the analysis’s findings in our app implementation.</p><p>Note that another team in a previous S2DS programme had already worked on the project, developing a tool to collect information from three marketplaces, clean it, store it in a database, and create a data dashboard with some descriptive visualisations.</p><p>We built on top of their effort, keeping the general structure but completely overhauling the single components of the app, plus adding the ad classifier and new interactive dashboard functionalities.</p><p><strong><em>Note that, due to the confidentiality of the project, I cannot disclose any of the code that has been developed in the programme, or provide a link to the repository.</em></strong></p><h3>App components</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*Ls3tG3NY1qDfxNx2IIzQkA.png" /><figcaption>Diagram of the data pipeline. Legend in the User Scenarios section.</figcaption></figure><h4>Marketplace Scraper</h4><p>This module is based on <a href="https://docs.scrapy.org/en/latest/topics/spiders.html">Scrapy’s spiders,</a> which are classes that define how a marketplace website is scraped, for instance by specifying the url, and the html tags of the information to be extracted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xYl4RpiIFG7O2EnsFqkp3w.png" /><figcaption>How Scrapy Spider class objects are structured in our project, and what the output looks like (the content of the example is made-up). In <em>parse_listing(), “selector” refers to the </em><a href="https://docs.scrapy.org/en/latest/topics/selectors.html"><em>selector class,</em></a><em> and the FSA local authority represents is the entity responsible for enforcing health and safety regulations locally.</em></figcaption></figure><p>The module is initiated by a user command, containing search parameters such as location, keywords, radius of search, etc. (depending on the marketplace), which calls the spider for each website to be scraped. Spiders are specific to single websites, but they are written according to a common specification, in a way that makes their integration seamless.</p><h4>Ads Text Preprocessor</h4><p>This module receives the data collected by the scraper module, and cleans and re-formats the text to produce a uniform output from a potentially heterogeneous input, coming from different websites/marketplaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*IA-K7a8Ryl14Ny0Slpm1UA.png" /><figcaption>Example of how ads text is progressively cleaned by the text preprocessor</figcaption></figure><p>Its main functionalities are:</p><ul><li>fill or remove missing values, and manage incorrect types;</li><li>corrects inconsistencies in the dataframe shape;</li><li>replaces emojis and symbols with meaning;</li><li>remove punctuation, special symbols, extra spaces, and other incorrect use of characters;</li><li>remove personal information, such as phone numbers, websites, etc.</li></ul><p>The preprocessor output is similar to the scraper output, with additional fields, such as cleaned versions of the ad title and description.</p><h4>Food Ad Classifier</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*bsT8t_nW2KoACKaz79T30g.png" /><figcaption>Confusion matrix of the model predictions, highlighting the change in rate of false negatives as a consequence of model optimisation (by changing class weights)</figcaption></figure><p>This module has been trained to classify ads as <em>food</em> or <em>non-food</em> based on their content. It is based on a <a href="https://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html">LinearSVC </a>algorithm, and is optimised to minimise false negatives, i.e. <em>food</em> ads classified as <em>non-food.</em></p><p>The model input is prepared by tokenising and vectorising the ads text by means of dedicated functions within the widespread <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html">scikit-learn</a> and <a href="https://www.nltk.org/api/nltk.tokenize.html">NLTK</a> libraries. Training is achieved by manually labelling a set of ads from the marketplaces.</p><p>The classifier is able to reliably predict the ads class, with an overall<strong> accuracy </strong>(as defined by the<strong> F1-score</strong>) of 89.6%. The model also assigns a score to each word as a measure of their importance in the prediction, which can give an indication on the ads content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*fPmMkRu2yi_zffsmf9Brow.png" /></figure><p>The model algorithm was chosen by comparing it to other classifiers, such as Naive Bayes classifier or SGD. In a future version of the project, the model might be changed to classify or cluster according to different criteria, or changed to unsupervised methods, to avoid manual labelling.</p><h4>Database Builder</h4><p>This module accesses the reference database (SQLite format in its current version) and updates it. It is based on a bespoke class that works as a wrapper for SQLite commands.</p><h4>Interactive Data Dashboard</h4><p>Our data dashboard is based on the R Shiny package, and provides several interactive tools to explore the data from the database. For example, the user can get a map with the geographical distribution of selected adverts in different cities, where the size of the bubbles in the chart represents the absolute number of adverts retrieved for each search term and city.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4n3mnjt0hpklWNb5szb2-A.png" /><figcaption>The map is zoomable and provides additional information through popup dialogues.</figcaption></figure><p>The dataset can be filtered by location, keyword, and date of data acquisition. The filtered dataset can then be used to create location-specific wordclouds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dDZ_PhXjNrlTpDWkmZLGAA.png" /></figure><p>The dashboard can be used to produce a bar plot of word frequency within the dataset as filtered by location, keyword and date, and the number of words to be included in the plot is also customisable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XdQYLvtD3oftTZWHdUYbvg.png" /></figure><p>The dashboard can be used to display the ads headings and descriptions in the filtered dataset, providing the user of a useful tool to explore the database.</p><p>The choice of Shiny for our dashboard implementation is based on the pre-existing version of the dashboard, which we used as a starting point, and on its flexibility and ease of use.</p><h3>User scenarios</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gcevlHv09CWN4Ic_WUQK7Q.png" /></figure><p>The core of the app is a database of ads collected from online marketplaces. In the simplest user case, the user may visualise the information already present by initiating the online dashboard.</p><p>In another scenario, the user may expand the database by collecting new information from online marketplaces, by initiating a command containing search terms and parameters. The data collected by the scraper is then processed, classified and stored in the database.</p><p>In the last scenario, the user may update the classifier with new data, by retraining the model with manually labelled data.</p><h3>Conclusions</h3><p>It was a markedly positive and enjoyable experience, with a lot of valuable work produced and a clear sense of achievement at the end of it. The interaction with our partner organisation had a lot in common with typical industry consortium projects mechanics, at least according to my experience.</p><p>Other bootcamps might provide a closer one-on-one mentorship, however I did not have any difficulty in getting help when I needed. Regarding the absence of learning materials, each project has specific needs and learning where to find the right learning material is an important skill, one that a researcher must have.</p><p><strong>Is it going to help in my job search?</strong> The jury is still out on this. While the experience is definitely valuable, and the skills acquired are useful, job market conditions remain tough.</p><p>With the programme now done, I am focusing on showcasing the project work through this blog post (and possibly follow up with more), and by sharing the code, which may or may not be possible depending on the project partner’s policy.</p><p>In my opinion, it would be perhaps useful if Pivigo could actively keep track of past S2DS alumni, to have updated statistics about their career advancement months and years after attending the programme, and show potential career paths to people fresh out of S2DS.</p><p><strong>Does S2DS help with networking?</strong> S2DS provides access to a network of alumni and meet-ups that can definitely be useful for career advice and advancement. In pre-COVID times, I attended a few of those meet-ups, and they were interesting and well organised. Online meet-ups are nowhere near as effective, but it is still important to appreciate the organisational effort and make the most of current times.</p><p>Please DM me, comment and connect on LinkedIn if you have any questions regarding S2DS, on the project hereby described, or on anything else.</p><h4>Acknowledgements</h4><p>The achievements described in this post would not have been possible without the contributions of my awesome team-mates <a href="https://github.com/christian-fernandezgarcia">Christian Fernandez-Garcia</a>, <a href="https://github.com/smartdataworks">Emanuel Blei</a>, <a href="https://github.com/LuciaBandiera">Lucia Bandiera</a> and <a href="https://github.com/omitamu">Moumita Aich</a>. All the pictures and results shown come from our work within the team.</p><h4>About Me</h4><p>I am a Data Scientist currently looking for new opportunities. In the past few years, I have been working on applied quantum technologies for space applications.</p><p>GitHub: <a href="https://github.com/RaffaToSpace">https://github.com/RaffaToSpace</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/raffaele-nolli-581a4351/">https://www.linkedin.com/in/raffaele-nolli-581a4351/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd62fda8f20a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/my-experience-with-pivigos-science-to-data-science-programme-fd62fda8f20a">My experience with Pivigo’s Science to Data Science programme</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 identify the most requested skills on the data science job market, with data science]]></title>
            <link>https://medium.com/data-science/how-to-identify-the-most-requested-skills-on-the-data-science-job-market-with-data-science-726845ca9638?source=rss-1c571759632f------2</link>
            <guid isPermaLink="false">https://medium.com/p/726845ca9638</guid>
            <category><![CDATA[job-market]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[job-hunting]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[web-scraping]]></category>
            <dc:creator><![CDATA[Raffaele Nolli]]></dc:creator>
            <pubDate>Thu, 23 Jul 2020 22:25:48 GMT</pubDate>
            <atom:updated>2020-07-23T22:25:48.778Z</atom:updated>
            <content:encoded><![CDATA[<h4>Use scraping and NLP to extract information from job ads</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nVH8ssDdJ-r0ea0331TFdw.png" /><figcaption>Making a nice word cloud is not an essential skill, but it should be.</figcaption></figure><p>A few days ago, a tech recruiter in my LinkedIn network posted a request for learning resource recommendations for prospective data scientists. She wanted to ensure candidates were acquiring the right skills for today’s market. Among the replies she received, many were anecdotal (“I did this…I learned that”), suggesting the usual set of online learning platforms, while others contained generic recommendations, such as “practice coding interviews” or “try a Kaggle competition”.</p><p>I thought: <strong>this is useless. How can I do all these things at once? Is there a better way of gathering useful information about the most requested skills in the job market right now? </strong>As a data science newcomer, I have felt like I am chasing the market, picking new projects or learning materials depending on what I see (or I think I see) most commonly on the job ads, or on what I am asked at interviews.</p><p>I decided to take a step forward and find out for myself: in this project I am collecting a number of job descriptions from a popular job board website, to find the recurring key words in them, which ones correspond to acquirable skills, and how (and if) they correlate to the advertised salary.</p><h3>Project structure</h3><p>The project is divided into three main parts:</p><ul><li>Data acquisition: the source of information is identified, and relevant job ad web pages are scraped, and the contents are saved and stored;</li><li>Data manipulation: the text contained in the job descriptions is cleaned through stemming, and vectorised;</li><li>Data analysis and conclusion: the most frequently recurring words corresponding key skills are identified, and a correlation with the advertised salary is investigated.</li></ul><p>You can find the code of the project <a href="https://github.com/RaffaToSpace/Job_ads_scraping_nlp">here</a>.</p><h4>Data acquisition</h4><p>The first step in the process is to identify the source of information, to select the right tools and to acquire it. As a source, I picked <a href="http://www.reed.co.uk/">reed.co.uk</a>, as it easy to navigate, rich of detail, and quite popular in my region.</p><p>Using <a href="https://www.crummy.com/software/BeautifulSoup/bs4/doc/">Beautiful Soup</a>, I made a simple script scraping the job ads of a set number of pages of results when searching for “Data Scientist”<em> </em>jobs in London, and within 20 miles. The script saves the search results, then accesses the pages corresponding to every job ad and stores job description, salary, contract type and location information in JSON format. Each job is identified by a reference number, and if some jobs appear multiple times in the search (for example if promoted), they are saved only once.</p><h4>Data manipulation</h4><p>There is no shortage of tools for text manipulation and analysis, as NLP is one of the most trendy applications of machine learning at the moment (look <a href="https://towardsdatascience.com/natural-language-processing-nlp-top-10-applications-to-know-b2c80bd428cb">here</a> and <a href="https://www.topbots.com/top-ai-ml-research-trends-2020/">here</a> for some interesting insight on this topic). My personal recommendation for learning is to take a look at <a href="https://www.fast.ai/2019/07/08/fastai-nlp/">fastAI online material</a>, covering the fastAI library and much more.</p><p>The job ad descriptions contain words with different inflections (mainly plurals and-ing suffix), punctuation and stop-words. They can all be cleaned up, leaving the text with only the kind of words which may convey useful information. As a first step, I used the <a href="https://www.nltk.org/">nltk package</a> to perform <em>stemming</em> on the text, which removes the words inflections and upper cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*eElKptyUqBSThyCfahEYoA.png" /><figcaption>Comparison between original text and its stemmed and lemmatised versions. Lemmatisation requires to know the position of each word to as input to work properly, so for example the words “Spoken” and “Understanding ” start with capital letters and are treated as nouns, and are not transformed into “speak” and “understand”.</figcaption></figure><p>An alternative to stemming is <em>lemmatising</em>, which reduces words based on meaning, rather than spelling. I decided to use stemming, since my purpose is to isolate words in the text, rather than study the text meaning.</p><p>The second step is to vectorise my text using the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.TfidfVectorizer.html">TF-IDF vectoriser function within scikit learn</a>, which returns a vocabulary containing all the words in the analysed text and, for each job ad description, a vector containing the value of term-frequency times inverse document frequency (hence TF-IDF) for each stemmed word, a value that highlights meaningful words in favour of highly recurring words such as “the”, “a”, “is”, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*1i_tyQUaAUGAJWf7ruqM7g.png" /><figcaption>The matrix in figure contains the TF-IDF values for the analysed text corpus. Each row corresponds to a job description text, and each column to a word in the corpus vocabulary.</figcaption></figure><p>Simply put, each row of the TF-IDF values matrix corresponds to an observation of our target (a job ad description), each column corresponds to the values of a given variable (a word in our vocabulary), and its values correspond to the values of the variables.</p><p>This is very useful to characterise the job descriptions, and we can use it to find the most frequent words, and see if they correlate to other factors, such as salary.</p><h4>Most present key skills</h4><p>The most present words across the whole job descriptions corpus can be identified by summing the matrix along its columns, getting a cumulative value for each word. I have filtered the results to remove some omnipresent words, such as “data” and “work”. At the time of the analysis, I can observe, roughly in order and grouped by affinity:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/149/1*Vn3AseE8qWz27e1_gyudBQ.png" /><figcaption>Stemmed words with their relative importance score, across the job ads.</figcaption></figure><ul><li><strong>Experience</strong>, and <strong>Senior</strong> (much more than <strong>Junior</strong>);</li><li><strong>Product</strong>, <strong>Market</strong>;</li><li><strong>Modelling</strong>, <strong>Statistics</strong>;</li><li><strong>Python</strong>, <strong>SQL;</strong></li><li><strong>NLP</strong>, <strong>Machine</strong> <strong>Learning</strong>, <strong>Deep</strong> <strong>Learning</strong>;</li><li><strong>AWS</strong>;</li><li><strong>Research</strong>, <strong>Insight</strong>, <strong>Analytics.</strong></li></ul><p>To my surprise, computer vision, FinTech and social media were somewhat less present. From a technical point of view, NLP and SQL stand out as skills worth acquiring, along with familiarity with AWS.</p><p>If you are Junior or entering the market (like me), then you probably won’t like seeing “experience” at the top of the list, but it is consistent with <a href="https://www.datacareer.co.uk/blog/uk-data-science-analytics-job-market-in-2019/">market trends</a>.</p><p>In absolute terms, we can take a look at how frequently certain key-words appear in job ads, and use the obtained figure as a metric for our decision-making process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*uzVRIsNgU5PyrqPSEM5Nbg.png" /><figcaption>Out of 167 analysed job ads, distribution for type of employment (a), occurrence of the term “Senior” in the job description (b), and of some key skills (c).</figcaption></figure><p>As an example, I have counted the occurrence of contract and permanent jobs, of the term “Senior”, and of some key skills in job descriptions. Note how, from a simple vocabulary analysis, it is possible to gather valuable information about the importance of certain skills.</p><h4>Correlation with salary</h4><p>My plan is to define a data acquisition scheme, with the idea of collecting information from hundreds of job ads and, explore the possibility to build a regression model to estimate the salary. I am testing the viability of this idea by evaluating the quality of the reported salary information, and by seeing if the occurrence of any key word correlates with salary.</p><p>Job ad pages contain information about the proposed salary range in a well defined field, which is easy to read. However, salary figures are often replaced by “Competitive salary”, “Salary negotiable”, or similar expressions. In the case of interest, 69% of values are unfortunately missing. Another complication is that salary is reported per annum for full-time jobs and per day for contractor jobs, and differences in taxation regimes make comparison tricky.</p><p>We can check if salary correlates with any key word by creating a single table with each job’s salary figure and the subset of the TF-IDF matrix corresponding to the key-skills, and use Pandas <em>corr()</em> method to get a corresponding correlation matrix.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*P4JO8MIEhPWCE70ott65jw.png" /><figcaption>Correlation-clustered heat map (<a href="https://seaborn.pydata.org/generated/seaborn.clustermap.html">see seaborn’s guide on how to make one</a>) of the “Salary” with relevant key words.</figcaption></figure><p>In a clustered correlation matrix, correlated quantities are put next to each other, and are therefore easy to spot. In this case, the minimum correlation score between any 2 variables is higher than -0.25, meaning that there are no significant negative correlations. With regards to positive correlation, we are interested in the squares which are white to red. The dendrograms represent show how the variables are progressively clustered.</p><p>The most evident correlations are between <em>Python </em>and <em>SQL</em>, that probably come often together in the kind of job description that describes its requirements in detail, and of <em>deep (learning) </em>with <em>NLP</em> and <em>vision</em>, being NLP and computer vision two of the most trendy applications of neural networks. Other visible correlations are between <em>machin(e learning)</em> and <em>statist(ics)</em>, and <em>product</em> and <em>market</em>.</p><p>What about <em>salary</em>? it weakly correlates with <em>financ(e)</em>, which might say something about the most remunerative sector, but it is not enough evidence.</p><p><strong>Note:</strong> clustered maps are also very useful to get a visually intuitive feel on how the chosen key words are distributed amongst the job description corpus, how they could be clustered based on that, and how the job descriptions could be clustered amongst themselves. You could see, for example, that key words <em>experience</em> and <em>python </em>are almost evenly distributed across the corpus, whereas others, such as <em>NLP</em> and <em>vision</em>, are more concentrated (<a href="https://github.com/RaffaToSpace/Job_ads_scraping_nlp/blob/master/data/cluster_heatmap.png">see my map for further detail</a>).</p><h3>Conclusions</h3><p>In this article I have shown my approach to smart job hunting, using basic web-scraping and NLP techniques to gather insights into the job market. Based on the results:</p><ul><li>I would consider investing time in improving my skills in NLP and SQL.</li><li>I would pay particular attention to enriching my portfolio with real-life projects and thus enhance my demonstrable experience in the field.</li><li>I would also work on my analytics and research skills, creating my own problems to solve, and producing valuable insights from them.</li></ul><h4>Further work</h4><p>This is very much an open-ended project, as the information acquired depends on the moment and will change over time, and the analysis can be done on many different levels. For example, it would be interesting to:</p><ul><li>Perform clustering on job ads, on the basis of their content, to find further links between key words and quantities or features characterising jobs.</li><li>Develop a job salary regression predictor, gathering large quantities of salary value observations, and with a correct comparison between compensation for different kinds of contracts.</li></ul><p>I hope the work I have described here can be useful to others. Feel free to reach out and connect if you would like to talk about it.</p><h3>About me</h3><p>I am a Data Scientist currently looking for new opportunities. In the past few years, I have been working on applied quantum techonologies for space applications.</p><p>GitHub: <a href="https://github.com/RaffaToSpace">https://github.com/RaffaToSpace</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/raffaele-nolli-581a4351/">https://www.linkedin.com/in/raffaele-nolli-581a4351/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=726845ca9638" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-to-identify-the-most-requested-skills-on-the-data-science-job-market-with-data-science-726845ca9638">How to identify the most requested skills on the data science job market, with data science</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[Gain key machine learning skills with a beginner-friendly project]]></title>
            <link>https://medium.com/analytics-vidhya/how-to-make-a-simple-machine-learning-project-and-learn-in-the-process-c4d0dd605eb9?source=rss-1c571759632f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4d0dd605eb9</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[kaggle]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Raffaele Nolli]]></dc:creator>
            <pubDate>Tue, 05 May 2020 13:32:40 GMT</pubDate>
            <atom:updated>2020-05-08T16:34:33.502Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*_WluqQPJUPkRItYjNenmqQ.png" /><figcaption>Heat map of the property prices in Ames, Iowa.</figcaption></figure><p>As an aspiring data scientist, one of the most important things is to find the right kinds of personal projects —those that allow you to draw meaningful information from data while boosting your learning.</p><p>In this article I share my experience of building a project around a commercial dataset, which I used to create a model that can predict house prices with a root mean absolute error of around $39k. This project helped me to build my data cleaning, feature engineering and predictive modelling skills.</p><p>A good place to start is <a href="https://www.kaggle.com/">Kaggle</a>, which has thousands of datasets to choose from. I picked <a href="https://www.kaggle.com/c/predict-the-housing-price">a dataset</a> about houses sold in Ames, Iowa, and decided I would aim to build a <strong>simple and effective predictor</strong> for house prices in Ames, <strong>based on the houses’ descriptive features</strong>, as presented in the dataset.</p><p><strong>Why this dataset? </strong>Because it looked like data cleaning and feature engineering would be a challenge, and it was a good playground dataset. To achieve my goal, I had to go through all the major steps of the data science production process, as explained <a href="https://medium.com/ml-research-lab/data-science-methodology-101-2fa9b7cf2ffe">in this Medium article</a>, apart from data collection and commercial deployment. I followed this process:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0JphFno63LTDE7Bt03Kpfw.png" /></figure><p>By using a modular and simple project structure, I intended to make my work easy to understand and follow, so that anyone could provide feedback or suggestions for improvement, or use it as a reference for their own ideas. I hope it will inspire you to pursue your own ML goals.</p><p>For more information, please check out the <a href="https://github.com/RaffaToSpace/House-Price-Predictor">project repo</a>.</p><h3>Data Cleaning and exploration</h3><p>If you take a look at the original data, you might think someone pulled a bad joke on Kaggle users: 79 descriptive variables, 43 of which are non-numerical categorical, and many without any clear order or hierarchy of values. The data description file attached is a bit messy and there are typos here and there.</p><p>Some non-numerical variables have clearly ordered values (e.g. <em>good</em>, <em>bad</em>, <em>excellent</em>, etc.), hence integer encoding and treating missing values is easy; in other cases, when dealing with unordered, non-numerical categorical variables, a good strategy is <a href="https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html">one-hot encoding</a>, however in this case it would produce a dataset with hundreds of columns, most of which were of little consequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Is_gjjf6ovB-uyrAChxGYg.png" /><figcaption>See the dataset documentation for information on the variable values.</figcaption></figure><p>I decided to perform a thorough analysis of all the variables, and some data exploration, in order to find an order for variable values where present, but not explicit. As an example, building materials have different costs and have an impact on the sale price, and it makes sense to encode them with a price-dependent order. Note that this is an arbitrary choice, and other strategies could be chosen instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*xLf2kHimbUWp4-q9Bm7C9Q.png" /></figure><p>I wanted to see what the target variable <em>SalePrice </em>looked like, and it nicely fits a skewed normal distribution, which is consistent with the <a href="https://www.brookings.edu/research/housing-in-the-u-s-is-too-expensive-too-cheap-and-just-right-it-depends-on-where-you-live/">house price distribution at a national level</a>. This means that the data engineering package and the predictive model developed within this project are easily exportable and not specific to the town in this dataset.</p><h3>Feature Engineering</h3><h4>Location, location, location</h4><p>The location information for each house is provided as a code referring to a neighbourhood (or a geographic reference), and in order to make some sense of it I decided to fill a lookup table with the actual names of neighbourhoods, and calculate the distance to the town centre by obtaining the neighbourhood coordinates with the <em>geopy </em>package.</p><p>By using Google Maps tools, such as the <em>gmaps</em> package, I was able to generate a house price heat map of Ames, and you can find it at the top of the post.</p><p>In this way, I intend to define a method that is easily replicable for any kind of location of interest that, in a town of choice, may have an impact on the property prices.</p><h4>Dimensionality reduction</h4><p>If anyone took a close look at the dataset, they would see that a few of the 79 descriptive variables are redundant, or not relevant for most cases. As an example, there are several quality scores for different parts of the house, and it is reasonable to assume that if a house’s quality score is high, all or most scores will be high; and the surface extension of a second floor is only relevant if there is a second floor, which may be a minority case.</p><p>Another reason to perform feature reduction is to get a first indication on the important features in the dataset, i.e. those that carry useful information (in terms of variance) and that can help with model explainability.</p><p>The main goal of this part of the project was to reduce the dimensionality of data and, as a way of learning, I decided to try a few routinely used methods:</p><ul><li>selection of the features highly correlated (i.e. corr. coefficient &gt;0.5) with the target;</li><li>identification of highly correlated variables (i.e. corr. coefficient &gt;0.8), and discarding of redundancies;</li><li>principal component analysis, limiting the number of components to retain 95% of the sample variance;</li><li>feature selection through a wrapper function, by backward elimination (fit the data with a regressor function, and iteratively remove the least significant feature) and <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.RFE.html">recursive feature elimination</a>;</li><li>feature selection through <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LassoCV.html?highlight=lassocv#sklearn.linear_model.LassoCV">LassoCV</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*s1hTS0vQNKueoF-fggz02g.png" /></figure><p>I packaged the feature engineering methods neatly in a module, which is available in the project repository, so that anyone could apply them to a dataset structured like the provided one, should you happen to find one.</p><h3>A Baseline Model</h3><p>I used a simple linear regression model to assess the dimensionality-reduced datasets, and to have a baseline for the predictive model. The Kaggle competition ranks submission for this project according to the root mean square error of the prices logarithm, so that the evaluation metric is not unbalanced towards higher prices.</p><p>The attached table shows how the baseline model did when tried with the complete dataset and with the dimensionality-reduced ones. As you can see, there are a few datasets that perform better than the others, and I am going to use them for my predictive model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*x4ioBRAMxSrH33ylgaYJ6g.png" /></figure><p>Again, this is a subjective choice and you could use just one of the dimensionality-reduced datasets, or all of them, and in doing this I am merely showing my evidence-based decision process.</p><h3>My Predictive Model</h3><p>For my predictive model I chose the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html">Stochastic Gradient Descent (SGD) regressor</a>, following the advice of the <a href="https://scikit-learn.org/stable/tutorial/machine_learning_map/index.html">scikit-learn algorithm map</a>. Compared to other algorithms, SGDregressor is relatively s<a href="https://scikit-learn.org/stable/modules/sgd.html#regression">imple to implement and tune</a>, well-suited for the kind of dataset available, and provides the feature coefficients for the fitted function, which can be useful for analysis.</p><p>There are many valid alternative algorithms for this kind of problem, such as <a href="https://machinelearningmastery.com/gradient-boosting-with-scikit-learn-xgboost-lightgbm-and-catboost/">LightGBM, CatBoost and XGBoost</a>, and if anyone out there would like to try them, please let me know what happens. I tried building a simple neural network predictor, but it consistently underperformed with respect to SGD. I am a big fan of <a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html">Random Forests</a>(RF), so I might add a RF-based predictive model to the project at some point.</p><p>After a round of parameter optimisation with <a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html">GridSearchCV</a>, I generated train/test splits of the datasets to test my model, and I chose the two best performing versions of the dataset (with dimensionality reduced through backward elimination, and principal component analysis) to make my submission to the Kaggle competition.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*IYrZm7JrYBUHpWmfWpfymg.png" /></figure><p>From the residuals plot, it can be seen how the model scores might be thrown off by outliers, which may regard houses sold in particular situations not captured by the descriptive features, or best captured by some discarded features.</p><p>The inconvenience of PCA is that the new components of the dataset cannot be easily related to any feature in the initial dataset, and while this might work well enough with a predictive model, it makes it impossible to gain any insight from the feature coefficients. Luckily, I can use the dataset reduced through backward elimination, and obtain information on the features’ importance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rdelt1Ty2CbOSjbmYiUE6g.png" /><figcaption>Please refer to the <a href="https://github.com/RaffaToSpace/House-Price-Predictor/blob/master/data/datadescription.txt">data description file</a> for more details about the features.</figcaption></figure><p>Unsurprisingly, the main features affecting the house price are quality scores (overall quality, kitchen quality,etc.), size (total rooms above ground, ground living area, etc.), whereas the age of the house obviously impacts negatively on the house price, although less than quality and surface.</p><h3>Project Output and Key Takeaways</h3><p>In this project I have taken a commercial dataset, manipulated it, and used it to build a model that can predict house prices with a root mean absolute error of roughly $39k, as returned by the Kaggle competition submission evaluation page, which is approximately 24% of the median house price within the dataset.</p><p>The SGD predicting model does not seem to perform very differently from the baseline model, and this could mean that I am not making the most of the algorithm’s potential. The baseline model, however, predicts house prices with a root mean square error of $69k, which probably means it is overfitting. As a next step, it would be interesting to push the model optimisation a bit further, or try new algorithms.</p><p>While working on this dataset, I have used quite a few data science techniques and key tools for data cleaning, feature engineering, modelling, and data analysis. At the end of the project, I saved the functions and algorithms used in a test package, which <a href="https://test.pypi.org/project/pthp-data-prep/0.1/">I uploaded to TestPyPi</a>.</p><h3>About me</h3><p>I am a Data Scientist currently looking for new opportunities. In the past few years I have been working on applied quantum techonologies for space applications. Feel free to send me a message if you’d like to talk about this or other projects on my GitHub page.</p><p>GitHub: <a href="https://github.com/RaffaToSpace">https://github.com/RaffaToSpace</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/raffaele-nolli-581a4351/">https://www.linkedin.com/in/raffaele-nolli-581a4351/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4d0dd605eb9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/how-to-make-a-simple-machine-learning-project-and-learn-in-the-process-c4d0dd605eb9">Gain key machine learning skills with a beginner-friendly project</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>