Mech Eng Defectors – A hackathon story AI Hack 2021

Published Mar 02 2021 08:37 AM 733 Views
Microsoft
 

AIHack.png


Introduction & Profiles

 

Hi there everyone! We are the Mech Eng Defectors, 1st place prize winners of Imperial College London Data Science Society’s (ICDSS) 2021 AI Hackathon for the ‘Boston housing challenge’. As you may have inferred from our unapologetic, slightly tongue in cheek name, we are two mechanical engineers from Imperial College London looking to transition from the classical engineering scene into the realm of data science. Our names are Kyriacos and Yousef, and our bios are found below, along with relevant links for the project:

TeamMechEng.JPG

Github.JPGLinkedin.JPG                      Medium.JPGGithub.JPGLinkedin.JPG

 

Project Resources 
projectreport.JPG
Project Report
   ProjectRepo.JPG 
Project Repo 

ProjectWebSite.JPG
Project Website 

We encourage you to check out the links if you find the blog interesting, as you can find more detail about the preprocessing methods that we used. This blog will mainly focus on the methodology at a very high level and the results.


Although our academic backgrounds are somewhat unorthodox in the world of data science, our core philosophies and beliefs as engineers are no different from that of many data scientists; to use our skills, knowledge and creativity to drive positive societal change. Therefore, armed with our limited machine learning knowledge, bucket loads of enthusiasm and much coffee on standby, we embarked on a 24-hour odyssey to not only compete in the UK’s largest student held hackathon, but hopefully shed some light onto the rectification of a societal problem.

The Boston Housing Market Challenge:

As far as datasets go, the Boston Housing dataset is well known, as it has been used extensively in the past to benchmark new algorithms. Despite containing only 506 rows and 14 columns, this dataset should not be underestimated, as with careful and calculated manipulations it can be unlocked to provide some fascinating deeper insights, hence its popularity.

 

Despite this, most projects focus on calculating house prices based on other factors. Many even employ external datasets to help with this. We felt that doing so would be quite fun, but not as intriguing and challenging as trying to answer a question that has implications in terms of policy. We therefore spent the first 4-6 hours of the datathon scoping a research question.

 

Following some simple distributions of the variables as well as a correlation matrix (we used the amazing library pandas-profiling), we noticed a large disparity in the NOx levels which are present in the Boston area, ranging from non-existent to major health hazards. To add to the confusion, other factors such as crime, house prices and number of residents from lower socioeconomic backgrounds also showed huge disparities. We began to ask ourselves as to how these all could be interlinked. Are higher NOx levels directly correlated to one or more other variables? What kind of areas specifically have the highest NOx levels? Are there any exceptions? After much deliberation, we hypothesised that NOx levels can be linked to the socioeconomic status of each instance. Moreover, we wanted to discover which factors could be changed in these neighbourhoods that would lead to the greatest decline in NOx levels.

 

With that preliminary research, we decided to answer the following question:

 

How will developing low income neighbourhoods in Boston affect NOx levels?

Step 1: Verifying that our dataset is sufficient to answer the research question


Unsurprisingly, our first step was to actually verify that the Boston dataset is informative enough to answer our question. An important assumption that we make is that the towns in Boston are capable of being clustered into socioeconomic classes. We therefore resorted to the tried and tested algorithm of k-means clustering (we used sklearn) as a first step to defining these boundaries, setting a k = 3 (for low, medium and high class). However, how could we trust the output of the algorithm? As a benchmark, we found a report conducted by Boston University on socioeconomic disparity in downtown Boston and tweaked our algorithm until the output visually matched one of the figures in the report. To us, this verified that the dataset is informative enough to effectively cluster the towns into 3 distinct socioeconomic classes. We plotted our results using folium.

 

BostonMap.png

 

It’s worth noting that the Latitude and Longitude values were erroneous in our data (the same error can be found in other papers, for example, see this paper). We fixed these using Google’s geocoder API. We did so assuming that the distances of the dwellings in each town from the town center were consistent, and that the error in the plot was from the town centers being shifted. Effectively:

 

Formula.JPG

 

Where:

xi.JPG are the coordinates (latitude or longitude) of a dwelling (i.e. an instance in the dataset),

 

X.JPG is the average coordinate of all the dwellings in that town (we take this to be the ‘town center’), and

 

D.JPG is the individual distance of a dwelling from the town center.

 

Effectively, our algorithm replaces the average coordinate with that found through Geocoder API when the town name is searched.

 

 

Step 2: Predicting the NOx levels to reasonable accuracy using Regression


The second step in our approach was to actually determine the NOx levels. Through preliminary analysis, we found that the most informative parameters were as follows:

  • CRIM: an indicator of the level of crime in the neighbourhood
  • INDUS: an indicator of the number of non-retail businesses
  • AGE: an indicator of the age of houses in the area
  • DIS: an indicator of the distance from employment centres
  • RAD: an index of the number of highways and roads

With this in mind, we tried a number of models to find that which provides the best accuracy. We followed the methodology described by the flowchart on the right.

Model.jpg

 

Our top 3 models are summarised below:

 

ModelResult.png

 

The SVR was the highest performing model. This agreed with our intuition: one of our features (RAD) is actually an abstract index that is reported as an ordinal value, as opposed to continuous. We suspected that standard linear regression techniques would fail to capture this, and that a Support Vector method wouldn’t.

 

Step 3: Simulating ‘development’ of a town and measuring the effect on NOx levels


The final step of the project was to simulate development. This is where we felt that our work was ‘novel’ and smart in its approach. Looking closely at the data, we realised that we could split the attributes into two categories: geographically constrained and non-geographically constrained (i.e. socioeconomic).

For instance, the variable CRIM would be something that is not geographically constrained: it is possible to implement policies that decrease crime in neighbourhoods.


On the other hand, something like DIS is geographically fixed, since changing the distance to employment centres would either mean magically moving the towns, or the employment centres. The former is impossible, and the latter is unfeasible economically.


As a result, we defined ‘development’ of a low-income towns by replacing it’s non-geographically constrained features with those representative of high-income towns.


Effectively, this meant creating a bootstrapped high-income town dataset.

The image below shows the decrease in NOx levels when low income towns are improved (on the left), compared to the original (on the right).

 

Map2.png

 

Conclusion and Future Work

 

The evidence suggests improving low-income neighbourhood leads to decreased levels of NOx, which gives even more incentives to developing them. A recommendation we make is that governments should provide incentives for companies to move their industrial buildings away from the city center. However, we note that more research needs to be done to determine the socioeconomic impact this may have, as radical shifts may cause many residents of low-income neighbourhoods to lose their jobs as a result.

In our analysis of the non-geographically constrained features (CRIM and AGE), we noticed a decrease in either, keeping all other parameters constant, results in a decrease in NOx. This seems somewhat intuitive with AGE, since improving the infrastructure of old dwellings is likely to have positive environmental impacts, but is nonsensical with crime, since the link is not clear or intuitive. We therefore think CRIM is a variable that may explain or act as a predictor for changes in NOx levels, but not as a reason. One of our recommendations is therefore that future work should explore the causality of CRIM and AGE.

%3CLINGO-SUB%20id%3D%22lingo-sub-2178670%22%20slang%3D%22en-US%22%3EMech%20Eng%20Defectors%20%E2%80%93%20A%20hackathon%20story%20AI%20Hack%202021%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2178670%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EIntroduction%20%26amp%3B%20Profiles%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_10%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22AIHack.jpg%22%20style%3D%22width%3A%20464px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259936i838664FB9BB1F425%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22AIHack.jpg%22%20alt%3D%22AIHack.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EHi%20there%20everyone!%20We%20are%20the%20Mech%20Eng%20Defectors%2C%201st%20place%20prize%20winners%20of%20%3CA%20href%3D%22http%3A%2F%2Fwww.imperial.ac.uk%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EImperial%20College%20London%3C%2FA%3E%20Data%20Science%20Society%E2%80%99s%20(%3CA%20href%3D%22https%3A%2F%2Fwww.icdss.club%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EICDSS%3C%2FA%3E)%20%3CA%20href%3D%22https%3A%2F%2Faihack.org%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E2021%20AI%20Hackathon%3C%2FA%3E%20for%20the%20%E2%80%98Boston%20housing%20challenge%E2%80%99.%20As%20you%20may%20have%20inferred%20from%20our%20unapologetic%2C%20slightly%20tongue%20in%20cheek%20name%2C%20we%20are%20two%20mechanical%20engineers%20from%20Imperial%20College%20London%20looking%20to%20transition%20from%20the%20classical%20engineering%20scene%20into%20the%20realm%20of%20data%20science.%20Our%20names%20are%20Kyriacos%20and%20Yousef%2C%20and%20our%20bios%20are%20found%20below%2C%20along%20with%20relevant%20links%20for%20the%20project%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22TeamMechEng.JPG%22%20style%3D%22width%3A%20286px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259900i997E6764EC1622A8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22TeamMechEng.JPG%22%20alt%3D%22TeamMechEng.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FRAV4ever%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Github.JPG%22%20style%3D%22width%3A%2031px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259902i19DD5F632D849FCD%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22Github.JPG%22%20alt%3D%22Github.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%3CA%20href%3D%22https%3A%2F%2Fwww.linkedin.com%2Fin%2Fkyriacos-theocharides-0a459516b%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Linkedin.JPG%22%20style%3D%22width%3A%2036px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259904i28EBFD11BD4B910F%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22Linkedin.JPG%22%20alt%3D%22Linkedin.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmedium.com%2F%40namiyousef96%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Medium.JPG%22%20style%3D%22width%3A%2031px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259906i48771A3D7F49170D%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22Medium.JPG%22%20alt%3D%22Medium.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnamiyousef%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Github.JPG%22%20style%3D%22width%3A%2031px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259905iB820C5A71DAF1D0B%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22Github.JPG%22%20alt%3D%22Github.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%3CA%20href%3D%22https%3A%2F%2Fwww.linkedin.com%2Fin%2Fyousefnami77%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Linkedin.JPG%22%20style%3D%22width%3A%2036px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259908i39E93FDFF6B554BA%2Fimage-size%2Fsmall%3Fv%3D1.0%26amp%3Bpx%3D200%22%20role%3D%22button%22%20title%3D%22Linkedin.JPG%22%20alt%3D%22Linkedin.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3CSTRONG%3EProject%20Resources%26nbsp%3B%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnamiyousef%2Fai_hack_2021%2Fblob%2Fmain%2Freports%2Fai_hack_2021_MechEngDefectors_final.pdf%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22projectreport.JPG%22%20style%3D%22width%3A%2077px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259909i765CFB6157DF6F92%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22projectreport.JPG%22%20alt%3D%22projectreport.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnamiyousef%2Fai_hack_2021%2Fblob%2Fmain%2Freports%2Fai_hack_2021_MechEngDefectors_final.pdf%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EProject%20Report%3C%2FA%3E%3CBR%20%2F%3E%26nbsp%3B%20%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnamiyousef%2Fai_hack_2021%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ProjectRepo.JPG%22%20style%3D%22width%3A%2054px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259911i01067E51BB65794F%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ProjectRepo.JPG%22%20alt%3D%22ProjectRepo.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnamiyousef%2Fai_hack_2021%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3EProject%20Repo%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fnamiyousef.github.io%2Fai_hack_2021%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ProjectWebSite.JPG%22%20style%3D%22width%3A%2057px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259910i97A595AD6206BA2E%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ProjectWebSite.JPG%22%20alt%3D%22ProjectWebSite.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fnamiyousef.github.io%2Fai_hack_2021%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EProject%20Website%26nbsp%3B%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EWe%20encourage%20you%20to%20check%20out%20the%20links%20if%20you%20find%20the%20blog%20interesting%2C%20as%20you%20can%20find%20more%20detail%20about%20the%20preprocessing%20methods%20that%20we%20used.%20This%20blog%20will%20mainly%20focus%20on%20the%20methodology%20at%20a%20very%20high%20level%20and%20the%20results.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EAlthough%20our%20academic%20backgrounds%20are%20somewhat%20unorthodox%20in%20the%20world%20of%20data%20science%2C%20our%20core%20philosophies%20and%20beliefs%20as%20engineers%20are%20no%20different%20from%20that%20of%20many%20data%20scientists%3B%20to%20use%20our%20skills%2C%20knowledge%20and%20creativity%20to%20drive%20positive%20societal%20change.%20Therefore%2C%20armed%20with%20our%20limited%20machine%20learning%20knowledge%2C%20bucket%20loads%20of%20enthusiasm%20and%20much%20coffee%20on%20standby%2C%20we%20embarked%20on%20a%2024-hour%20odyssey%20to%20not%20only%20compete%20in%20the%20UK%E2%80%99s%20largest%20student%20held%20hackathon%2C%20but%20hopefully%20shed%20some%20light%20onto%20the%20rectification%20of%20a%20societal%20problem.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EThe%20Boston%20Housing%20Market%20Challenge%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EAs%20far%20as%20datasets%20go%2C%20the%20Boston%20Housing%20dataset%20is%20well%20known%2C%20as%20it%20has%20been%20used%20extensively%20in%20the%20past%20to%20benchmark%20new%20algorithms.%20Despite%20containing%20only%20506%20rows%20and%2014%20columns%2C%20this%20dataset%20should%20not%20be%20underestimated%2C%20as%20with%20careful%20and%20calculated%20manipulations%20it%20can%20be%20unlocked%20to%20provide%20some%20fascinating%20deeper%20insights%2C%20hence%20its%20popularity.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDespite%20this%2C%20most%20projects%20focus%20on%20calculating%20house%20prices%20based%20on%20other%20factors.%20Many%20even%20employ%20external%20datasets%20to%20help%20with%20this.%20We%20felt%20that%20doing%20so%20would%20be%20quite%20fun%2C%20but%20not%20as%20intriguing%20and%20challenging%20as%20trying%20to%20answer%20a%20question%20that%20has%20implications%20in%20terms%20of%20policy.%20We%20therefore%20spent%20the%20first%204-6%20hours%20of%20the%20datathon%20scoping%20a%20research%20question.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFollowing%20some%20simple%20distributions%20of%20the%20variables%20as%20well%20as%20a%20correlation%20matrix%20(we%20used%20the%20amazing%20library%20pandas-profiling)%2C%20we%20noticed%20a%20large%20disparity%20in%20the%20NOx%20levels%20which%20are%20present%20in%20the%20Boston%20area%2C%20ranging%20from%20non-existent%20to%20major%20health%20hazards.%20To%20add%20to%20the%20confusion%2C%20other%20factors%20such%20as%20crime%2C%20house%20prices%20and%20number%20of%20residents%20from%20lower%20socioeconomic%20backgrounds%20also%20showed%20huge%20disparities.%20We%20began%20to%20ask%20ourselves%20as%20to%20how%20these%20all%20could%20be%20interlinked.%20Are%20higher%20NOx%20levels%20directly%20correlated%20to%20one%20or%20more%20other%20variables%3F%20What%20kind%20of%20areas%20specifically%20have%20the%20highest%20NOx%20levels%3F%20Are%20there%20any%20exceptions%3F%20After%20much%20deliberation%2C%20we%20hypothesised%20that%20NOx%20levels%20can%20be%20linked%20to%20the%20socioeconomic%20status%20of%20each%20instance.%20Moreover%2C%20we%20wanted%20to%20discover%20which%20factors%20could%20be%20changed%20in%20these%20neighbourhoods%20that%20would%20lead%20to%20the%20greatest%20decline%20in%20NOx%20levels.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWith%20that%20preliminary%20research%2C%20we%20decided%20to%20answer%20the%20following%20question%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHow%20will%20developing%20low%20income%20neighbourhoods%20in%20Boston%20affect%20NOx%20levels%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%201%3A%3C%2FSTRONG%3E%20Verifying%20that%20our%20dataset%20is%20sufficient%20to%20answer%20the%20research%20question%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EUnsurprisingly%2C%20our%20first%20step%20was%20to%20actually%20verify%20that%20the%20Boston%20dataset%20is%20informative%20enough%20to%20answer%20our%20question.%20An%20important%20assumption%20that%20we%20make%20is%20that%20the%20towns%20in%20Boston%20are%20capable%20of%20being%20clustered%20into%20socioeconomic%20classes.%20We%20therefore%20resorted%20to%20the%20tried%20and%20tested%20algorithm%20of%20k-means%20clustering%20(we%20used%20sklearn)%20as%20a%20first%20step%20to%20defining%20these%20boundaries%2C%20setting%20a%20k%20%3D%203%20(for%20low%2C%20medium%20and%20high%20class).%20However%2C%20how%20could%20we%20trust%20the%20output%20of%20the%20algorithm%3F%20As%20a%20benchmark%2C%20we%20found%20a%20%3CA%20href%3D%22https%3A%2F%2Fwww.bu.edu%2Fise%2Ffiles%2F2019%2F06%2FCFB_Social_Equity_Report_053119.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ereport%3C%2FA%3E%20conducted%20by%20Boston%20University%20on%20socioeconomic%20disparity%20in%20downtown%20Boston%20and%20tweaked%20our%20algorithm%20until%20the%20output%20visually%20matched%20one%20of%20the%20figures%20in%20the%20report.%20To%20us%2C%20this%20verified%20that%20the%20dataset%20is%20informative%20enough%20to%20effectively%20cluster%20the%20towns%20into%203%20distinct%20socioeconomic%20classes.%20We%20plotted%20our%20results%20using%20folium.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_1%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22BostonMap.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259912i2B876D71B2E187C6%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22BostonMap.png%22%20alt%3D%22BostonMap.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%E2%80%99s%20worth%20noting%20that%20the%20Latitude%20and%20Longitude%20values%20were%20erroneous%20in%20our%20data%20(the%20same%20error%20can%20be%20found%20in%20other%20papers%2C%20for%20example%2C%20see%20this%20%3CA%20href%3D%22https%3A%2F%2Frpubs.com%2FMturgal%2F164857%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Epaper%3C%2FA%3E).%20We%20fixed%20these%20using%20Google%E2%80%99s%20geocoder%20API.%20We%20did%20so%20assuming%20that%20the%20distances%20of%20the%20dwellings%20in%20each%20town%20from%20the%20town%20center%20were%20consistent%2C%20and%20that%20the%20error%20in%20the%20plot%20was%20from%20the%20town%20centers%20being%20shifted.%20Effectively%3A%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_2%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Formula.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259913iDF5E9DBE5C9208AF%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Formula.JPG%22%20alt%3D%22Formula.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhere%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22xi.JPG%22%20style%3D%22width%3A%2019px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259928iC199053D3327C74A%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22xi.JPG%22%20alt%3D%22xi.JPG%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%26nbsp%3Bare%20the%20coordinates%20(latitude%20or%20longitude)%20of%20a%20dwelling%20(i.e.%20an%20instance%20in%20the%20dataset)%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_4%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22X.JPG%22%20style%3D%22width%3A%2019px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259929i2B3585D6F3125D88%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22X.JPG%22%20alt%3D%22X.JPG%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3Bis%20the%20%3CSTRONG%3Eaverage%3C%2FSTRONG%3E%20coordinate%20of%20all%20the%20dwellings%20in%20that%20town%20(we%20take%20this%20to%20be%20the%20%E2%80%98town%20center%E2%80%99)%2C%20and%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_5%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22D.JPG%22%20style%3D%22width%3A%2019px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259930iA4AAD5FA810F38B5%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22D.JPG%22%20alt%3D%22D.JPG%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3Bis%20the%20individual%20distance%20of%20a%20dwelling%20from%20the%20town%20center.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEffectively%2C%20our%20algorithm%20replaces%20the%20average%20coordinate%20with%20that%20found%20through%20Geocoder%20API%20when%20the%20town%20name%20is%20searched.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_6%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%202%3A%3C%2FSTRONG%3E%20Predicting%20the%20NOx%20levels%20to%20reasonable%20accuracy%20using%20Regression%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EThe%20second%20step%20in%20our%20approach%20was%20to%20actually%20determine%20the%20NOx%20levels.%20Through%20preliminary%20analysis%2C%20we%20found%20that%20the%20most%20informative%20parameters%20were%20as%20follows%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ECRIM%3A%20an%20indicator%20of%20the%20level%20of%20crime%20in%20the%20neighbourhood%3C%2FLI%3E%0A%3CLI%3EINDUS%3A%20an%20indicator%20of%20the%20number%20of%20non-retail%20businesses%3C%2FLI%3E%0A%3CLI%3EAGE%3A%20an%20indicator%20of%20the%20age%20of%20houses%20in%20the%20area%3C%2FLI%3E%0A%3CLI%3EDIS%3A%20an%20indicator%20of%20the%20distance%20from%20employment%20centres%3C%2FLI%3E%0A%3CLI%3ERAD%3A%20an%20index%20of%20the%20number%20of%20highways%20and%20roads%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EWith%20this%20in%20mind%2C%20we%20tried%20a%20number%20of%20models%20to%20find%20that%20which%20provides%20the%20best%20accuracy.%20We%20followed%20the%20methodology%20described%20by%20the%20flowchart%20on%20the%20right.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Model.jpg%22%20style%3D%22width%3A%20379px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259932iF05B0292DC98315A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Model.jpg%22%20alt%3D%22Model.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOur%20top%203%20models%20are%20summarised%20below%3A%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_7%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20SVR%20was%20the%20%3CSTRONG%3Ehighest%3C%2FSTRONG%3E%20performing%20model.%20This%20agreed%20with%20our%20intuition%3A%20one%20of%20our%20features%20(RAD)%20is%20actually%20an%20abstract%20index%20that%20is%20reported%20as%20an%20%3CSTRONG%3Eordinal%3C%2FSTRONG%3E%20value%2C%20as%20opposed%20to%20%3CSTRONG%3Econtinuous%3C%2FSTRONG%3E.%20We%20suspected%20that%20standard%20linear%20regression%20techniques%20would%20fail%20to%20capture%20this%2C%20and%20that%20a%20Support%20Vector%20method%20wouldn%E2%80%99t.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EStep%203%3A%3C%2FSTRONG%3E%20Simulating%20%E2%80%98development%E2%80%99%20of%20a%20town%20and%20measuring%20the%20effect%20on%20NOx%20levels%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EThe%20final%20step%20of%20the%20project%20was%20to%20simulate%20development.%20This%20is%20where%20we%20felt%20that%20our%20work%20was%20%E2%80%98novel%E2%80%99%20and%20smart%20in%20its%20approach.%20Looking%20closely%20at%20the%20data%2C%20we%20realised%20that%20we%20could%20split%20the%20attributes%20into%20two%20categories%3A%20geographically%20constrained%20and%20non-geographically%20constrained%20(i.e.%20socioeconomic).%3C%2FP%3E%0A%3CP%3EFor%20instance%2C%20the%20variable%20CRIM%20would%20be%20something%20that%20is%20not%20geographically%20constrained%3A%20it%20is%20possible%20to%20implement%20policies%20that%20decrease%20crime%20in%20neighbourhoods.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EOn%20the%20other%20hand%2C%20something%20like%20DIS%20is%20geographically%20fixed%2C%20since%20changing%20the%20distance%20to%20employment%20centres%20would%20either%20mean%20magically%20moving%20the%20towns%2C%20or%20the%20employment%20centres.%20The%20former%20is%20impossible%2C%20and%20the%20latter%20is%20unfeasible%20economically.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EAs%20a%20result%2C%20we%20defined%20%E2%80%98development%E2%80%99%20of%20a%20low-income%20towns%20by%20replacing%20it%E2%80%99s%20non-geographically%20constrained%20features%20with%20those%20representative%20of%20high-income%20towns.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EEffectively%2C%20this%20meant%20creating%20a%20bootstrapped%20high-income%20town%20dataset.%3C%2FP%3E%0A%3CP%3EThe%20image%20below%20shows%20the%20decrease%20in%20NOx%20levels%20when%20low%20income%20towns%20are%20improved%20(on%20the%20left)%2C%20compared%20to%20the%20original%20(on%20the%20right).%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorLee%20Stott_8%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Map2.png%22%20style%3D%22width%3A%20903px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F259934iE68D79DF8B81FCC4%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Map2.png%22%20alt%3D%22Map2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EConclusion%20and%20Future%20Work%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20evidence%20suggests%20improving%20low-income%20neighbourhood%20leads%20to%20decreased%20levels%20of%20NOx%2C%20which%20gives%20even%20more%20incentives%20to%20developing%20them.%20A%20recommendation%20we%20make%20is%20that%20governments%20should%20provide%20incentives%20for%20companies%20to%20move%20their%20industrial%20buildings%20away%20from%20the%20city%20center.%20However%2C%20we%20note%20that%20more%20research%20needs%20to%20be%20done%20to%20determine%20the%20socioeconomic%20impact%20this%20may%20have%2C%20as%20radical%20shifts%20may%20cause%20many%20residents%20of%20low-income%20neighbourhoods%20to%20lose%20their%20jobs%20as%20a%20result.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EIn%20our%20analysis%20of%20the%20non-geographically%20constrained%20features%20(CRIM%20and%20AGE)%2C%20we%20noticed%20a%20decrease%20in%20either%2C%20keeping%20all%20other%20parameters%20constant%2C%20results%20in%20a%20decrease%20in%20NOx.%20This%20seems%20somewhat%20intuitive%20with%20AGE%2C%20since%20improving%20the%20infrastructure%20of%20old%20dwellings%20is%20likely%20to%20have%20positive%20environmental%20impacts%2C%20but%20is%20nonsensical%20with%20crime%2C%20since%20the%20link%20is%20not%20clear%20or%20intuitive.%20We%20therefore%20think%20CRIM%20is%20a%20variable%20that%20may%20explain%20or%20act%20as%20a%20predictor%20for%20changes%20in%20NOx%20levels%2C%20but%20not%20as%20a%20reason.%20One%20of%20our%20recommendations%20is%20therefore%20that%20future%20work%20should%20explore%20the%20causality%20of%20CRIM%20and%20AGE.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2178670%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20there%20everyone!%20We%20are%20the%20Mech%20Eng%20Defectors%2C%201st%20place%20prize%20winners%20of%20Imperial%20College%20London%20Data%20Science%20Society%E2%80%99s%20(%3CA%20href%3D%22https%3A%2F%2Fwww.icdss.club%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EICDSS%3C%2FA%3E)%202021%20AI%20Hackathon%20for%20the%20%E2%80%98Boston%20housing%20challenge%E2%80%99.%20As%20you%20may%20have%20inferred%20from%20our%20unapologetic%2C%20slightly%20tongue%20in%20cheek%20name%2C%20we%20are%20two%20mechanical%20engineers%20looking%20to%20transition%20from%20the%20classical%20engineering%20scene%20into%20the%20realm%20of%20data%20science.%20Our%20names%20are%20Kyriacos%20and%20Yousef%2C%20and%20our%20bios%20are%20found%20below%2C%20along%20with%20relevant%20links%20for%20the%20project%3A%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Co-Authors
Version history
Last update:
‎Mar 02 2021 08:45 AM
Updated by: