<?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 Conor McCormick on Medium]]></title>
        <description><![CDATA[Stories by Conor McCormick on Medium]]></description>
        <link>https://medium.com/@conormc?source=rss-11575e14837a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bgaqDIhJfGDLEoD_DzolaA.jpeg</url>
            <title>Stories by Conor McCormick on Medium</title>
            <link>https://medium.com/@conormc?source=rss-11575e14837a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 01:44:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@conormc/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[The  AI NI Hackathon; How We Won It, What We Built and Why Hackathons Matter]]></title>
            <link>https://medium.com/@conormc/the-ai-ni-hackathon-how-we-won-it-what-we-built-and-why-hackathons-matter-4616cdd6b3d1?source=rss-11575e14837a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4616cdd6b3d1</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Conor McCormick]]></dc:creator>
            <pubDate>Mon, 13 May 2019 09:09:43 GMT</pubDate>
            <atom:updated>2019-05-13T09:09:43.035Z</atom:updated>
            <content:encoded><![CDATA[<h3>The AI NI Hackathon; How We Won It, What We Built and Why Hackathons Matter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*08jDNsHEDQpqgmbqqrmDCA.png" /></figure><blockquote><em>“Networking the Northern Ireland AI community is the core mandate that drives AI NI. This will be achieved through organising events that target a wide range of demographics that include companies, students and academia.”<br></em><a href="https://www.meetup.com/Artificial-Intelligence-Northern-Ireland/"><em>- AI NI</em></a></blockquote><p>On the 13th and 14th of April, <a href="https://www.meetup.com/Artificial-Intelligence-Northern-Ireland/">AI NI </a>held their ‘Good AIdea Hackathon’. The theme of the event was ‘AI for Good’, and it turned out to be the largest hackathon ever run in Northern Ireland with over 200 attendees taking part across two locations.</p><h3><strong>My Team</strong></h3><p>As a member of the Kainos AI Practice, I felt like this hackathon would be a good chance for me to show off and improve my skills and knowledge in AI. My team consisted of myself and the other software engineers from the AI Practice. We decided beforehand that we were going to enter this hackathon as a team.</p><h3><strong>Challenges</strong></h3><p>There were three challenges that attendees of the hackathon were able to take part in:</p><p>1: The <a href="https://peltarion.com/">Peltarion</a> Challenge. This involved taking data from hearing aids and using AI to help improve them. The example idea given was to help allow the hearing aids to eliminate sound coming from more than one source using AI to detect different voices and background noise.</p><p>2. The <a href="https://www.bazaarvoice.com/uk/">BazaarVoice</a> Challenge. This involved taking reviews, both legit and bot-generated, and trying to build an AI model that could tell the difference between them. This is the challenge that my team decided to take on.</p><p>3. The AI NI Challenge. This was a challenge for any other ideas that the teams had that fell under the banner of ‘AI for Good’.</p><h3><strong>Our Idea</strong></h3><h3>Austin T on Twitter</h3><p>The @KainosSoftware team working away at the @ai_ni_community hackathon</p><p>As previously mentioned, our team took on the BazaarVoice challenge, but we also had a mindset focused on how we could take that and use it as an ‘AI for good’ in order to also fulfil the criteria of the AI NI challenge, which gave us the potential idea of using something like this to detect cyber bullying in tweets. This manifested in the idea of a Google Chrome extension to help users detect fake reviews by allowing users to select a piece of text, for example a review for a product on Amazon, and then this would be run through a classification algorithm and classified as either ‘real’ or ‘fake’ and this would be shown to the user. We also decided to build a webapp with the same functionality to ensure that users who aren’t on Google Chrome would be able to benefit from the use of our project. This would connect to the same API as the Chrome extension (more on that later).</p><p>We had a few challenges and obstacles to overcome to make this project a reality. First of all, accuracy is a big deal when it comes to AI and so we had to build our project to have the highest accuracy possible (which ended up being 95.75%). This is important as it cuts down on the number of falsely flagged reviews (i.e. false positives and false negatives). Additionally, we didn’t really have much experience in building Chrome extensions, so this was something that we would have to learn. We also had to set up a repository, branches and automated testing.</p><h3><strong>Goodies and Perks</strong></h3><p>We were given a T-shirt as a thank you for attending the event. We were also given free food and drinks for the weekend, as well as water bottles and AWS credits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oBGy1DH5RpPSY14iup1yaA.png" /></figure><h3><strong>Day 1 — Development</strong></h3><h3>Liam Ferris on Twitter</h3><p>Well it was awesome to place joint 1st 🔥 and have some serious craic all weekend at the #AINIForGood hackathon! Thanks to @ai_ni_community and congrats for NI&#39;s biggest hack!</p><p>We arrived at the hackathon between 9 and 10 AM on Saturday. Once all the attendees had arrived, we were taken into the lecture theatre where we were briefed about all of the events that would take place over the weekend, the challenges that we would be taking part in, and the prizes that the winners would be receiving. Workshops were given based around data science, text classification and pitching.</p><h3>AI NI on Twitter</h3><p>Our Leader @jordantoaster welcoming us and setting everyone up for an amazing 2 days at our first ever hackathon! #ainiforgood #schoolofai</p><p>After this, we got back to our room and we started to work on our project. We initially started by planning out what we would do and setting up a <a href="https://en.wikipedia.org/wiki/Kanban_(development)">Kanban board</a> to be able to track what had been done, what was currently being done, and what needed to be done. This gave us a good idea of all the work that we needed to put into our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7xKSenjQGhr8joSutNPTA.png" /><figcaption>Our Kanban board we used for planning tasks.</figcaption></figure><p>Our first step in our development was the ‘Data Analysis’ stage, which was for us to familiarise ourselves with the datasets we were given and perform some exploratory processing on it (using pandas to combine data sources and normalise the data, and each team member conducted an independent investigation into the data to gain an unbiased intuition about the approach to solve this problem).</p><p>In order to build our classification model, we needed to decide on two things: a vectoriser, and a classifier. We decided that the best way to do this would be to set up a ‘matrix’, testing each of three vectorisers against each of three classifiers and finding the accuracy score of each combination. We also used grid searching in order to find the optimal parameters in order to get the best accuracy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AvM8PmxbYR3ISMX6wnASUQ.jpeg" /></figure><p>In order to create standard practices and automated testing, we created a common interface for each of our vectorisers and each of our classifiers. This meant that each implementation could be tested and the team had the confidence and ability to use each implementation in the same, simple, standard way.</p><p>We ensured that it was a fair test by making sure to keep the same test sample size and seed (a value that the data is randomised in a set way, and can be replicated). This means that all of the different vectorisers and classifiers could be compared fairly and none would have an unfair advantage against the others based on the training data.</p><h3>Claire Houston on Twitter</h3><p>Results of a long day hacking! #AINIForGood Got some half decent classifications</p><p>We found that using a <a href="https://scikit-learn.org/stable/modules/feature_extraction.html#the-bag-of-words-representation">‘Bag of Words’</a> vectoriser along with a <a href="https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPClassifier.html">‘Neural Network’ </a>classifier gave us the best results so that’s the combination we decided to use.</p><p>Our team put an emphasis on working under good data science principles, in a measured way that put a process around how we write and review different AI models and components. In addition to the three classifiers and vectorisers that we had put to the test, we also ran a test on <a href="https://github.com/google-research/bert">BERT</a>, <a href="https://towardsdatascience.com/bert-explained-state-of-the-art-language-model-for-nlp-f8b21a9b6270">which is a Google-developed deep learning natural language framework built specifically to be able to tackle any natural language machine learning problem.</a> Due to BERT’s low level implementation and the time it takes to be trained, we did not integrate our BERT model into the full system and instead built that with a simpler model that we were able to validate much quicker.</p><p>Meanwhile, we also had to take frontend development into consideration. As previously mentioned, we decided to build a Chrome extension and a webapp. I took on the responsibility of leading the dev work on these frontend implementations. Having never worked with Chrome extensions before, I decided to read through some tutorials in order to make sure I understood how they worked, then got started building ours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7YGLb6cAORYMK521A3wbKw.png" /></figure><p>It was quite easy to get it up and running. It would simply take what the user had selected and send it to an API endpoint, then return the response from the endpoint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M48BmpWFEXNejpZBURDQgA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*cfVFeI-MIkRwIErJfAHQig.png" /></figure><p>We were able to get the Chrome extension finished rather quickly and then we moved on to developing the webapp. This was a simple webpage containing a textfield and a button. The button would take the input from the textfield, and send this to the same API endpoint that the Chrome extension uses, i.e. using the exact same classification model as the Chrome extension, allowing us to use this API as a microservice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbSR2bKxWXJ0-krkiWcMXw.png" /></figure><p>By the end of the day, we had filled in our ‘matrix’ of accuracies, which ranged from 61% to 95.75%, and had finished the Chrome extension and webapp. We had to implement some pair programming and collaboration strategies to overcome a few difficulties, for example trying to use embedding values from a file.</p><h3>Chloe Thompson on Twitter</h3><p>Did everyone get an @ai_ni_community sticker......? No? @liamkferris certainly got his 💸#stickinittotheman #thegoodaideahack #aini https://t.co/GDtDSwOvRg</p><h3><strong>Day 2 — Pitching</strong></h3><h3>Peter Devine on Twitter</h3><p>Judging of @UlsterUni Magee contestants of @ai_ni_community Hackathon now underway. Good luck to all. #AINIForGood</p><p>On the Sunday morning, the only thing we had to do in terms of development was to finalise the API and tie everything together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YqfC49A0UCoG5XEkqH_Wag.jpeg" /></figure><p>Once we finished that, it was time for us to start working on our pitch. We decided to split up the pitch into different sections which the members of my team would present — one member would give an introduction, another would give the technical details, I’d give the demo and another would answer any questions the judges had.</p><p>We created a presentation to go with our pitch which we all worked on collaboratively. I recorded our project being used and inserted that as part of the presentation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WYqfj-PgAGNNcpFb_2ydEw.png" /><figcaption>A slide from our presentation.</figcaption></figure><p>Our team were the first ones to present to the judges, who were really impressed by our ideas. Once we finished, we went out as a team for lunch and came back for the prizegiving.</p><h3>AI NI on Twitter</h3><p>Massive congratulations to our prizewinners from the @HaysN_Ireland raffle! A big thank you to Hays for sponsoring the two prizes of Noise Cancelling Headphones and a 3D Printer!</p><p>There were a number of spot prizes, as well as the main prizes which went to:</p><p>3rd Place — <strong>DiverseCV</strong>, which is a system to remove the potential of both intentional and unintentional bias by redacting sensitive information from applicants’ CVs before the employer can view it to pass judgement.<br>2nd Place — <strong>Team Blackball</strong>, who created a system to help teach users spell their names in British Sign Language using image detection.<br>1st Place — Tied between <strong>Team Fletch </strong>and <strong>my team</strong>, who both created systems for telling fake and real reviews apart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*QQXVt36btDLsbpESg9hZpA.png" /><figcaption>My team (first four from the left), Team Fletch (the two next to us), and Paul Hill from BazaarVoice (judge).</figcaption></figure><p>There were a lot of good ideas and a lot of very well-made projects, a lot of which are incredibly innovative and could potentially be used to help a lot of people in the future.</p><h3>Jordan McDonald on Twitter</h3><p>Thank you to everyone who attended the @ai_ni_community this weekend. Bringing together 200 people in both @QUBEEECS &amp;amp; @UlsterUni to leverage #AI as a catalyst for societal good; 13 months &amp;amp; 13 events (with) lots of help) made this possible...400 people...3 venues next year? 😲</p><h3><strong>Why Hackathons Matter</strong></h3><p>This leads me on to my final point of this article, why hackathons actually matter.</p><p>For me, the time constraints put on attendees of hackathons means that they will have to focus on the most important things and not get bogged down on small details. It encourages a way of thinking through problems to find and implement a solution in the fastest time possible. It builds confidence in the abilities of developer and enables them to learn and improve their skills in a way that normal development simply can’t replicate. From my own perspective, I believe my skills and confidence surrounding AI have improved as a result of this hackathon, and I hope to be able to use and improve these skills in work projects and in further hackathons.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4616cdd6b3d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Application of Text Augmentation for ML Projects]]></title>
            <link>https://medium.com/@conormc/the-application-of-text-augmentation-for-ml-projects-8504e6c17122?source=rss-11575e14837a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8504e6c17122</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Conor McCormick]]></dc:creator>
            <pubDate>Tue, 16 Apr 2019 14:12:36 GMT</pubDate>
            <atom:updated>2019-04-16T14:12:36.217Z</atom:updated>
            <content:encoded><![CDATA[<h3>One Simple Tool to Improve the Efficiency of your Machine Learning Systems</h3><p><em>I’m a software engineer working at </em><a href="https://www.kainos.com/"><em>Kainos</em></a><em> in the AI Practice. The team researches and applies different tools and software solutions for clients who are looking for AI to assist with their functionality.</em></p><p>Have you ever been a position where you didn’t have enough data? Would that chatbot, recommendation system or fraud detector become possible if more data were available? If so, keep reading — this blog is for you!</p><h3><strong>Background</strong></h3><p>The Text Augmenter (henceforth referred to as TA) is a program which can be used to augment text records (generate new records from existing records) in order to supply Machine Learning projects with additional training data. I used research done by <a href="https://medium.com/@jake_young">Jake Young</a> as a jumping off point for TA. I wanted to use the methods that he had come up with but in a slightly more user-friendly way to be used in the team.</p><p>Now you know why I made this, so what does this actually look like?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yF5x5-e-KjOU0Vga-nxxIg.png" /><figcaption>This is the original data value I provided.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Cy74PzZxPLaLb_klgG7GA.png" /><figcaption>These are the data values returned by TA.</figcaption></figure><h3>How TA Works</h3><p>TA is based on the two augmentation methods set out in <a href="https://towardsdatascience.com/building-a-natural-language-lesson-8cc01011a4c5">Jake’s article</a> — augmenting the data based on using synonyms, and translations.</p><p><strong>Synonym Augmentation<br></strong> This works by breaking down each of the rows of text into individual words, then finding the keywords and replacing them with synonyms to create a new data record. This process is explained using the following flow chart:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*Cb0h0r92I0UbxsNviYkDdA.png" /></figure><p>Due to the nature of Synonym Augmentation, the number of results can vary wildly depending on the length of the original values. If longer sentences are used, then there will be more words to augment, and this a larger return of data.</p><p><strong>Validation:</strong> To ensure that the results of the Synonym Augmentation are usable for any given project, the user can specify a ‘blacklist’ which is a list of words that the user defines which will be ignored by the Augmentation function.</p><p><em>For example, the word ‘one’ gives 5 different data records. Using the blacklist means that none of these would show up in the augmented dataset. This is useful as it means that certain things that shouldn’t be augmented, for example words in the name of a law, will not be augmented.</em></p><p><strong>Translation Augmentation<br></strong>This takes the data records and translates them into a different language then back into English using <a href="https://azure.microsoft.com/en-gb/services/cognitive-services/translator-text-api/">Microsoft Azure’s translation API</a>. It does this for five languages chosen to mangle the syntax of the sentence. This process is explained using the following flow chart:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*YBUhWUQUEKUiOEL6WqTPSw.png" /></figure><p>As each data value will be translated into five different languages, this function will always give a 500% return.</p><p><strong>Validation:</strong> <a href="https://arxiv.org/abs/1803.11175">Universal Sentence</a><a href="https://tfhub.dev/google/universal-sentence-encoder/2"> Encoder</a> is used to ensure that the augmented data records are close enough to the original values. This works by finding the ‘<a href="https://en.wikipedia.org/wiki/Cosine_similarity">cosine similarity</a>’ of the augmented value to the original value. The user is able to set a threshold for this similarity and any augmented values that fall outside of the threshold.</p><p><strong>Benchmarking<br></strong>TA has a built-in feature for benchmarking the original dataset against the augmented datasets using a variety of common Machine Learning algorithms. It uses the following:</p><p><a href="https://scikit-learn.org/stable/modules/sgd.html">Stochastic Gradient Descent [SGD]<br></a><a href="https://scikit-learn.org/stable/modules/naive_bayes.html#gaussian-naive-bayes">Gaussian Naïve-Bayes [GNB] *<br></a><a href="https://scikit-learn.org/stable/modules/naive_bayes.html#complement-naive-bayes">Complement Naïve-Bayes [CNB]<br></a><a href="https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html">Linear Regression<br></a><a href="https://scikit-learn.org/stable/modules/tree.html#classification">Decision Tree Classifier [DTC] *<br></a><a href="https://scikit-learn.org/stable/modules/neural_networks_supervised.html#multi-layer-perceptron">Multi-Layer Perceptron [MLP] *<br></a><em>* this classifier is used in the Flask application</em></p><p>The augmentation function splits each of the datasets up into training and test values, then trains the classifier and makes predictions. It then gives the user feedback about the classification: accuracy value, classification report and confusion matrix. It does this for all of the datasets — the original and the datasets created by the two methods of augmentation — and displays comparisons between them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sZh8XNo27BpjBX9HlGkKbQ.png" /><figcaption>The output from the Flask application when benchmarking is performed.</figcaption></figure><p><strong>How Can TA Be Used?<br></strong>There are three different ways to use it, to allow for flexibility for users with differing levels of technical knowledge:</p><p><a href="https://www.python.org/"><em>Python</em></a><em> script<br></em>Currently, the main way we use TA is via the main Python script running on the Terminal. This method allows for the use of all of the selected benchmarking classifiers, and is the fastest way of using TA.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*g-_Tmb5vwkzMc_sgnhweJg.png" /><figcaption>A screenshot from the python script.</figcaption></figure><p><a href="http://flask.pocoo.org/"><em>Flask</em></a><em> application<br></em>This project gave me my first ever opportunity to use Flask, a web framework written in Python. Using this, I built a webpage to house the functions for TA. Doing this allowed me to gain a better understanding of endpoints and requests having never really experienced much related to the web. I’m currently unsure about whether or not this will be hosted as a usable web page, or whether the primary method for use will be one of the other methods. The downside of this, is that the number of machine learning classifiers used for benchmarking bulk up the tool, and thus I have restricted the benchmarking to only three classifiers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9UqB55yhbleJtEnQZNZoUg.png" /><figcaption>A screenshot from the Flask application.</figcaption></figure><p><a href="https://jupyter.org/"><em>Jupyter</em></a><em> Notebook<br></em>An implementation of the Python script has been created as a Jupyter Notebook. This is separated into cells containing each of the functions, and an explanation of what they do and how to use them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*-1z0rwKgJK4k5cVmzqq7rw.png" /><figcaption>A screenshot from the Jupyter Notebook.</figcaption></figure><h3>Conclusion: Using TA For A Project</h3><p>After having completed TA recently, we have began using it in the team’s projects as a means to create more testing data in order to prove the effectiveness of it.</p><p><strong>The Effectiveness of TA<br></strong>TA took in a dataset of 11000 values, and returned an augmented dataset of 500000 values (4545% return). This means that the training for the algorithm was able to be more efficient and return better results.</p><p>We are planning to use TA in the future to assist in the development of any of our projects that this would be beneficial to.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8504e6c17122" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>