<?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 Euel Fantaye on Medium]]></title>
        <description><![CDATA[Stories by Euel Fantaye on Medium]]></description>
        <link>https://medium.com/@euelfantaye?source=rss-4f13bf2b0d84------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zGK-UVHsaFlRxO-XhSvs7w.png</url>
            <title>Stories by Euel Fantaye on Medium</title>
            <link>https://medium.com/@euelfantaye?source=rss-4f13bf2b0d84------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:54:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@euelfantaye/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[African language Speech Recognition — Speech-to-Text]]></title>
            <link>https://euelfantaye.medium.com/african-language-speech-recognition-speech-to-text-e2422c47549a?source=rss-4f13bf2b0d84------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2422c47549a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[voice-speech-recognition]]></category>
            <category><![CDATA[deeplearing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Euel Fantaye]]></dc:creator>
            <pubDate>Wed, 18 Aug 2021 00:25:00 GMT</pubDate>
            <atom:updated>2021-09-12T17:26:34.772Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*hyVoAienhFG2lDUjL7-H6g@2x.jpeg" /></figure><p><em>Image from Dreamstime</em></p><h4>Abstract</h4><p>Speech recognition simply is the ability of devices to respond to spoken commands. Speech recognition enables hands-free control of various devices and equipment (a particular boon to many disabled persons), provides input to automatic translation, and creates print-ready dictation.</p><p>In this project, African language Speech Recognition — Speech-to-Text is implemented end to end. Starting from data loading and metadata generation up to designing a model to predict and deployment the model.</p><p><a href="https://github.com/heavye/Swahili-Speech-To-Text">My GitHub link</a></p><h4>Motivation</h4><p>The World Food Program wants to collect nutritional information of food bought and sold at markets in two different countries in Africa — Ethiopia and Kenya.</p><p>The speciﬁc need of this project is that Tenacious data science consultancy is in agreement with the World food program (WFP) to deliver speech-to-text technology for two languages: Amharic and Swahili using an app that can use their voice to activate the app to register the list of items they just bought in their own language.</p><blockquote>Why not use an already available ASR system?</blockquote><p>There are many matured speech recognition systems available, such as Google Assistant, Amazon Alexa, and Apple’s Siri. However, all of those voice assistants work for limited languages only.</p><h4>Review of previous works</h4><blockquote>1. Development of Isolated Numeric Speech Corpus for Swahili Language</blockquote><p>Development of Automatic Speech Recognition System-Speech corpus being the basic requirement for the development of automatic speech recognition (ASR) system, it should be done with much accuracy in order to enhance the performance of the system. This paper describes the proposed procedure to abide while collecting the speech corpus of Swahili language from the native and non-native speaker for the development of the Automatic Speech Recognition system in the Swahili language.</p><blockquote>2. Deep Learning for Amharic speech recognition article by Tilaye:</blockquote><p>In this <a href="http://ainsightful.com/index.php/2018/11/27/deep-learning-for-amharic-speech-recognition/">article</a>, the core idea is to have a network of interconnected nodes (also known as Neural Networks) where each node computes a function and passes information to the nodes next to it. Every node computes its output using the function it was conﬁgured to use, and some parameters. The process of learning updates these parameters. The function itself will not change. Initially, the parameters are randomly initialized. Then training data is passed through the network, making small improvements to the parameters on every step. If it all looks like magic, you are not alone! In fact, even leading researchers in the ﬁeld experiment with different functions and network layouts to see which one works best. There are some well-understood functions and network architectures. In the case of speech recognition, Recurrent Neural Networks (RNN) is used as their output depends not just on the current set of inputs, but on previous inputs too. It’s crucial in speech recognition because predicting what has been said at a particular window of time becomes much easier if what has been said before is known.</p><h4>Data and preprocessing techniques</h4><p>Data preprocessing is a step-by-step process that processes audio data for deep learning models. The techniques used are listed below.</p><ol><li>Load Audio ﬁles: The input data are audio ﬁles of the spoken speech that are in the audio format “.wav”</li></ol><p>2. Resample the audio ﬁles so as to have uniform sample rates for each item.</p><p>3. Convert all the items to have the same number of channels. The channels could be mono (one channel) or stereo (2 channels). Our data has mono channels.</p><p>4. Convert all items to have the same duration, which involves padding the shorter audio ﬁles and truncating the longer ones.</p><p>5. Time Shift our audio left or right randomly by a small percentage, or change the Pitch or the Speed of the audio by a small amount so as to add noise to our audio ﬁles.</p><p>6. Convert the raw audio ﬁles to Mel Spectrograms which capture the nature of the audio ﬁles as images by decomposing them into sets of frequencies.</p><p>7. The Mel Spectrograms are converted to Mel Frequency Cepstral Coeﬃcients (MFCCs) which is important when dealing with human speech. This is because MFCCs correspond to the frequency ranges at which humans speak.</p><h4>Preparing the metadata for the transcriptions</h4><p>We used the librosa package to preprocess our audio ﬁles. By default, librosa converts all audio ﬁles to mono and resamples the ﬁles to 22050 Hz when loading the audio ﬁles, unless other arguments are passed in the load function. Now that we have our input features(the preprocessed audio ﬁles) and our target labels (the preprocessed transcriptions), we build a deep neural network that accepts the preprocessed data as input and returns a predicted transcription of the spoken language as the output.</p><h4>The deep learning architecture</h4><p>Convolutional Neural Network(CNN) plus Recurrent Neural Network (RNN): CNN encodes the information from the voice features. This data is sent to a convolution layer with a kernel which also acts as a fully connected layer. This ﬁnally gives softmax probabilities of each character that can be placed in the transcription</p><p>An RNN model consists of a Bidirectional LSTM that processes the feature maps as a series of distinct timesteps or ‘frames’ that correspond to our desired sequence of output characters. In other words, it takes the feature maps which are a continuous representation of the audio and converts them into a discrete representation.</p><p>Feature maps -&gt; Bidirectional LSTM A linear layer with softmax that uses the LSTM outputs to produce character probabilities for each timestep of the output linear layers that sit between the convolution(CNN) and recurrent networks(RNN). It helps to reshape the outputs of one network to the inputs of the other.</p><p>Bidirectional LSTM -&gt; Linear Layer-&gt; softmax -&gt; character probabilities for each timestep in that Spectrogram The CNN encodes the information from the image and sends that data to the RNN based decoder which decodes the data and outputs the corresponding text from the image.</p><h4>MLOPs setup</h4><p>MLOps is an ML engineering culture and practice that aims at unifying ML system development (Dev) and ML system operation (Ops). Practicing MLOps means that you advocate for automation and monitoring at all steps of ML system construction, including integration, testing, releasing, deployment, and infrastructure management.</p><h4>Modeling results &amp; Conclusion</h4><blockquote><em>1- True transcription: karibu katika matangazo yetu ya asubuhi ya idhaa ya kiswahili</em></blockquote><blockquote><em>1- Predicted transcription: karibu kaia natanazo yeti ya subuia idha ya kiswahili</em></blockquote><blockquote><em>2- True transcription: kwenda na kuondoka jarkata Indonesia</em></blockquote><blockquote>2- Predicted transcription: kuwenda kuna kundoka jijya kata indoneziaoanfuyuhyhya b</blockquote><p>As you can see the model is far from perfect but it is getting there. The words in the predicted transcription are misplaced here and there. For a general acceptable speech recognition system 3000hrs of recorded audio is needed. So for this project with limited data the model prediction is fairly a success. In addition to that to make it more powerful, the model can have more hidden layers.</p><p>More data is needed with different speakers and text. Data can also be synthesized. For example, audio can be duplicated and background noise added to the duplicated data. It helps the model become robust on audio with noise.</p><p>Also for the model to be robust, we can use more augmentation on the data and adding noise will improve the robustness of the model in outdoor places where most likely will be implemented for the objective of the project; which is in a food marketplace where likely people will use the app to register the food they bought using voice command.</p><h4>The Responsible Machine Learning</h4><blockquote>Principles Bias, fairness, and what is done to mitigate issues discovered</blockquote><p>When building systems that have to make non-trivial decisions, we will always face the computational and societal bias that is inherent in data, which is impossible to avoid but is possible to document and/or mitigate.</p><p>However, we should take a step back from only trying to embed ethics directly into the algorithms themselves. Instead, technologists should focus on building processes &amp; methods to identify &amp; document the inherent bias in the data, features, and inference results, and subsequently the implications of this bias.</p><p><strong>Sample bias:</strong> Sample bias is a problem with training data that occurs when the data used to train the model does not accurately represent the environment that the model will operate in. There is virtually no situation where an algorithm can be trained on the entire universe of data it could interact with. But there’s a science to choosing a subset of that universe that is both large enough and representative enough to mitigate sample bias.</p><p><strong>Evaluation bias:</strong> Evaluation bias occurs during the model iteration and evaluation. A model is optimized using training data, but its quality is often measured against certain benchmarks. Bias can arise when these benchmarks do not represent the general population or are not appropriate for the way the model will be used.</p><p><strong>Aggregation bias:</strong> Aggregation bias arises during model construction where distinct populations are inappropriately combined. There are many AI applications where the population of interest is heterogeneous, and a single model is unlikely to suit all groups. One example is in health care. For diagnosing and monitoring diabetes, models have historically used levels of Hemoglobin AIc (HbAIc) to make their predictions. However, a 2019 paper showed that these levels differ in complicated ways across ethnicities, and a single model for all populations is bound to exhibit bias.</p><p><strong>Fairness:</strong> Helps to ensure that biases in the data and model inaccuracies do not lead to models that treat individuals unfavorably on the basis of characteristics such as e.g. race, gender, disabilities, and sexual or political orientation.</p><p><strong>Data risk awareness:</strong> We commit to develop and improve reasonable processes and infrastructure to ensure data and model security are being taken into consideration during the development of machine learning systems.</p><h4>Future work</h4><blockquote><strong>What can be improved with more time and resources?</strong></blockquote><p><strong>Data &amp; Model</strong></p><p>3k hours of speech used to be considered suﬃcient for training. Big tech companies now use up to 100k hours and beefy hardware. Only limited hours of data are available for Swahili and Amharic. More data is needed with different speakers and text. Data can also be synthesized. For example, audio can be duplicated and background noise added to the duplicated data. It helps the model become robust on audio with noise.</p><p>We have proved to ourselves that the model is capable of ﬁtting training data given to it. The next step is to look into regularization to have a good validation accuracy. This problem can beneﬁt from having more data as well. Different network architectures can be investigated too. As mentioned under the Language Model, the goal is to have end-to-end training. And so we wouldn’t even need any pre-processing. Baidu 2 goes a step in this direction by using spectrogram features. There is also some research on using audio signals (the raw data) although it’s still in its infancy.</p><p>REFERENCES</p><ol><li>https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.402.5170&amp;rep=rep1 &amp;type=pdf</li></ol><p>2. https://towardsdatascience.com/audio-deep-learning-made-simple-automatic-sp eech-recognition-asr-how-it-works-716cfce4c706</p><p>3. http://ainsightful.com/index.php/2018/11/27/deep-learning-for-amharic-speechrecognition/</p><p>4. https://ethical.institute/principles.html</p><p>Thank you for reading 😊</p><p>Euel Fantaye, August 2021</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2422c47549a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A/B testing with Machine Learning]]></title>
            <link>https://euelfantaye.medium.com/a-b-testing-with-machine-learning-277da2750123?source=rss-4f13bf2b0d84------2</link>
            <guid isPermaLink="false">https://medium.com/p/277da2750123</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[smartads]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[hypothesis-testing]]></category>
            <category><![CDATA[ab-testing]]></category>
            <dc:creator><![CDATA[Euel Fantaye]]></dc:creator>
            <pubDate>Sat, 14 Aug 2021 10:50:44 GMT</pubDate>
            <atom:updated>2021-08-14T16:53:11.199Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="two mobile phones A &amp; B written in the screen" src="https://cdn-images-1.medium.com/max/575/1*E9UvNIz3nq8F02PAgr5c3g.png" /></figure><h4>In this article, you will find the essence of Machine Learning for A/B Testing</h4><blockquote><strong>Table of content: <br></strong>1. Basics of A/B testing and its use cases<br>2. Limitations and challenges of classical A/B testing<br>3. Sequential A/B testing pros and cons<br>4. A/B testing formulation in Machine Learning context<br>5. Data review and ML A/B testing result<br>6. The advantage of using MLFlow and DVC in ML experimentation</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/0*bVAlWC9AlG8jzLil" /></figure><h3><strong>1. Basics of A/B testing and its use cases</strong></h3><p><strong><em>What is A/B testing?</em></strong></p><figure><img alt="a wooden door with A and B written in metal in the handle" src="https://cdn-images-1.medium.com/max/1024/0*v7Sb0FE5IUv6iGY6" /><figcaption>Photo by <a href="https://unsplash.com/@jdent?utm_source=medium&amp;utm_medium=referral">Jason Dent</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A/B testing (also known as bucket testing or split-run testing) is a user experience research methodology. A/B tests consist of a randomized experiment with two variants, A and B. It includes the application of statistical hypothesis testing or “two-sample hypothesis testing” as used in the field of statistics. A/B testing is a way to compare two versions of a single variable, typically by testing a subject’s response to variant A against variant B, and determining which of the two variants are more effective.</p><p>Essentially, A/B testing eliminates all the guesswork out and enables experienced optimizers to make data-backed decisions. In A/B testing, A refers to ‘control’ or the original testing variable. Whereas B refers to ‘variation’ or a new version of the original testing variable.</p><h3>The basic A/B testing process looks like this:</h3><p>Let’s assume you want to know if the landing page design has an impact on the conversion rate.</p><blockquote><em>1. Make a hypothesis about one or two changes you think will improve the page’s conversion rate.<br>2. Create a variation or variations of that page with one change per variation.<br>3. Divide incoming traffic equally between each variation and the original page.<br>4. Run the test as long as it takes to acquire statistically significant findings.<br>5. If a page variation produces a statistically significant increase in page conversions, use it to replace the original page.<br>6. Repeat</em></blockquote><p><strong>When Should We Use A/B Testing?<br></strong>A/B testing works best when testing incremental changes, such as UX changes, new features, ranking, and page load times. Here you may compare pre and post-modification results to decide whether the changes are working as desired or not.</p><h3><strong>2. Limitations and challenges of classical A/B testing</strong></h3><p>Classical A/B testing works but it isn’t terribly efficient. You’ll need to use a significant amount of time and resources to carry out your tests before you can gain any meaningful results.</p><p>A/B testing doesn’t work well when testing major changes, like new products, new branding, or completely new user experiences. In these cases, there may be effects that drive higher than normal engagement or emotional responses that may cause users to behave in a different manner.</p><p>In this way, rather than testing A versus B, you can introduce C,D,E,F, and G into the equation as well and try out different combinations such as header image A with headline B and CTA C.</p><p>Not only that, but instead of considering each visitor to be equal as in split A/B testing, ML can take into consideration factors such as demographics, customer status, and previous behavior to dynamically serve up different versions of your site to different groups of users.</p><p>The power of ML enables you to personalize and optimize your web properties from thousands of potential variations to display the single version that offers the best chance of conversion for each individual visitor.</p><h3><strong>3. Sequential A/B testing pros and cons</strong></h3><p>Sequential testing as the name implies it involves performing sequential interim analysis till results are significant or till a maximum number of interim analyses is reached.<br> <br>Sequential analysis sounds appealing especially since it may result in a trial needing much fewer subjects than a randomized trial where the sample size is calculated in advance.<br> <br><strong><em>Are there any pros and cons of sequential analysis?</em></strong></p><blockquote><strong>Pros</strong><br>* Optimize necessary observation (sample size) <br>* Reduce the likelihood of error <br>* Gives a chance to finish experiments earlier without increasing the possibility of false results <br><strong>Cons</strong><br>* From a frequentist perspective, if we are concerned with preserving type I errors, we need to recognize that we are doing multiple comparisons<br>* If we do 3 analyses of the data, then we have three non-independent chances to make a type I error<br>* For a fixed sample size and significance level, sequential testing ends up reducing power compared to waiting until all the data comes in.</blockquote><p>Traditional split testing is very time-consuming, especially if you want to test out several different variables. You have to carry out a single test for each different element you’re experimenting with and wait for a fairly conclusive result before you can continue with the next test.<br>Because you need a substantial audience size for each test to obtain any kind of meaningful results, A/B testing can also be very resource-intensive, often requiring a team dedicated to the task or outsourcing to an expensive marketing company.</p><h3><strong>4. A/B testing in Machine Learning</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hRx7kbZ4Or1ZD8ub" /><figcaption>Photo by <a href="https://unsplash.com/@santesson89?utm_source=medium&amp;utm_medium=referral">Andrea De Santis</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>What is Machine learning?</strong></p><p>Machine learning is a method of data analysis that automates analytical model building. It is a branch of <a href="https://www.sas.com/en_us/insights/analytics/what-is-artificial-intelligence.html">artificial intelligence</a> based on the idea that systems can learn from data, identify patterns and make decisions with minimal human intervention.</p><p><strong>What does it have to do with A/B testing?</strong></p><p>Unlike statistical inference, Machine Learning algorithms enable us to model complex systems that include all of the ongoing events, user features, and more. There are a number of algorithms each with strengths and weaknesses.</p><p>A major issue with traditional, statistical-inference approaches to A/B Testing is that it only compares 2 variables — an experiment/control to an outcome. The problem is that customer behavior is vastly more complex than this. Customers take different paths, spend different amounts of time on the site, come from different backgrounds (age, gender, interests), and more. This is where Machine Learning excels — generating insights from complex systems.</p><h3><strong>5. Data review and ML A/B testing result</strong></h3><p><a href="https://github.com/heavye/abtest-mlops">Check out my Github on the project</a></p><p>The data for this project is a “Yes” and “No” response of online users to the following question</p><p><strong>Q: Do you know the brand Lux?</strong></p><blockquote>O Yes</blockquote><blockquote>O No</blockquote><h4>Dataset Column description</h4><blockquote><strong><em>auction_id: </em></strong><em>the unique id of the online user who has been presented the BIO. In standard terminologies, this is called an impression id. The user may see the BIO questionnaire but choose not to respond. In that case, both the yes and no columns are zero.</em></blockquote><blockquote><strong><em>experiment:</em></strong><em> which group the user belongs to — control or exposed.</em></blockquote><blockquote><strong><em>date:</em></strong><em> the date in YYYY-MM-DD format</em></blockquote><blockquote><strong><em>hour:</em></strong><em> the hour of the day in HH format.</em></blockquote><blockquote><strong><em>device_make: </em></strong><em>the name of the type of device the user has e.g. Samsung</em></blockquote><blockquote><strong><em>platform_os: </em></strong><em>the id of the OS the user has.</em></blockquote><blockquote><em>browser: the name of the browser the user uses to see the BIO questionnaire.</em></blockquote><blockquote><strong><em>yes: </em></strong><em>1 if the user chooses the “Yes” radio button for the BIO questionnaire.</em></blockquote><blockquote><strong><em>no: 1</em></strong><em> if the user chooses the “No” radio button for the BIO questionnaire.</em></blockquote><h4>Results</h4><p>With A/B testing we compare between two, but with machine learning we can incorporate the complexity and dynamic nature of data and draw insights.</p><p>With classical A/B testing there is no significant lift in brand awareness but</p><p>with machine learning the hour day date and platform leads to more ‘yes’.</p><p>Our experiment feature has feature importances of 0. This implies that the ‘experiment’ feature is not the main driving feature of the Decision Tree Model. It is not contributing much to awareness. The best predictor for the Decision Tree Model is hour which has feature importance of 0.45 followed by device_make. But this is a result of a decision tree model with a max-depth of 4. if we increase the max-depth, we might observe a different result in feature importance.</p><h4>Conclusion</h4><p>With classical A/B testing, we determined if there was a significant lift in brand awareness which is instrumental to smartAd in making the next move.</p><p>With Machine Learning, we discover that the other features like an hour of the day, the dates, determine the conversion in brand awareness</p><p>There is a greater potential to have a significant lift in brand awareness.</p><p>The hours of the day and the dates count towards gaining more “yes “ results.</p><h3><strong>6. The advantage of using MLFlow and DVC in ML experimentation</strong></h3><p><strong>What is MLflow?</strong></p><p>MLflow is an open-source platform to manage the ML lifecycle, including experimentation, reproducibility, deployment, and a central model registry</p><p><a href="https://dvc.org/">DVC</a> and <a href="https://mlflow.org/">MLflow</a> are two open-source projects that are widely adopted, each for its own specialty. DVC excels at data versioning, and MLflow is multiple tools combined into one, but mainly in use for its experiment tracking and artifacts logging capabilities</p><p>It supplies automatic logging capabilities for most common high-level machine learning frameworks as well, including Scikit-learn, Tensorflow, Keras, XGBoost, FastAI, PyTorch, and more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/0*bVAlWC9AlG8jzLil" /></figure><h4>References</h4><ol><li><a href="https://conversionsciences.com/ab-testing-guide/">https://conversionsciences.com/ab-testing-guide/</a></li></ol><p>2. <a href="https://vwo.com/ab-testing/">https://vwo.com/ab-testing/</a></p><p>3. <a href="https://www.analyticsvidhya.com/blog/2020/10/ab-testing-data-science/">https://www.analyticsvidhya.com/blog/2020/10/ab-testing-data-science/</a></p><p>4. <a href="https://www.business-science.io/business/2019/03/11/ab-testing-machine-learning.html">https://www.business-science.io/business/2019/03/11/ab-testing-machine-learning.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=277da2750123" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>