{"id":897,"date":"2019-08-17T19:22:11","date_gmt":"2019-08-17T17:22:11","guid":{"rendered":"http:\/\/35.180.88.53\/?p=897"},"modified":"2019-10-28T12:54:10","modified_gmt":"2019-10-28T11:54:10","slug":"data-science-the-good-the-bad-and-the-future","status":"publish","type":"post","link":"https:\/\/www.sergilehkyi.com\/uk\/2019\/08\/data-science-the-good-the-bad-and-the-future\/","title":{"rendered":"Data Science, the Good, the Bad, and the\u2026 Future"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What is data science?<\/h2>\n\n\n\n<p>How often do you think you\u2019re touched by data science in some form or another? Finding your way to this article likely involved a whole bunch of data science (whooaa). To simplify things a bit, I\u2019ll explain what data science means to me.<\/p>\n\n\n\n<p><em>\u201cData Science is the art of applying scientific methods of analysis to any kind of data so that we can unlock important information.\u201d<\/em><\/p>\n\n\n\n<p>That\u2019s a mouthful. If we unpack that, all data science really means is to answer questions by using math and science to go through data that\u2019s too much for our brains to process.<\/p>\n\n\n\n<p>Data Science covers\u2026<\/p>\n\n\n\n<ul><li>Machine learning<\/li><li>Data visualization<\/li><li>Predictive analysis<\/li><li>Voice assistants<\/li><\/ul>\n\n\n\n<p>\u2026 and all the buzzwords we hear today, like artificial intelligence, deep learning, etc.<\/p>\n\n\n\n<p>To finish my thought on data science being used to find this article, I\u2019ll ask you to think of the steps you used to get here. For the sake of this explanation, let\u2019s assume that most of you were online looking at pictures of kittens and puppies when you suddenly came across a fancy word related to data science and wanted to know what it was all about. You turned to Google hoping to find the meaning of it all, and you typed \u201cWhat is *fill in your data science related buzzword*.\u201d<\/p>\n\n\n\n<p>You would have noticed that Google was kind enough to offer suggestions to refine your search terms \u2013 that\u2019s predictive text generation. Once the search results came up, you would have noticed a box on the right that summarizes your search results \u2013 that\u2019s Google\u2019s knowledge graph. Using insights from SEO (Search Engine Optimization) I\u2019m able to make sure my article reaches you easily, which is a good data science use case in and of itself. All of these are tiny ways that data science is involved in the things we do every day.<\/p>\n\n\n\n<p>To be clear, going forward I\u2019m going to use data science as an umbrella term that covers artificial intelligence, deep learning and anything else you might hear that\u2019s relevant to data and science.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Positives: astrophysics, biology, and sports<\/h2>\n\n\n\n<p>Data science made a huge positive impact on the way technology influences our lives. Some of these impacts have been nice and some have been otherwise. *looks at Facebook* But, technology can\u2019t inherently be good or bad, technology is\u2026&nbsp;<em>technology<\/em>. It\u2019s the way we use it that has good or bad outcomes.<\/p>\n\n\n\n<p>We recently had a breakthrough in astrophysics with the first ever picture of a black hole. This helps physicists confirm more than a century of purely theoretical work around black holes and the theory of relativity.<\/p>\n\n\n\n<p>To capture this image, scientists used a telescope as big as the earth&nbsp;(<a href=\"https:\/\/eventhorizontelescope.org\/\">Event Horizon Telescope<\/a>&nbsp;or&nbsp;<em>EHT<\/em>)&nbsp;by combining data from an&nbsp;array of eight ground-based radio telescopes and making sense of it all to construct an image. Analyzing data and then visualizing that data \u2013 sounds like some data science right here.<\/p>\n\n\n\n<p>A cool side note on this point: a standard&nbsp;<a href=\"https:\/\/github.com\/achael\/eht-imaging\">Python library<\/a>&nbsp;of functions for EHT Imaging was developed by Andrew Chael from Harvard to simulate and manipulate VLBI (Very-long-baseline interferometry)&nbsp;data helping the process of creating the black hole image.<\/p>\n\n\n\n<p>Olivier Elemento at Cornell uses Big Data Analytics to help identity mutations in genomes that result in tumor cells spreading so that they can be killed earlier \u2013 this is a huge positive impact data science has on human life. You can read more about his incredible research&nbsp;<a href=\"https:\/\/research.cornell.edu\/news-features\/cancer-and-big-data-analytics#highlight-1444673144862\">here<\/a>.<\/p>\n\n\n\n<p>Python is used by researchers in his lab while testing statistical and machine learning models.&nbsp;Keras,&nbsp;NumPy,&nbsp;Scipy, and&nbsp;Scikit-learn&nbsp;are some top notch Python libraries for this.<\/p>\n\n\n\n<p>If you\u2019re a fan of the English Premier League, you\u2019ll appreciate the example of Leicester City winning the title in the 2015-2016 season.<\/p>\n\n\n\n<p>At the start of the season, bookmakers had the likelihood Leicester City winning the EPL at 10 times less than the odds of finding the Loch Ness monster. For a more detailed attempt at describing the significance of this story, read&nbsp;<a href=\"https:\/\/www.bbc.com\/news\/world-us-canada-36028733\">this<\/a>.<\/p>\n\n\n\n<p>Everyone wanted to know how Leicester was able to do this, and it turns out that data science played a big part! Thanks to their investment into analytics and technology, the club was able to measure players\u2019 fitness levels and body condition while they were training to help prevent injuries, all while assessing best tactics to use in a game based on the players\u2019 energy levels.<\/p>\n\n\n\n<p>All training sessions had plans backed by real data about the players, and as a result Leicester City suffered the least amount of player injuries of all clubs that season.<\/p>\n\n\n\n<p>Many top teams use data analytics to help with player performance, scouting talent, and understanding how to plan for certain opponents.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.kaggle.com\/avnishnish\/european-football-analysis\">Here\u2019s<\/a>&nbsp;an example of Python being used to help with some football analysis. I certainly wish Chelsea F.C. would use some of these techniques to improve their woeful form and make my life as a fan better.&nbsp;You don\u2019t need analytics to see that Kante is in the wrong position, and Jorginho shouldn\u2019t be in that team and\u2026 Okay I\u2019m digressing \u2013 back to the topic now!<\/p>\n\n\n\n<p>Now that we\u2019ve covered some of the amazing things data science has uncovered, I\u2019m going to touch on some of the negatives as well \u2013 it\u2019s important to critically think about technology and how it impacts us.<\/p>\n\n\n\n<p>The amount that technology impacts our lives will undeniably increase with time, and we shouldn\u2019t limit our understanding without being aware of the positive and negative implications it can have.<\/p>\n\n\n\n<p>Some of the concerns I have around this ecosystem are&nbsp;<a href=\"https:\/\/www.wired.com\/story\/cambridge-analytica-facebook-privacy-awakening\/\">data privacy<\/a>&nbsp;(I\u2019m sure we all have many examples that come to mind), biases in predictions and classifications, and the impact of personalization and advertising on society.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Negatives: gender bias and more<\/h2>\n\n\n\n<p>This&nbsp;<a href=\"https:\/\/papers.nips.cc\/paper\/6228-man-is-to-computer-programmer-as-woman-is-to-homemaker-debiasing-word-embeddings.pdf\">paper<\/a>&nbsp;published in NIPS talks about how to counter gender biases in<em>word embeddings<\/em>&nbsp;used frequently in data science.<\/p>\n\n\n\n<p>For those who aren\u2019t familiar with the term, word embeddings are a clever way of representing words so that neural networks and other computer algorithms can process them.<\/p>\n\n\n\n<p>The data used to create Word2Vec (a model for word embeddings created by Google) has resulted in gender biases that show close relations between \u201cmen\u201d and words like \u201ccomputer scientist\u201d, \u201carchitect\u201d, \u201ccaptain\u201d, etc. while showing \u201cwomen\u201d to be closely related to \u201chomemaker\u201d, \u201cnanny\u201d, \u201cnurse\u201d, etc.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kite.com\/wp-content\/uploads\/2019\/05\/image1.png\" alt=\"\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/github.com\/tolga-b\/debiaswe\">Here\u2019s<\/a>&nbsp;the Python code used by the researchers who published this paper. Python\u2019s ease of use makes it a good choice for quickly going from idea to implementation.<\/p>\n\n\n\n<p>It isn\u2019t always easy to preempt biases like these from influencing our models. We may not even be aware that such biases exist in the data we collect.<\/p>\n\n\n\n<p>It is imperative that an equal focus is placed on curating, verifying, cleaning, and to some extent de-biasing data.<\/p>\n\n\n\n<p>I will concede that it isn\u2019t always feasible to make all our datasets fair and unbiased. Lucky for us, there is some good research published that can help us understand our neural networks and other algorithms to the extent that we can uncover these latent biases.<\/p>\n\n\n\n<p>When it comes to data science, always remember \u2013<\/p>\n\n\n\n<p><em>\u201cGarbage in, garbage out.\u201d<\/em><\/p>\n\n\n\n<p>The data we train our algorithms with influences the results they produce. The results they produce are often seen by us and can have a lasting influence.<\/p>\n\n\n\n<p>We must be aware of the impact social media and content suggestions have on us. Today, we\u2019re entering a loop where we consume content that reinforces our ideas and puts people in information silos.<\/p>\n\n\n\n<p>Research projects that fight disinformation and help people break out of the cycle of reinforcement are critical to our future. If you were trying to come up with a solution to this fake news problem, what would we need to do?<\/p>\n\n\n\n<p>We would first need to come up with an accurate estimate of what constitutes \u201cfake\u201d news. This means comparing an article with reputable news sources, tracing the origins of a story, and verifying that the article\u2019s publisher is a credible source.<\/p>\n\n\n\n<p>You\u2019d need to build models that tag information that hasn\u2019t been corroborated by other sources. To do this accurately, one would need a ton of not \u201cfake\u201d news to train the model on. Once the model knows how to identify if something is true (to a tolerable degree of confidence), then the model can begin to flag news that\u2019s \u201cfake.\u201d<\/p>\n\n\n\n<p>Crowd sourced truth is also a great way to tackle this problem, letting the wisdom of the crowd determine that \u201ctruth\u201d is.<\/p>\n\n\n\n<p>Blockchain technology fits in well here by allowing data to flow from people all over the world and arrive at consensus on some shared truth.<\/p>\n\n\n\n<p>Python is the fabric that allows all these technologies and concepts to come together and build creative solutions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python, a data science toolset<\/h2>\n\n\n\n<p>I\u2019ve talked about data science, what it means, how it helps us, and how it may have negative impacts on us.<\/p>\n\n\n\n<p>You\u2019ve seen through a few examples how Python is a versatile tool that can be used across different domains, in industry and academia, and even by people without a degree in Computer Science.<\/p>\n\n\n\n<p>Python is a tool that makes solving difficult problems a little bit easier. Whether you\u2019re a social scientist, a financial analyst, a medical researcher, a teacher or anyone that needs to make sense of data, Python is one thing you need in your tool box.<\/p>\n\n\n\n<p>Since Python is open source, anyone can contribute to the community by adding cool functionalities to the language in the form of Python libraries.<\/p>\n\n\n\n<p>Data visualization libraries like Matplotlib and Seaborn are great for representing data in simple to understand ways. NumPy and Pandas are the best libraries around to manipulate data. Scipy is full on scientific methods for data analysis.<\/p>\n\n\n\n<p>Whether you want to help&nbsp;<a href=\"http:\/\/berkeleyearth.org\/simmod-a-simple-python-based-climate-model\/\">fight climate change<\/a>, analyze your favorite sports team or just learn more about data science, artificial intelligence, or your next favorite buzzword \u2013 you\u2019ll find the task at hand much easier if you know some basic Python.<\/p>\n\n\n\n<p>Here are some great Python libraries to equip yourself with:<\/p>\n\n\n\n<ul><li>NumPy<\/li><li>Pandas<\/li><li>Scikit-Learn<\/li><li>Keras<\/li><li>Matplotlib<\/li><\/ul>\n\n\n\n<p>I\u2019ll illustrate an example of how easy it is to get started with data science using Python. Here\u2019s a simple example of how you can use Scikit-Learn for some meaningful data analysis.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python example with Scikit-learn<\/h2>\n\n\n\n<p><em>This code is available at the&nbsp;<\/em><a href=\"https:\/\/github.com\/kiteco\/kite-python-blog-post-code\/tree\/master\/future-of-data-science\"><em>Kite Blog github repository<\/em><\/a><em>.<\/em><\/p>\n\n\n\n<p>I\u2019ve used one of Scikit-Learn\u2019s datasets called Iris, which is a dataset that consists of 3 different types of irises\u2019 (Setosa, Versicolour, and Virginica) petal and sepal length, stored in a 150\u00d74 numpy.ndarray. The rows are the samples and the columns are: Sepal Length, Sepal Width, Petal Length, and Petal Width.<\/p>\n\n\n\n<p>I\u2019m going to run a simple linear regression to display the correlation between petal width length. The only libraries used here are scikit-learn (for the regression and data set) and matplotlib for the plotting.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from sklearn import datasets, linear_model\nimport matplotlib.pyplot as plt\n\niris = datasets.load_iris()\n\n# Data and features are both numpy arrays\ndata = iris.data\nfeatures = iris.feature_names<\/code><\/pre>\n\n\n\n<p>Now, we\u2019ll plot a linear regression between the length and width of the petals to see how they correlate.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Create the regression model\nregression = linear_model.LinearRegression()\n\n# Reshape the Numpy arrays so that they are columnar\nx_data = data[:, 2].reshape(-1, 1)\ny_data = data[:, 3].reshape(-1, 1)\n\n# Train the regression model to fit the data from iris (comparing the petal width)\nregression.fit(x_data, y_data)\n\n\n# Display chart\nplt.plot(x_data, regression.predict(x_data), color='black', linewidth=3)\nplt.scatter(x_data, y_data)\nplt.show()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/kite.com\/wp-content\/uploads\/2019\/05\/image2.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Here\u2019s a&nbsp;<a href=\"https:\/\/www.youtube.com\/watch?v=lSU0CN9Efss\">tutorial<\/a>&nbsp;I created to learn NumPy, and here\u2019s a&nbsp;<a href=\"https:\/\/github.com\/kirit93\/PyDataNYC\/blob\/master\/text_generation.ipynb\">notebook<\/a>&nbsp;that shows how Keras can be used to easily create a neural network. Just this much will allow you to build some pretty cool models.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Concluding thoughts<\/h2>\n\n\n\n<p>Before I end, I\u2019d like to share some of my own ideas of what I think the future of data science looks like.<\/p>\n\n\n\n<p>I\u2019m excited to see how concerns over personal data privacy shapes the evolution of data science. As a society, it\u2019s imperative that we take these concerns seriously and have policies in place that prevent our data accumulating in the hands of commercial actors.<\/p>\n\n\n\n<p>When I go for walks around San Francisco, I\u2019m amazed at the number of cars I see with 500 cameras and sensors on them, all trying to capture as much information as they possibly can so that they can become self driving cars. All of this data is being collected, it\u2019s being stored, and it\u2019s being used. We are a part of that data.<\/p>\n\n\n\n<p>As we come closer to a future where self driving cars become a bigger part of our life, do we want all of that data to be up in the cloud? Do we want data about the things we do inside our car available to Tesla, Cruise or Alphabet (Waymo)?<\/p>\n\n\n\n<p>It\u2019s definitely a good thing that these algorithms are being trained with as much data as possible. Why would we trust a car that hasn\u2019t been trained enough? But that shouldn\u2019t come at the cost of our privacy.<\/p>\n\n\n\n<p>Instead of hoarding people\u2019s personal data in \u201csecure\u201d cloud servers, data analysis will be done at the edge itself. This means that instead of personal data leaving the user\u2019s device, it will remain on the device and the algorithm will run on each device.<\/p>\n\n\n\n<p>Lots of development is happening in the field of Zero Knowledge Analytics which allows data to be analyzed without needing to see what that data is.&nbsp;<a href=\"https:\/\/ai.googleblog.com\/2017\/04\/federated-learning-collaborative.html\">Federated Learning<\/a>&nbsp;allows people to contribute to the training of Neural Networks without their data to leaving their device.<\/p>\n\n\n\n<p>The convergence of blockchain technology and data science will lead to some other exciting developments. By networking people and devices across the globe, the blockchain can provide an excellent platform for distributed computation, data sharing, and data verification. Instead of operating on information in silos, it can be shared and opened up to everyone.&nbsp;<a href=\"https:\/\/golem.network\/\">Golem<\/a>&nbsp;is one example of this.<\/p>\n\n\n\n<p><a href=\"https:\/\/hypernetwork.io\/\">Hypernet<\/a>&nbsp;is a project born out of Stanford to solve a big problem for scientists \u2013 how to get enough compute power to run computationally and data intensive simulations.<\/p>\n\n\n\n<p>Instead of waiting for the only computer in the university with the bandwidth to solve the task and going through the process of getting permission to use it, Hypernet allows the user to leverage the blockchain and the large community of people with spare compute resources by pooling them together to provide the platform needed for intensive tasks.<\/p>\n\n\n\n<p>Neural networks for a long time have felt like magic. They do a good job, but we\u2019re not really sure&nbsp;<em>why<\/em>. They give us the right answer, but we can\u2019t really tell&nbsp;<em>how<\/em>. We need to understand the algorithms that our future will be built on.<\/p>\n\n\n\n<p>According to DARPA, the \u201cthird-wave\u201d of AI will be dependent on artificial intelligence models being able to&nbsp;<a href=\"https:\/\/www.darpa.mil\/program\/explainable-artificial-intelligence\">explain<\/a>&nbsp;their decisions to us. I agree, we should not be at the mercy of the decisions made by AI.<\/p>\n\n\n\n<p>I\u2019m excited with what the future holds for us. Privacy, truth, fairness, and cooperation will be the pillars that the future of data science forms on.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><em>This article was originally published at <a href=\"https:\/\/kite.com\/blog\/python\/future-of-data-science\/\">Kite<\/a><\/em><em><a href=\"https:\/\/kite.com\/blog\/python\/future-of-data-science\/\">&#8216;<\/a><\/em><a href=\"https:\/\/kite.com\/blog\/python\/future-of-data-science\/\"><em>s<\/em><\/a><em> blog and republished here as part of content partnership program. <a href=\"https:\/\/kite.com\/\">Kite<\/a> is a plugin for your IDE that uses machine learning to give you&nbsp;useful code completions for Python. Available for Atom, PyCharm, Sublime, VS Code, and Vim.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is data science? How often do you think you\u2019re touched by data science in some form or another? Finding&hellip;<\/p>\n","protected":false},"author":1,"featured_media":898,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"translation":{"provider":"WPGlobus","version":"3.0.0","language":"uk","enabled_languages":["gb","es","uk"],"languages":{"gb":{"title":true,"content":true,"excerpt":false},"es":{"title":false,"content":false,"excerpt":false},"uk":{"title":false,"content":false,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts\/897"}],"collection":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/comments?post=897"}],"version-history":[{"count":2,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts\/897\/revisions"}],"predecessor-version":[{"id":1028,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/posts\/897\/revisions\/1028"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/media\/898"}],"wp:attachment":[{"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/media?parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/categories?post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/uk\/wp-json\/wp\/v2\/tags?post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}