<?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 Jari El on Medium]]></title>
        <description><![CDATA[Stories by Jari El on Medium]]></description>
        <link>https://medium.com/@drjariel?source=rss-58e273ee34b5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*woE7bA1l-w3-4AoizuRQYQ.jpeg</url>
            <title>Stories by Jari El on Medium</title>
            <link>https://medium.com/@drjariel?source=rss-58e273ee34b5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 20:33:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@drjariel/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[Exploratory Data Analysis made Easy with Pandas Profiling]]></title>
            <link>https://drjariel.medium.com/exploratory-data-analysis-made-easy-with-pandas-profiling-29d19166fdf5?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/29d19166fdf5</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Sun, 13 Dec 2020 00:02:12 GMT</pubDate>
            <atom:updated>2020-12-13T00:02:12.823Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*ULm-5Usq1d0iaYXHtlIn2g.jpeg" /></figure><p>Often Data Scientists are left with a large dataset and are expected to bring insight and findings to light. This is not always easy to do by hand. This step is called Exploratory Data Analysis (EDA) and it is an essential step. There is a way to get a jump start on this step with only a few lines of code. There is an open-source Python package called Pandas Profiling. It can generate various helpful plots as well as gives you stats about the given dataset such as correlation, missing values, and colinearity.</p><p>How to use Pandas Profiling:</p><p>Importing Pandas Profiling</p><pre>pip install pandas-profiling</pre><p>Implementing:</p><pre>from pandas_profiling import ProfileReport<br>prof = ProfileReport(data)<br>prof.to_file(output_file=&#39;output.html&#39;)</pre><p>Fit your data and that&#39;s it! Let see some of the stuff you can do!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5NSvzRTTGHfyIFkiLDr3ug.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GbKB4gSkGYZzLL4BupY4Kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iwpe_WJsB_isePi2KXSkEg.png" /></figure><p>You will find this very useful and it will cut down the time time of your EDA time leaving you with more time for modeling. Enjoy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29d19166fdf5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Intro into Quantum Computing and Machine Learning]]></title>
            <link>https://drjariel.medium.com/intro-into-quantum-computing-and-machine-learning-a79ab246938b?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a79ab246938b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[jobs]]></category>
            <category><![CDATA[jobs-near-me]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Sun, 06 Dec 2020 02:12:09 GMT</pubDate>
            <atom:updated>2020-12-06T02:12:09.313Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YE-wU84p7O-NeR3rj6z3fQ.jpeg" /></figure><p>While enjoying my journey exploring the tech world and data science, I have come across many things that have piqued my interest to a point in which I firmly believed that nothing else could. There are a lot of things that you can teach the computer to do such as, predict the future and create its own art. These are powerful and fascinating applications in their own right. But, there are many complexities and convolutions that come with this great power. I learned this first hand. One of my favorite projects that I am currently working on using a generative model created by scientists at M.I.T. titled, The Conditional Tabular GAN. (If you are interested in Generative models or CTGAN read my other article:<a href="https://drjariel.medium.com/introduction-to-generative-modeling-d4e321f61474)"> https://drjariel.medium.com/introduction-to-generative-modeling-d4e321f61474)</a>. I was able to generate a synthetic dataset from the <a href="https://www.drivendata.org/competitions/7/pump-it-up-data-mining-the-water-table/">Pump it Up: Data Mining the Water Table competition hosted by Datadriven</a>. This was a 59,000-row dataset. It was a success! I was able to generate a 56,000-row synthetic dataset that was used as the training data for a Random Forest classifier. The model performed well in my opinion, it was able to achieve 71% accuracy, the highest accuracy at the time for the competition was roughly 82%. To me, this is a win. But the backend of the experiment brings to light a familiar story with machine learning, neural nets, and specifically GAN’s, the computer can take an exceptionally long time to train the model’s on a large size dataset. For instance, I only set the model trained 1000 epochs and on only 15000 samples of the 59,000 available, it took over 2 hours. But this is very subjective, some models can take months or years and even theoretically forever to train and solve some problems such as encryption. I love modeling, but our conventional methods are somewhat rudimentary. This led me to try and find new methods, which then I was exposed to Quantum Computing and Quantum Machine Learning.</p><p>Quantum Computing is a sector of Computer Science that focuses on technology that is based on Quantum Theory. The Quantum Theory was proposed in the early 1900s. It theorizes that particles on a sub-atomic level can travel as waves and particles at the same time. Simply put, most sciences dealing with anything “quantum” are dealing on the sub-atomic level. The main goal of Quantum Computing is to process and do things faster than our classical computers. And the theory of Quantum Machine Learning takes the theory of classical Machine Learning and looks at it through the perspective of Quantum Computing. I hope in this article to share some basics on the amazing world of Quantum Computing and Quantum Machine Learning.</p><p>The best place to start is with the building blocks of traditional computers as well as quantum computers. The most fundamental building blocks in computers is probably unknown to many in the world. The “bit”, is our main source of communication with our classical computers. It is the idea that data can be stored in 1’s and 0’s, and that is how classical computers work. It can be thought of as a transistor, high voltage represents 1’s and low voltage represents 0’s. This is how almost everything on a classical computer works from messages to media, quantum computers work on a similar premise. The “qubit” is the basis for quantum computing, which stands for Quantum Binary Digit. Where the qubit differs from the bit, is a bit can only be 1 or 0 where a Qubit can occupy all positions at the same time: 1 &amp; 0, 1 &amp; 1, 0 &amp; 0, 0 &amp; 1 (This will be discussed in more depth later). This is due to the qubit acting as both a particle and a wave. A wave distribution stores a lot of data, as compared to a particle (or bit).</p><p>Now having some knowledge of how both classical computers and quantum computers work it is a good time to discuss some higher-level differences between classical Machine Learning and Quantum Machine Learning. While some mechanics are similar in both forms of Machine Learning there is one defining aspect that separates the two. Towards the end of the classical Machine Learning process, a loss function is used to see the model’s accuracy. While training, the model is bound to get predictions wrong, and the loss function is a way of keeping track of this. A Quantum Computer also aims to reduce the loss function. It has a property called Quantum Tunneling which searches through the entire loss function space and finds the value where the loss is lowest, and hence, where the algorithm will perform the best and at a very fast rate. This is one of the many aspects that separate the two.</p><p><strong>Basics of Quantum Computing</strong></p><p>To continue your learning Quantum Machine Learning effectively, there is some terminology that we should review.</p><p><strong>Bra-ket Notation and Linear Algebra</strong></p><p>To my surprise (not sure why I was surprised) quantum computing is mostly linear algebra. The way in which you manipulate the qubits is pretty much matrix manipulation. But to even begin to understand the math aspect you must know the langue in which this particular math is written in. It is called “Bra-ket” notation or “Dirac” notation, and it is used to write equations. This is very important to quantum beginners because academic papers are riddled with Bra-ket Notation.</p><p>Bra-ket Notation uses angle brackets,〈〉, and a vertical bar ⎢ to build “bras” and “kets”.</p><p>What follows is the basis of Linear Algebra</p><p>A “ket” looks like this |v〉. Mathematically it denotes a vector, v, in a complex vector space, <em>V. </em>The vector space is where all vectors live.</p><p>A “bra” looks like this:〈f|. In mathematics, it denotes a linear function <em>f: V ➝ C, </em>an example being, a linear map that maps each vector<em> </em>in <em>V </em>to a number in the complex plane <em>C</em>.</p><p>Allowing a linear function like this:〈f| act on a vector |v〉is denoted as:</p><p>〈f|v〉⍷ C</p><p>Quantum states such as wave functions can be represented as vectors in a complex state using Bra-ket notation. The term Quantum Superposition can also be denoted using this notation.</p><p><strong>Qubits &amp; Superposition</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*dul7P49vLhPkVi0dTKPZwg.jpeg" /></figure><p>To the contrary of the classical computer’s bit, in Quantum Computing we use the “qubit” as stated above. Just to recap, a bit can only hold one of two positions, 1 or 0. Unlike the qubit who can hold all positions at the same time. Yes, this was a complex idea for me at first and I think an example would serve as the best way of clarifying. Say we are doing an experiment in which we are seeing if you can guess which hand I am holding a dollar bill. Before choosing, can you know which hand is the correct hand? No, not until you choose a hand, there is a chance that it could be in both hands. This is the case with qubits. This is called the superposition of two states. This shows that the probability of measuring 1 or 0 before a decision is generally neither 0.0 nor 1.0. Furthermore, this shows that there is a likelihood that the qubit is in various states at once. In the instance of our experiment when you choose a hand, the superposition collapses because we now know.</p><p><strong>The Bloch Sphere</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*jfO3t2Gt2wfTdA7YCDOtEA.png" /><figcaption>Bloch’s Sphere</figcaption></figure><p>The Block Sphere is the mathematical representation of a qubit. It helps to represent the state of a qubit by a two-dimensional vector. This vector has two elements: a real number α and a complex number β. Qubit’s can be considered as a superposition of two states and can be denoted as follows:</p><p>|ψ〉 = α |0〉 + β |1〉</p><p><strong>Quantum Entanglement</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ndIgQwtto37JemBYVQUm9A.png" /></figure><p>The idea of Quantum Entanglement refers to the idea that if we take two qubits, they are always in a superposition of two states. Here is a classic example. Say we have a box with a pair of gloves inside. At random you are asked to take one of the gloves out of the box. The box is then taken to a different area. The glove that was taken out was found to be left-handed, therefor we automatically know that the other glove is right-handed. The same is the case with qubits. If one is in a spin-up position, then the other is automatically in the spin-down position. There does not exist a scenario where both the qubits are in the same state. In other words, they are always entangled. This is known as quantum entanglement.</p><p><strong>Quantum Speedup</strong></p><p>A quantum model performs a stepwise procedure to solve a problem, such as searching a database as stated above. Quantum Coherence helps the quantum computer to process information in a way classical computers cannot. This phenomenon is referred to as Quantum Speedup.</p><p>I hope this will serve as a good introduction to Quantum Computing. This is a very heavy topic that takes some time to process and to understand fully. These concepts are fundamental in going forward with Quantum Machine Learning. Please watch out for my part two coming soon. I hope to go more in-depth with the actual Quantum Machine Learning methods.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a79ab246938b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Generative Modeling]]></title>
            <link>https://drjariel.medium.com/introduction-to-generative-modeling-d4e321f61474?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4e321f61474</guid>
            <category><![CDATA[gans]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Fri, 18 Sep 2020 11:42:01 GMT</pubDate>
            <atom:updated>2020-11-16T18:46:34.916Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*SmkYgggpZ-0U7Qt7tnfyvQ.jpeg" /></figure><p>In the world’s current machine learning technological boom, generative modeling is at the forefront. While there are lots of different sectors of data science, there are several topics that are highlighted and well known, and then there are some that are very new and niche. Usually, data is used to acquire insight and then use that insight to point you into a particular direction to make certain decisions say in the business world.</p><p>Discriminative modeling is the type of modeling often cited and discussed in the data science community. The models that are well known such as linear regression, decision trees, and logistic regression are all discriminative because they model the decision boundaries between classes. These models can classify data, such as a random forest classifier which can differentiate between wells with different functionality; such as, if they are working, none working, or are in need of some sort of repair. Also, algorithms like linear regression can make predictions based on various features. While these are very useful for several applications, there is another part of data science where there are algorithms that can generate and create things such as music, art, and even other data. However, in this post, I will shed some light on this amazing topic of generative modeling.</p><p>It is a commonly accepted idea that some of the most cutting edge and cool things to come out of machine learning comes from generative models. Although the majority of the advances in machine learning are due to discriminative models, generative models show large promise. According to David Foster, author of Generative Deep Learning, generative modeling can be understood and defined as how a dataset is generated, in terms of a probabilistic model. Then by sampling from this model, we are able to generate new original data. There is a model called StyleGAN from NVIDIA that can create original hyper-realistic portraits of human faces from existing portraits. This same model could be used to make new and original clothing designs from a dataset of images of existing clothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dP0aSiKQHp5kJdzJjXQnwg.png" /><figcaption>StyleGAN face generation</figcaption></figure><p>Also, Elon Musk’s GPT-2 OpenAI language model is able to complete a passage of text given a short introductory passage. Also, the first AI-generated artwork sold for 432,000 British pounds, it was named Edmond de Belamy, from La Famille de Belamy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*fdtyGf_AsPcNXXESAdNY8g.png" /><figcaption><a href="https://www.christies.com/lotfinder/prints-multiples/edmond-de-belamy-from-la-famille-de-6166184-details.aspx?from=salesummery&amp;intObjectID=6166184&amp;sid=18abf70b-239c-41f7-bf78-99c5a4370bc7"><em>Edmond de Belamy, from La Famille de Belamy</em></a></figcaption></figure><p>But, with great power comes great responsibility. While there is an endless amount of great uses for this technology there is a list equally as long of nefarious uses. With this ability to create lifelike and indistinguishable faces and usually human activities such as painting and storytelling there are several ethical flags that are being raised. The leading reason is a model that produces deep fakes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yBe_J_mhWXgyqtGZ" /><figcaption><a href="https://www.youtube.com/watch?v=T76bK2t2r8g&amp;t=28s">https://www.youtube.com/watch?v=T76bK2t2r8g&amp;t=28s</a></figcaption></figure><p>This is where an individual, company, or government entity could potentially put anyone&#39;s face on someone else’s body and have that image say anything in another person&#39;s voice. This could cause harm to a person’s image due to a deep fake saying something that the person did not say. Deep fakes can potentially cause financial, legal, and personal problems for victims. You could have your favorite celebrity say anything or sing any song. But with this being such a new innovation, there is still a gray area in the law when it comes to intellectual rights and image rights.</p><p>I’m sure by now, you are wondering what makes all this possible. The first step in any model is to collect data, the more data the better your model will perform, and subsequently create better-generated data. In order to make this as easy as possible to understand, I will give a scenario to imagine. Let’s say we have a large dataset of images, 1.2 million to be exact in the ImageNet dataset. Since lots of these images are from the internet they will not come uniformly structured so we will resize all of the images to have a width and height of 256. We have about 200GB of pixels. The images in our dataset are examples of real-world objects, people, and places; these are referred to as samples from the true data distribution. We then would create our generative model which would be a series of neural networks that could output original images that are based on the dataset. The vanilla model that makes this possible is called a Generative Adversarial Networks (GAN).</p><p>The GAN is a framework proposed by Ian Goodfellow, Yoshua Bengio, and others in 2014. It is broken into two parts, the generator, and the discriminator. The input from the generator is a series of randomly generated numbers called laitent samples. Once the training has finished the generator can then create data from those laitent samples. Laitent samples are instances in laitent space. Laitent space is where the high-dimension input is compressed into a series of numbers. These numbers (laitent samples) are all the GAN has at its disposal to generate new data. This being said, it is imperative for the net to find the best features. The other part of the GAN is the discriminator. The discriminator in an instance of image generation that would then be a binary classifier to determine rather the image was real or not. This is the basis of a lot of generative modeling. I hope this was a good introduction to generative modeling</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4e321f61474" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Ethics: Who, Where, What, Why?]]></title>
            <link>https://drjariel.medium.com/data-ethics-who-where-what-why-a6850d3e18bf?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6850d3e18bf</guid>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Fri, 18 Sep 2020 11:17:42 GMT</pubDate>
            <atom:updated>2020-11-12T17:46:46.092Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jaAd5Epb00YAzuAnSwC7VQ.jpeg" /></figure><p>In 2017 <em>The Economist</em> released an article titled, “The world’s most valuable resource is no longer oil, but data.” In 2019, Forbes released an article titled, “Data Is The New Oil — and it&#39;s a good thing,” which focuses on the good aspects of having access to large amounts of data. One abundantly clear idea expressed in both articles is that there are few players in this game and they control most of the data currency, if you will. While data can be great to build specialized markets and tap into consumers&#39; wants, data’s utility is only maximized if one has access to vast amounts of data. This could potentially make data, what <em>Harvard Business Review</em> calls, “barrier-to-entry.”</p><p>“Barrier-to-entry” means those who do not have access to vast amounts of data will be stifled when it comes to their ability to keep up with competitors. This among many other reasons is why in this competitive data world there is a need for an understanding of data ethics. In this article, I hope to further the understanding of the need for data ethics.</p><p>In this current age of technology and data, we are now able to communicate across seas, watch the same sporting event in different time zones, and get to any destination with only a few clicks or taps. For every instance where one or more events are taking place, the person that is participating will leave a trail of data that can and often is collected and used. But, when the data is sensitive and personal, its use can lead down a path of serious unethical actions as well as unintended uses. This abuse of power can be attributed to several factors; the governing rules on who can and can not use data, and in which manner it is used are not clear in many countries. Or, if there are even elementary sanctions, the company and/or entity may not enforce said sanctions.</p><p>Although many of the newer companies are often criticized for unethical data practices, there have been instances of unethical data practices dating back to the end of the 20th century. For instance, according to computer engineer Dr. McFarland, a congressional survey in 1978 found that 20 percent of criminal history records given out by the states went to private corporations and government agencies not involved in criminal justice. Also, if employers are willing to pay for investigatory services that operate outside the law, employers can obtain credit records, insurance, medical records, and a history of worker’s compensation claims. They can also acquire bank records, credit card charges, and IRS tax records, among many others. While there is a definite reason for an employer to have some of the information, they don’t need to have all of this information because a lot of the information may not pertain to the job at hand.</p><p>While the aforementioned case is one real-world instance of questionable data ethics, there are many others. One of the industries that is constantly being questioned is marketing. Marketers have an enormous need for personal information. They use lots of data with sophisticated statistical analysis techniques along with predictive psychological models. This is used to try and predict peoples’ purchasing preferences, behaviors, and patterns. Also to identify those factors that most strongly influence consumer loyalty, choice, and churn. Once this happens they then concatenate this new intelligence with in-depth information on specific individuals and subgroups of consumers. The primary goal for marketers and is to try and engage consumers and influence their purchasing decisions and habits.</p><p>There are lots of “data vendors” that agencies can acquire data from such as credit agencies, motor vehicle departments, and even the post office. Not only do these agencies have and sell contact information, such as names, addresses phone numbers, email address, and net IDs, but also more personal information. Shopping habits, automobile model infomation, consumer banking info, family demographics, age, gender and sexual preference, amongst other private information, is utilized to sway consumer behavior, preferences and habits. While the purchasing of such data seems harmless, these entities very rarely get clearance from the consmers, and if they do, then the economic value, nor the intended use, has been clearly explained.</p><p>Entities can also generate data internally. Stores such as supermarkets like Walmart and Target, department stores, and other retailers can now keep a record of every transaction and item bought by each customer, in-store as well as online. Also if the customer uses a credit card, bank card, or store identification they can then be linked with their name, address, age, gender, and the other characteristics that were discussed above. This is often not known nor consented to by the consumer.</p><p>I think people overlook or lack knowledge of is the economic value of social media data. Social media companies collect their own data and also have the ability to make and sell their own ads. With this large amount of power, our tech powerhouses are paid very well for their services. Targeted advertising is by far their largest bringer of revenue, but it is possible because their platforms are all free to the user. The companies trade this free platform for the user’s personal information and data. This is a great arrangement as long as the user is fully aware and has given consent to have their data collected and used and possibly sold. In many cases, it is not clear whether those ethical conditions are being met. Oftentimes, users do not understand the extent of what is happening with their data. One could argue that they do give consent when agreeing to the privacy policy agreement, but most times the agreements are much more complex than the user has been led to believe. So when using these platforms, users are advised to make sure they understand exactly what they are signing up for and who can potentially have access to their data and its intended use.</p><p>I hope you found this informative and helpful to protect your right to privacy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6850d3e18bf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Need for Synthetic Data]]></title>
            <link>https://drjariel.medium.com/the-need-for-synthetic-data-8cff443ca74b?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cff443ca74b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[generative-adversarial]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[generate]]></category>
            <category><![CDATA[tabular-data]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Fri, 18 Sep 2020 10:54:15 GMT</pubDate>
            <atom:updated>2020-11-12T18:57:28.750Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*wZpnBnlKiLn1HVuYhG8RnQ.jpeg" /></figure><p>With data being coined as the new oil in the economic world, it is a very valuable commodity. The Cambridge Analytica scandal has not only proven the value that data has to companies and governments but it has shed the light on the extent to which these entities are willing to go to acquire data. However, it must be noted, that it has become harder and harder to acquire an adequate amount of data to run new and more complex algorithms efficiently (rightfully so). The amount of data one has will separate who can compete in data-driven industries and who cannot.</p><p>Throughout my learning career, I have heard several times from other data scientists that, “I wish had more data” or “If I had more data then I would have better results.” The lack of data to power and train models leaves the best data scientists, most cutting edge models, and the strongest quantum computers useless. <strong>There are new methods using generative deep learning that allows one to generate new tabular data with similar distributions but completely original.</strong></p><p>For our tech giants such as Facebook and Google, acquiring data is not an impediment to success; because, millions of people agree to have their data harvested, collected, used, and/or sold giving these entities the fuel to power their powerful algorithms. However, for smaller companies or a start-up, it is hard to compete. In this competitive data market, the cost for data analyst and data acquisition is very expensive and can be very hard to accomplish. This is why synthetic data can be so pivotal, it can allow companies and researchers to build the databases and repositories they require to effectively train and even pre-train their machine learning and deep learning models. With the European Union passing new data protection policies after their Brexit campaign, it has become more difficult and expensive for Brexit participants to acquire, share, trade, and sell data. And, I am sure that sooner than later, the US will enact similar laws and regulations.</p><p>Creating fake or synthetic data is done programmatically; generated by some generative model depending on the data one wants to synthesize. An example would be generating text from speech or an original image generated using a model like the first auctioned AI artwork titled Edmond de Belamy. One of the good things about synthesized data is that as collecting real data gets more and more expensive, the greater the demand for synthesized data. The cost of synthesizing data is more stagnant because of the ability to generate it in house and the lack of the requirement for third-party intervention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*P72GpkhzUypaBo4rQN4slA.png" /></figure><p>Until recently, the main use of synthesized data was for visual data. It is possible to train a model to do almost anything utilizing synthetic data. Reinforcement learning is highly dependent on synthesized data. Now it is possible to test various scenarios in simulated environments that allow researchers to train models for self-driving cars and robots. A more recent and applicable use for generated synthetic tabular data is for discriminative modeling. Programmers are now able to generate data that is very representative of the data from which it was generated. The way this is done is by using MIT’s Conditional Tabular Generative Adversarial Network (CTGAN). CTGAN uses a more sophisticated Variational Gaussian Mixture Model to detect modes of continuous columns. CTGAN uses LSTM to generate synthetic data column by column. CTGAN uses Fully-connected networks, which have been found to be more efficient. The design is a conditional generator that resamples the training data to prevent model collapse on discrete columns. A WGANGP and PacGAN is used to stabilize the training of GAN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*HRjrYSwmOCrk4xyylhGBYw.png" /><figcaption>Synthetic Data Distributions</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*OqFkzrOHnn4mZD4eCrZPww.png" /><figcaption>Real Data Distributions</figcaption></figure><p>I was recently able to successfully generate a synthetic dataset of 56,000 rows from an existing dataset of 59,000 rows. I also trained a Random Forest model on the aforementioned synthetic dataset and was able to achieve 72% accuracy while achieving 80% accuracy with the real training data. The CTGAN could be a breakthrough model that could cut data costs and help ethical privacy concerns.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cff443ca74b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Brief Algorithmic & Historical Analysis of Convolutional Neural Network’s]]></title>
            <link>https://drjariel.medium.com/a-brief-algorithmic-historical-analysis-of-convolutional-neural-networks-744cb8bf138e?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/744cb8bf138e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Fri, 21 Aug 2020 17:19:47 GMT</pubDate>
            <atom:updated>2020-09-01T15:47:45.017Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hUpJShq6VnTgxQrF.jpg" /><figcaption>They probably see using CNN’s ;)</figcaption></figure><p>With neural networks being at the forefront of cutting edge data science they are one of the most promising and exciting things in the world of science in general. They would be the cause of a lot of your favorite sci-fi movies such as Irobot and the Terminator movies. The most basic neural network is a series of algorithms that try and recognize underlying relationships and patterns in a set of data. The name neural network loosely comes from trying to mimic the human brain. They can adapt to changing inputs, so the network generates the best possible result without the need to redesign the output criteria. The pioneers of the neural network, Warren McCulloch and Walter Pitts in 1943 created a computational model based on algorithms called threshold logic.</p><p>There are several different types of neural nets that can do vastly different and do amazing things; from recognizing patterns in human speech all the way to being able to tell a human’s mood based on their facial expression. But this article will focus on one of the most important and widely used neural networks, the Convolutional Neural Network. While this is not a research paper, I would like to high light some of the most important and groundbreaking parts of a Convolutional Neural Network for people who may be new to deep learning as I once was not long ago.</p><p>As stated above neural nets are very good at recognizing patterns, so with a CNN, you start with the input being an image and the output being a labeled decision, that can then be classified. This is possible because the image is passed through a series of filters. This is where the specificity lies, these filtering layers must at least have one convolutional layer. The reason for this type of architecture is this allows the neural net to be able to process more complex images. Real-world applications of CNN’s are:</p><ul><li>Facebook’s automatic tagging algorithms</li><li>Tesla’s semi-automated driving car which is object detection</li><li>Face recognition on social media</li><li>Image analysis in healthcare</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gw6_RC8zamws9Bcf.png" /><figcaption>Convolutional Neural Net</figcaption></figure><p>While one would think that a computer has to go through every pixel in a picture in order to understand it this is not the case, this would actually be very computationally expensive. Not only because there are lots of pixels but the computer would also have to assign RBG values to each pixel. Therefore pre-processing is needed, this is done in several layers that are found at the beginning of the neural net to reduce it into a smaller input before the images can be applied. The most important layers in a CNN are as you probably guessed, the convolutional layers. A Convolution is applied to small sections of an image, sampling the values of the pixels in this section and converting it into a single pixel. It is applied to the entire image in order to make a new image. The idea behind it is that the pixels in the new image incorporate information about the surrounding pixels. This then should reflect how well a feature is represented in that area. Convolutions have two predominant attributes, size, and stride. Stride is how many times to shift over the input matrix or image. Size is how large the filter is, e.g. 3x3.</p><p>Now we will shift focus to more of the historical focus of the CNN. The first notable success of convolutional neural nets was AlexNet which was developed by Alex Krizhevsky in 2012 at the University of Toronto. It was developed to solve the ImageNet challenge. This was an image classification problem with over 1.2 million images to classify into 1000 different categories. AlexNet won first place with an error rate of 15.3%, compared second place which was 26.2%. The winning network constituted of 5 convolutional layers, each followed by a ReLU activation layer then followed by three fully connected layers. Also, three of the five convolution-activation pairs were followed by max-pooling layers.</p><p>This is just a short introduction into one of the cornerstones of the future. Soon CNN’s will be apart of everyday life for most humans. If you have not yet worked with CNN’s I would highly recommend it and I hope this article motivates you to do so.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=744cb8bf138e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Historical Developments of Random Forest]]></title>
            <link>https://drjariel.medium.com/historical-developments-of-random-forest-41492deb6737?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/41492deb6737</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[random-forest]]></category>
            <category><![CDATA[ensemble-learning]]></category>
            <category><![CDATA[statistics]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Thu, 23 Jul 2020 19:38:25 GMT</pubDate>
            <atom:updated>2020-07-23T19:38:25.794Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*svqLmz6N9e6ZvH6K1Omn9Q.jpeg" /></figure><p>The Random Forest algorithm is a powerful and widely used algorithm that can be used for classification as well as regression. While the back end of the algorithm is interesting and somewhat complex, it is widely discussed on the internet, in books, as well as in the classroom. What is not discussed nearly enough is the historical development of this great algorithm. In this blog post, I hope to shed some insight into this topic.</p><p>As this is an application that predominantly is used by people who are looking to derive information and answers from data, this will hit home with many. Often times we are looking to analyze data that derives from various sources and try and summarize it into useful information; this can then be used to answer various questions depending on the field. This act is called data mining. According to Usama Fayyad, a data scientist and co-founder of the Associaton for Knowledge Discovery and Data Mining, data mining involves six common classes of tasks: anomaly detection, association rule learning, clustering, classification, regression, summarization, and sequential pattern mining (1996). I will explore the classification task which organizes data into classes by using predetermined class labels (Fawagreh, 2014). Dr. Khaled Fawagreh a computer engineer at Robert Gordon University (RGU), states “Classification algorithms normally use a training set where all objects are already associated with known class labels. The classification algorithm learns from the training set and builds a model, also called a classifier. The model is then applied to predict the class labels for the unclassified objects in the testing data” (2014).</p><p>Further detail is needed in order to understand the historical development of this algorithm. Random Forest is an example of ensemble classification. This application of ensemble learning is used to boost the accuracy of classifications (Fawagreh, 2014). Ensemble learning is a machine learning archetype in which multiple models are used rather than one singular model to solve the same problem (Fawagreh, 2014). In ensemble classification applications like the random forest, multiple classifiers are used. This is because they are more accurate than the individual classifiers in the ensemble (Fawagreh, 2014). Then a voting system within the Random Forest takes place in order to determine the class label for unlabeled instances (Fawagreh, 2014). A widely used, effective but simple voting system is majority voting, an idea solidified by two professors, Ching Y. Suen and Lousia Lam (1997). In the method majority voting, each classifier in the ensemble is requested to try and actually predict the class label of the instance that is being considered (Suen, Lam, 1997). Once all the classifiers have been queried, the class that receives the most amounts of votes is returned as the final decision of the ensemble. There are other voting systems such as the veto voting scheme in which one classifier vetos the other classifiers. In order to achieve optimal results with the classifiers in the ensemble, the classifier should be both accurate and diverse (Fawagreh, 2014). What constitutes an accurate classifier is if the error rate is better than random guessing. Also, two classifiers are diverse if they are different errors on new data points (Fawagreh, 2014). The more diverse the classifiers are, the better the results are. It has actually been proven experimentally that ensembles tend to yield better results when there is a large level of diversity among the ensemble models. This method was used in Ludmila Kuncheva and Christopher Whitaker’s academic journal, Measures of Diversity in Classifier Ensembles and Their Relationship with the Ensemble Accuracy published in the book Machine Learning in 2003.</p><p>Now that there is a better understanding of classification algorithms and ensemble learning methods, we can get into the development of Random Forest. There were early developments that helped in the aid of the creation of the Random Forest algorithm. In 1995, Dr. Tin Kam Ho proposed a method to defeat the fundamental limitation on the complexity of decision tree classifiers that were born with the traditional methods (Fawagreh, 2014). Fawagreh states, “ Such classifiers cannot grow to arbitrary complexity without sacrificing the generalization accuracy on unseen data. The proposed method uses oblique decision trees which are convenient for optimizing training set accuracy. The essence of the method is to build multiple trees in randomly selected subspaces of the feature space. The trees generalize their classification in complementary ways, and their combined classification can be monotonically improved. (2014)”. Next, in 1997 Professor Yali Amit, a professor at the Univerisity of Chicago, and Dr. Donald Geman proposed a shape recognition approach based on the joint induction of shape features and tree classifiers in their academic article Shape Quantization and Recognition with Randomized Trees (Fawagreh, 2014). Due to the virtually infinite number of features, they came to the conclusion that no classifier based on the full feature set could be evaluated as it was impossible to determine a priori which features were informative (Fawagreh, 2014). Fawagreh states, “Due to the number and nature of features, standard decision tree construction based on fixed-length feature vectors was not feasible. An alternative approach would be to entertain small random sample features at each node, constrain their complexity to increase with tree depth, and grow multiple trees. Terminal nodes contain estimates of the corresponding posterior distribution over shape classes. By sending the image down and aggregating the resulting distribution, the image can be classified.” Although this is out of the scope of this article it will matter later in the development of random forests. In 1998 Dr. Ho proposed a method to solve the issue between overfitting while achieving maximum accuracy(Fawagreh, 2014). Fawagreh summarizes Dr. Ho’s paper the best, “This was done by constructing a decision-tree-based classifier that maintained the highest accuracy on training data and, at the same time, improved on generalization accuracy as it grows in complexity. The classifier consisted of multiple trees constructed systematically by pseudo-randomly selecting subsets of components of the feature vector, that is, trees constructed in randomly chosen subspaces. When empirically tested against publicly available data sets, the subspace method proved its superiority when compared to single-tree classifiers and other forest construction methods. The next section introduces RF which is an ensemble method that combines existing techniques in order to construct a collection of decision trees with controlled variation” (2014).</p><p>Now that we have a brief understanding of the research that was done prior to the Random Forest, we will now examine Random Forest themselves. Again, Random Forest is an ensemble learning method used for classification and regression. It was developed by Professor Leo Breiman in 2001. His method combines Breiman’s bagging sampling approach in 1996 and the random selection of features introduced by Dr. Ho in 1995 and 1998 and Dr. Amit and Professor Geman in 1997. This was all used to construct a collection of decision trees with controlled variation (Fawagreh, 2014). Using the bagging method, every decision tree in the ensemble is configured using a sample with replacement from the training data. Statistically speaking, the sample is likely to have about 64% of instances appearing at least once in the sample, these are called in-bag instances. The remainder of the instances which is about 36% are called out-of-bag instances. Each tree in the ensemble acts as though they are the base classifier to determine the class label of an unlabeled instance (Fawagreh, 2014). In order to best illustrate random forest as well as majority voting, we will use the diagram seen below. In this example we will use a random forest to predict the value of the PLAY feature which will determine whether a child can play or not, given the predefined values for the other features: <em>Outlook, HWDone</em>, and <em>Weekend</em>. From the training data, there are three trees; one voted no the kids cannot play while two voted yes they can, so they can play!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*VMfJAYt6Pm_mRVWRKyzCIg.gif" /></figure><p>During the configuration of the individual trees in the Random Forest, a certain degree of randomization is also applied when selecting the best node to split. Typically, this is equal to (square-root)F where <em>F</em> is the number of features in the data set (Breiman, 2001). Breiman introduced additional randomness during the configuration of the decision trees using the classification and Regression Trees (CART) Technique. Using this technique, the subset of features selected in each interior node is evaluated with the Gini index heuristic (Breiman, 2001). The feature with the highest Gini index is chosen as the split feature in that specific node (Fawagreh, 2014). Gini index has been introduced by Breiman; however, it was first introduced by the Italian statistician Corrado Gini in 1912 (Fawagreh, 2014). The Gini index is a function that is used to measure the impurity of data answers the question, “How uncertain are we that an event will actually occur?” In Breiman’s 2001 paper on Random Forests, it is stated that the error rate of a Random Forest depends on correlation and strength. Increasing the correlation between any two trees will increase the forest error rate. Again, a tree with a low error rate is a strong classifier. Increasing the strength of the individual trees decreases the error rate (Breiman, 2001). Fawagreh states, “Such findings seem to be consistent with a study made by <a href="https://www.tandfonline.com/doi/full/10.1080/21642583.2014.956265#">Bernard et al. (2010)</a> which showed that the error rate statistically decreases by jointly maximizing the strength and minimizing the correlation.”</p><p>Now that we have an understanding of Random Forest, let us examine their applications in the real world. One of the most prominent applications is medicine. In 2008, M. Klassen, et al., conducted some experiments to explore several attribute selection methods with a Random Forest that was able to precisely classify cancer using a published benchmark data set. Fawagreh states, “<a href="https://www.tandfonline.com/doi/full/10.1080/21642583.2014.956265#">Hu (2009)</a> applied RF to study the prediction of pathologic complete response in breast cancer. Results showed that the feature selection scheme of RF was able to identify important genes of biological significance.” Another field that is not widely thought of is autopsy. In 2011, A. D. Flaxman introduced a new computer-coded verbal autopsy method using the random forest to predict the cause of death. This was done by training RF to distinguish between each pair of causes and then combining the results through a novel ranking technique. The new method outperformed physician-certified verbal autopsy and was recommended for analyzing past and current verbal autopsies (Fawagreh, 2014).</p><p>Random Forest algorithms are changing the world as we know it. Every aspect of daily living is rapidly changing. The way medicine is being conducted, the way in which we interact with agriculture, and numerous other applications. The need for understanding this algorithm is an all-time high.</p><p>I hope you found this article informative and fun to read.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41492deb6737" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSEMN for newbies]]></title>
            <link>https://drjariel.medium.com/osemn-for-newbies-6fdee33fe608?source=rss-58e273ee34b5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fdee33fe608</guid>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Jari El]]></dc:creator>
            <pubDate>Fri, 26 Jun 2020 18:07:26 GMT</pubDate>
            <atom:updated>2020-06-26T18:09:16.118Z</atom:updated>
            <content:encoded><![CDATA[<h3>OSEMN for Newbies</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*qJtsDnfeqULq6orDQrrRpw.jpeg" /></figure><p>As this is one of my first data science projects as well as my first time modeling, I thought it would be nice to present this blog post to the other fresh data scientist. I can definitely see how standing at the summit of a new project, when you are expected to use your new models, can be a daunting task from start to finish. So, I will take you through one of the best workflows that was bestowed upon me, the OSEMN process.</p><p>In 2010, Hilary Mason, data scientist and the founder of a technology startup Fast Forward Labs, as well as a Data Scientist in Residence at Accel Partners and Chris Wiggins, an associate professor of applied mathematics at Columbia University, articulated the OSEMN process. The OSEMN process is a taxonomy that all data scientist new and old should feel comfortable using (Brownlee, 2014). Throughout this blog, I will walk through the process and give insight into the process.</p><p>The OSEMN stands for Obtain, Scrub, Explore, Model, and iNterpret. Simple enough huh? It really is, this is one of the main reasons why it has been so widely excepted and used by inexperienced as well as experienced data scientists. Dr. Jason Brownlee, a machine learning expert states, “It is a list of tasks a data scientist should be familiar and comfortable working on. Although, the authors point out that no data scientist will be an expert at all of them”(2014).</p><p>First, with anything related to a data science project you must obtain the data, the “O” in our process. The authors’ Mason and Dr. Wiggins make a strong point to say that the idea of manually generating data is not possible and or efficient. As data scientists in this age of big data and models that need a plethora of data to give accurate responses, it is pertinent to learn how to “automatically” obtain the data you need for a given problem (Browlee, 2014). When I say “manually generating data,” I mean like pointing and clicking with a mouse and or copying and pasting data from documents or taking photographs and labeling. Mason and Dr. Wiggins suggest that you adopt a range of tools for acquiring the necessary data and choose the correct method for the job (Brownlee, 2014). They point to Unix command-line tools as well as SQL in databases, web scrapping, and scripting using python (Brownlee, 2014). Finally, Mason and Dr. Wiggins explain the importance of using APIs to access data efficiently. API stands for application programming interface. It is a way to interact with other servers, you can do things like acquire data through an API.</p><p>Next in the process is the “S” scrubbing data. Inherently real data is “messy”. This is due to several things like human error and randomness. This means there could be missing values, or random symbols that your model will have trouble dealing with, your data could be in the wrong type; for instance, it could be a number but has the type of a string. This would cause trouble in several of the processes. These will all cause inaccurate results when modeling or simply cause your model to not work at all. Mason and Dr. Wiggins point out that data cleaning is the least sexy part of working on data problems (Brownlee, 2014). It will also be one of the most time-consuming parts of the project but good clean data may provide the most benefits when feeding that data to your model which in turn can lead to more accurate results. Python is a very commonly used tool for data science. Python has several great packages such as pandas to help import, clean and manipulate data.</p><p>Next is the process is “E”, explore data. This is also called exploratory data analysis (aka EDA). This is before any hypothesis is being tested or any predictions are being made and evaluated. Data exploration is useful for getting to know your data (Brownlee, 2014). You want to get to know your data in order to build ideas for its structure as well as getting ideas for transforming data and even possibly predictive models to use later down the line. Mason and Dr. Wiggins list several methods that are helpful in exploring your data, here are a few:</p><ul><li>Pairwise Histograms to plot attributes against each other and highlight relationships and outliers</li><li>Dimensionality Reduction methods for creating lower-dimensional plots and models of the data</li><li>Clustering to expose natural groupings in the data (Brownlee, 2014).</li><li>Histograms to summarize the distribution of individual data attributes.</li></ul><p>Next in the process is Modeling “M” your data. Brownlee states, “Model accuracy is often the ultimate goal for a given data problem. This means that the most predictive model is the filter by which a model is chosen”(2014). Generally, the goal is to utilize a model to simply predict and interpret. Prediction can be evaluated quantitatively where interpretations are a “softer” and qualitative. A model’s accuracy can be evaluated by how well it predicts and performs on unseen data. It can be estimated using several methods but one the most widely known and used is cross-validation.</p><p>Lastly, interpreting results. Brownlee states, “The predictive power of a model is determined by its ability to generalize” (2014). Mason and Dr. Wiggins suggest the interpretative power of a model are its abilities to suggest the most interesting experiments to perform next. It should give insights into the problem as well as the domain. Mason and Dr. Wiggins point to three main concerns when choosing a model to balance the predictive and interpretability of a model:</p><ul><li>Choose good features, the attributes of the data that you select to model.</li><li>Choose a good hypothesis space, constrained by the models and data transforms you select.</li><li>Choose a good representation, the form of the data that you obtain, most data is messy.</li></ul><p>While data science is a complex web of maths, computing, and modeling this process really provides structure to those who may be lost, as I once was. I hope this blog post inspires and helps many people, young and old, new and experienced. I wish you all the best on your studies.</p><p>References:</p><p>Brownlee, J., 2014. <em>How To Work Through A Problem Like A Data Scientist</em>. [online] Machine Learning Mastery. Available at: &lt;https://machinelearningmastery.com/how-to-work-through-a-problem-like-a-data-scientist/&gt; [Accessed 26 June 2020].</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fdee33fe608" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>