<?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 Ahmed Alghali on Medium]]></title>
        <description><![CDATA[Stories by Ahmed Alghali on Medium]]></description>
        <link>https://medium.com/@ahmedalghali?source=rss-f45408c31317------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ihQrDsE4Jhtaln6hTWsAgA.jpeg</url>
            <title>Stories by Ahmed Alghali on Medium</title>
            <link>https://medium.com/@ahmedalghali?source=rss-f45408c31317------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 17:58:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ahmedalghali/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[Of Manuals, Documentation, and the Minds They Educate]]></title>
            <link>https://medium.com/@ahmedalghali/of-manuals-documentation-and-the-minds-they-educate-d2b3ca64aa7d?source=rss-f45408c31317------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2b3ca64aa7d</guid>
            <category><![CDATA[documentation]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ahmed Alghali]]></dc:creator>
            <pubDate>Mon, 18 Aug 2025 14:54:56 GMT</pubDate>
            <atom:updated>2025-09-27T11:03:48.496Z</atom:updated>
            <content:encoded><![CDATA[<p>Every computer program is a model, hatched in the mind, of a real or mental process. These processes, arising from human experience and thought, are huge in number, intricate in detail, and at any time only partially understood — Donald Knuth</p><p>In this world of LLMs we live in, <em>searching</em> is easy; you don’t get to search about a <strong>topic/problem/exception error</strong><em> </em>only, but you can also generate a feature, solve a bug, make the code more robust…etc. now definitely there are pitfalls. Life wasn’t this easy for us. and this is what this article is about.</p><blockquote>plus who knows you might find something in software that you really like and leave machine learning — Noble Mutabazi</blockquote><p>Back when I first joined <a href="http://airqo.net/">AirQo</a>, I found the transition from competitions (which is mainly research being nice) to deploying ML models and working on productionizing ML models kinda of a steep learning curve it was indeed.</p><p>Priorities shift dramatically in such scenarios. I mean, my biggest concern was <strong>how to optimize my model</strong>, or <strong>craft features</strong>, then suddenly it was what optimizes my ETL pipeline, and how to make sure the workflow orchestration tool we are using supports reproducible experiments.</p><p>At some point, I felt I rushed my learning process so bad, and that <strong>I wasn’t supposed to be here; </strong>I was overwhelmed by the amount of concepts and tools I needed to understand and develop some sort of familiarity with. But this “<strong>Wasn’t supposed to end in sort of self-blaming or questioning my trustworthiness</strong>”, you see, my boss (Noble Mutabazi) was telling me I’m doing good considering I’m new to this, and I had several good contributions, and overall my performance is much better than I expected to be. But only if the <strong>overwhelm</strong> could be wiped away. I would appreciate the amount of confidence, focus, and comfort I would get from working. And when breaking down the <strong>overwhelm I’ve felt, </strong>it wasn’t only the component of the amount of things I needed to familiarize myself with, but there was this hidden, subtle thing I was looking for, which is</p><p>“HOW FAST I’M ADAPTING TO NEW REQUIREMENTS”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*t615ujyYPh1OexvCWQUg3A.jpeg" /><figcaption>The book subject has nothing to do with the term, but the title</figcaption></figure><h4>Hidden skills only unlocked by reading documentation</h4><blockquote>Unlink the people coming from Data Science, Maths, ML Background, People coming from Software Engineering have this magic skill, of adapting to tools very fast.</blockquote><blockquote>— me telling Noble what I’ve observed from people coming from different roles.</blockquote><p>I remember there were times I got asked by different SWEs what this tool is -&gt; they adapt it -&gt; later they do more creative work and write more robust code with it. Noble was a good example of this. When further investigating how he was able to adapt faster to new tools and sharing my initial insights (that this is more of a magical skill that I found only in Software Engineers), it turns out it&#39;s simple, but it can be as big as <strong>how they were built.</strong></p><p>Software Engineering courses/bootcamps often rely on foundations that are in the scope of understanding how to deal with multiple languages, coding paradigms, and topics that would equip them with the necessary skills to build sort of a <strong><em>Mental Framework of how to communicate with computers using languages. </em></strong>Now this is more of an abstract saying from me, but what I meant is, if you know the building blocks and what they can do, you will know how to dedicate them effectively, and if you build a mental image of how these tools are build, you have got it all, This is contrary to the people coming from Machine Learning and Data Science-related backgrounds, who often face this new wave of learning <strong>how to write code from shallow tutorials and youtube videos</strong>. Let’s admit it, we were built screening tons of maths and statistics, code is this widget or cell block written for us with comments like “if this syntax is confusing you can ignore it for now<em>”, </em>We can’t blame how tutorials are built for us, this will lead us to completely different topic, but I felt it’s no harm to mention some aspects of how we didn’t adapt to documents, which is that we might not have the neccessary skills to develop a familiarity FASTER.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Li8XKU4JMjldFoIoUDs5lA.jpeg" /></figure><h4>How does the shift to Documentation feel?</h4><p>I’ve spent the past 7 months preferring documentation over the alternative provided. And I’m already seeing the difference and the implications of my decision. If I were to summarize the significant benefits of referring to documentation, I would say</p><ul><li>The accumulation of knowledge</li><li>The mind map you develop about the tool</li></ul><h4>When to use documentation</h4><p>Now, before jumping into explaining what I previously listed. It&#39;s preferred to make some notes about the documentation concept itself.</p><p>If you were to learn machine learning or software engineering for the first time, navigating through the documentation of <a href="https://go.dev/doc/">Go</a> language or <a href="https://docs.pytorch.org/docs/stable/index.html">Pytorch</a> is not something that you would do.</p><p><strong>The best case </strong>for reading the documentation is when you <strong>NEED IT; </strong>I don’t randomly plan to scroll through pages of Python documentation. No one does (except that one friend who thinks it&#39;s cool and we question his sanity). I can imagine that people refer to documentation for the following reasons, but not limited to.</p><ul><li><strong>Fixing bugs: </strong>Documentation help via Exceptions documentation(Which I refer to a lot) and parameter/ endpoints explanations</li><li><strong>Updates: </strong>people interested in knowing the highlight features, changes in different releases. (I think this is provided in the changelog page)</li><li><strong>Learning about Software: </strong>modern documentation provides a quick start/starting script or tutorials that will help you quickly test the tool/concept/language.</li><li><strong>Using the Software:</strong> one of my software dependencies breaks my app, and now I’m searching for its documentation to check the compatibility with framework X. (This headache of dependencies conflict echoes for eternity; I found the documentation of the compatibility matrix to be a real savior here)</li></ul><h4>The accumulation of knowledge</h4><p>Almost all of us have been tasked before to read the docs, which is the part no one does. I mean, ChatGPT can explain concepts like if I’m an infant, why the heck would I read a whole documentation? But what we are not seeing here is that while LLMs can help package the information you need, in the long run, it doesn’t help with your understanding of the problem, nor the solution provided, and why it works. You don’t accumulate any useful skills/knowledge from this. e.g, you’re telling yourself you will boost your productivity using ChatGPT, but when the same error arises 10 times, you always go back to ask ChatGPT about it and try hard to recall what the reason was yourself?.. come on, what productivity are you talking about? Unlike documentation, where you get to know the primitive concepts and how they combine to form complex functionalities, and what their implications are. The act of going back to read from the same book is drastically helping in accumulating knowledge, practically and theoretically.</p><h4>The mind map.</h4><p>I don’t expect people to understand the mechanisms and intricate details of the concept/tool covered by the documentation. But to build a<strong> mind map, </strong>that simply will <strong>now</strong><em> </em>serve as: <em>I can use this, I have just seen it</em>, and <strong>later</strong> serve as: <em>I know that thing exists, I have come through it before, but I’ve never used it, maybe I should give it a try.</em> A mind map saved me multiple times, you will find yourself developing a familiarity with thing you didn’t plan to read about while reading the documentation (sometimes I search for a function in a class that does what I want to do, but in order to identify it, I need to read what the function expect me to pass, its different parameters and what it returns, hence I scan multiple functions to identifiy the one I need, unconsciously this creates a mind map of what you can do in the future with these in case you need them, you now know they exist)</p><h4>pitfalls of documentation</h4><ul><li><strong>I don’t want to reinvent the wheel: </strong>there are times when you underestimate the work and favor watching a YouTube tutorial, vibe code, or using ChatGPT instead, and then figure out that a core software dependency you are using is not supporting a core feature you are building (of course you wouldn’t know that because you either skipped defining your features or ChatGPT picked a random tool for you without knowing your requirements or other parts of the system). This would have been avoided if you had basic familiarity with the tool you’re using (e.g, recalling if they provide this functionality on their Docs)</li><li><strong>Defining requirements: </strong>This point is the <strong>essence</strong> of what was just said<strong>. </strong>This is a skill that I found interesting; simply, it&#39;s about making better decisions. So when you’re at a technical meeting and you’re the intern/newbie and hear people define tools using words like (software-defined, scalable, configurable, S3-compatible…bla..bla..bla), although, shortly, these punchlines tagging the tools include summarized information of what it supports, and hence why you should use that tool. There is this gap between what we want and the tool we assume it satisfies. simply put, the more you know about the tool, the less you are prone to jumping off what you are building. This also includes maximizing your own ability to make sense of technical interviews/meets/conferences (there are dozens, trust me). I found documentation will not only help you stick, but also, when repeatedly referring to documentation, you start to understand what these tags are and why we attached these tags to the tools.</li><li><strong>Documentation as a Learning Material: </strong>In case you don’t have well-grounded CS foundations, the language of the documentation might feel bizarre to you(its technically bizarre to all of us at the beginning but for you it will be a real pain), and sometimes add more complexity to your situation if you try to build something or learn a tool from scratch (e.g when you have a bug using a specific function and you search for learning how it work in order to fix it, and you get shocked by the amount of the API-end points it uses, now you’re lost) so I recommend watching a YouTube tutorials or a course in any format. or simply asking ChatGPT to explain it.</li><li><strong>Docs are not shipping features: </strong>This one I consider to be an implication of someone who is not well-grounded in their CS foundations but also for someone who expect a lot from docmentation, they expect the documentation to tell them directly how to develop feature X, they see there are no signs of feature X documented, and that&#39;s how they turn their back on documentation forever, it is not maximizing our productivity nor make us ship faster. <em>The lack of how to utilize the documentation</em>, that&#39;s what I would call it, for this group of people, Medium articles, and YouTube videos are much better in terms of product and features than documentation.</li><li><strong>I have to read bad documentation: </strong>after all, documentation is written by humans, some may be disorganized, inconsistent, and not beginner-friendly. Without pointing fingers, most of the 80s and early 2000s software documentation is kinda hard to navigate. Today, documentation is much better, more interactive, and visually appealing, so don’t feel as if this bad documentation is something that people feel good navigating through.</li></ul><p>There is no joy in searching through documentation, but there is joy in holding the tail of the explanation for a bug and an even greater joy in being able to navigate directly to the right section. The greatest joy, however, is the bonus you get from learning how to ask the right question and frame your needs in a way that helps you find answers from people or documentation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2b3ca64aa7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Training  Logs in TensorFlow- an in-depth look at modeling analysis and monitoring]]></title>
            <link>https://medium.com/@ahmedalghali/training-logs-in-tensorflow-an-in-depth-look-at-modeling-analysis-and-monitoring-c429b509ff07?source=rss-f45408c31317------2</link>
            <guid isPermaLink="false">https://medium.com/p/c429b509ff07</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[tensorflow]]></category>
            <dc:creator><![CDATA[Ahmed Alghali]]></dc:creator>
            <pubDate>Wed, 27 Mar 2024 14:41:14 GMT</pubDate>
            <atom:updated>2024-03-30T11:46:59.096Z</atom:updated>
            <content:encoded><![CDATA[<h2>Modeling Logs in TensorFlow: an in-depth look at modeling analysis and monitoring</h2><p>If you work with boosting or gradient models, you will be disturbed by the abundance of warnings and logs printed on the screen.</p><pre>106:	learn: 0.2951539	total: 695ms	remaining: 5.8s<br>107:	learn: 0.2945959	total: 701ms	remaining: 5.79s<br>108:	learn: 0.2940884	total: 708ms	remaining: 5.79s<br>109:	learn: 0.2937585	total: 714ms	remaining: 5.78s<br>110:	learn: 0.2936118	total: 720ms	remaining: 5.77s<br>111:	learn: 0.2929654	total: 727ms	remaining: 5.76s<br>112:	learn: 0.2922624	total: 734ms	remaining: 5.76s<br>113:	learn: 0.2918070	total: 740ms	remaining: 5.75s<br>114:	learn: 0.2914321	total: 746ms	remaining: 5.74s<br>115:	learn: 0.2912825	total: 753ms	remaining: 5.74s<br>116:	learn: 0.2911494	total: 759ms	remaining: 5.73s<br>117:	learn: 0.2908855	total: 766ms	remaining: 5.72s<br>118:	learn: 0.2902710	total: 772ms	remaining: 5.72s<br>119:	learn: 0.2899523	total: 779ms	remaining: 5.71s<br>120:	learn: 0.2897765	total: 786ms	remaining: 5.71s<br>121:	learn: 0.2893069	total: 793ms	remaining: 5.71s<br>122:	learn: 0.2888201	total: 800ms	remaining: 5.7s<br>123:	learn: 0.2885947	total: 806ms	remaining: 5.7s</pre><p>most people solve the warning by using the following familiar code:</p><pre>import warnings<br>warnings.filterwarnings(&quot;ignore&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*XJgNhPr8oytfSB6CP_6r7Q@2x.jpeg" /><figcaption>loss curves graph</figcaption></figure><p>Probably many of us printed the graph of training loss vs validation loss, which is a good way to identify the training issues, but few of us questioned the data about the training process and how they is stored. these are called the <strong>logs</strong></p><p>Many machine learning practitioners avoid taking a look at the <strong>logs,</strong> which are indeed scary and messy information about the modeling process and convergence But they can be the key to understanding and solving all your problems. They are useful for detecting when and where everything goes wrong. You can use them to stop the training at a certain epoch when certain conditions are met. Like noticing that there are no improvements in the validation loss. It can help avoid overfitting and save computational resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*lRG_vbBZgWaunAvFzL9_yQ@2x.jpeg" /><figcaption>early stopping technique</figcaption></figure><p>One of the most fascinating problems solved by dealing with the logs is to help avoid overfitting using callbacks. So let’s start step-by-step What are</p><p><strong>logs</strong></p><p>Here is a simplified example of what a log dictionary might look like in TensorFlow, containing information about modeling convergence:</p><pre>logs = {<br>    ‘epoch’: 1,<br>    ‘loss’: 0.345,<br>    ‘accuracy’: 0.876,<br>    ‘learning_rate’: 0.1,<br>    ‘validation_loss’: 0.312,<br>    ‘validation_accuracy’: 0.890<br>}<br></pre><p>logs are the information generated from the various stages of the model training, including information about the model, convergence, and performance. think about it as historical data of the modeling.</p><p><strong>Why do we need it?</strong></p><p>imagine that you wanted to stop the training at an accuracy of 98% or you wanted to stop the training in a certain epoch because you noticed that if it was trained more, it would lead to overfitting Or you are just satisfied with this accuracy</p><p>in order to stop the training or add any functionality during the training, you need to explicitly program it to do the action (a) when reaching the point/condition (b).</p><p><strong>What are callbacks?</strong></p><p>if we want to return information from the modeling and store it in a log dictionary, we may need to call it back.</p><p>and that’s why it’s called the callback, Callbacks are functions that are called at specific points during training, such as at the end of each epoch.</p><pre>import tensorflow as tf<br><br>class MyCustomCallback(tf.keras.callbacks.Callback):<br>    def on_epoch_end(self, epoch, logs=None):<br>        if (logs.get(‘accuracy’) &gt;= 0.98):<br>            print(&quot;Reached 98% accuracy, so stop training!&quot;)<br>            self.model.stop_training = True<br><br>model = #this is our model, defined and compiled <br><br># Instantiate our custom call back<br>custom_callback = MyCustomCallback()<br><br>Train the model with the custom callback<br>model.fit(train_data, train_labels, epochs=20, callbacks=[custom_callback])</pre><p>1. We will start by inheriting the class of the <em>callbacks.Callback</em> from TensorFlow.</p><p>2. We will play on the <em>on_epoch_end </em>method. By checking if the accuracy of the model reached 98%, if so, we will set the model.stop_training to true. Which will stop the training process.</p><p>3. lastly instantiate the custom callback and pass it to the callbacks parameter of the model. fit() function when training the model. This means the callback will be executed at the end of each epoch during the training.</p><p>In summary, logs are one of the first steps to starting the black box of machine learning and modeling. Many frameworks, like TensorFlow, provide a handy setting using classes to deal with the callbacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c429b509ff07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predicting the Top 5 Medications Based on Condition Using Machine Learning and ChatGPT 04.]]></title>
            <link>https://medium.com/@ahmedalghali/predicting-the-top-5-medications-based-on-condition-using-machine-learning-and-chatgpt-04-460ee267be75?source=rss-f45408c31317------2</link>
            <guid isPermaLink="false">https://medium.com/p/460ee267be75</guid>
            <category><![CDATA[medicine]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ahmed Alghali]]></dc:creator>
            <pubDate>Fri, 16 Feb 2024 13:56:36 GMT</pubDate>
            <atom:updated>2024-03-31T01:28:03.048Z</atom:updated>
            <content:encoded><![CDATA[<h2>Predicting the Top 5 Medications Based on Condition Using Machine Learning, NLP and ChatGPT 04.</h2><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DaakgPrO9c5efmCTDK_SnQ.jpeg" /><figcaption>medications and data, credit; deep mind</figcaption></figure><p><strong>Abstraction:</strong></p><p>I worked with a team called <em>Outliers </em>to build a machine-learning recommendation system as a part of a capstone final project at Samsung Innovation Campus that helps patients decrease the number of unnecessary visits to doctors, minimizing both time and money. I found an article that worked with a similar dataset that helped me a lot with my preprocessing part. And I added more puzzles to it, which I will share here.</p><p>If you ever have a stiff dataset and you work with NLP, your model accuracy is not good.and can’t see any way out You can consider this article to be a good reference.</p><h3><strong>The Data:</strong></h3><p>it was originally obtained from the UCI machine learning repository under the name <a href="https://archive.ics.uci.edu/dataset/462/drug+review+dataset+drugs+com">Drug Review Dataset</a>.&quot; It contains 7 <em>columns</em> and 215,063 <em>instances</em></p><ol><li>ID: Unique ID identifier for reviews = float</li><li>drug name: Name of the medication reviewed = object</li><li>condition: The condition that the medication is used for = object</li><li>review: The review made by patients for a particular medicine = object</li><li>rating: Rate on a scale of 1–10 by the user = float</li><li>date: The date of review = float</li><li>usefulCount: The number of patients who found this review useful = float</li></ol><p>I worked mainly on the data preprocessing at the beginning. I had to do much of the preprocessing, and I will make it clear through some of the things that I noticed.</p><h3><strong>Date-parsing is not always helpful</strong></h3><p>if you work with time series or forecasting, you can consider the date column, but what I noticed when reviewing many projects was that people used the date blindly. I had to drop the date columns because I saw an equal distribution for all the times of appearance and there was no trend over years/months, so next time you may want to check the contribution of your target or anything to the date before using it blindly!</p><h3><strong>2. in-depth analysis:</strong></h3><p>Using the <em>df.head() </em>function<em> </em>only can lead to missing more and more things while spectating your data. One of our teammates just tried to set the print options to max! and indeed, we discovered that some of the instances needed more cleaning techniques so we updated our functionality</p><pre>pd.set_option(&#39;display.max_rows&#39;, None)<br>pd.set_option(&#39;display.max_colwidth&#39;, None)<br>no_condition = df[df[&#39;condition&#39;].notna() &amp; df[&#39;condition&#39;].str.endswith(&#39;&lt;/span&gt; users found this comment helpful.&#39;)]<br>no_condition</pre><p>these are values of &lt;/span&gt;, and they start counting since the instance number 100! if you have more than 5K instances, you may want to take a deeper look as your data may vary</p><p>and it’s not just about looking into null and out-of-range values, my teammate was super comfortable with exploring and cleaning it, she spotted the same condition occurring but with a different answer, Unfortunately, that was hard to fix, and it took us more than 100 lines of hard coding!</p><pre>#sample<br>#Breast Cance<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Breast Cance&#39;, &#39;Breast Cancer&#39;)<br>#Cance<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Cance&#39;, &#39;Cancer&#39;)<br>#&#39;Colorectal Cance&#39;<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Colorectal Cance&#39;, &#39;Colorectal Cancer&#39;)<br>#Corneal Ulce<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Corneal Ulce&#39;, &#39;Corneal Ulcer&#39;)<br>#Dermatitis Herpeti<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Dermatitis Herpeti&#39;, &#39;Dermatitis Herpetiformis&#39;)<br>#&#39;Dissociative Identity Disorde&#39;<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Dissociative Identity Disorde&#39;, &#39;Dissociative Identity Disorder&#39;)<br>#&#39;Duodenal Ulce&#39;<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Duodenal Ulce&#39;, &#39;Duodenal Ulcer&#39;)<br>#&#39;Endometrial Cance&#39;<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Endometrial Cance&#39;, &#39;Endometrial Cancer&#39;)<br>#&#39;Gastric Cance&#39;<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Gastric Cance&#39;, &#39;Gastric Cancer&#39;)<br>#Q Feve<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Q Feve&#39;, &#39;Q Fever&#39;)<br>#Rat-bite Feve<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Rat-bite Feve&#39;, &#39;Rat-bite Fever&#39;)<br>#Schizoaffective Disorde<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Schizoaffective Disorde&#39;, &#39;Schizoaffective Disorder&#39;)<br>#Seasonal Affective Disorde<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Seasonal Affective Disorde&#39;, &#39;Seasonal Affective Disorder&#39;)<br>#Shift Work Sleep Disorde<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Shift Work Sleep Disorde&#39;, &#39;Shift Work Sleep Disorder&#39;)<br>#Skin Cance<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Skin Cance&#39;, &#39;Skin Cancer&#39;)<br>#Social Anxiety Disorde<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Social Anxiety Disorde&#39;, &#39;Social Anxiety Disorder&#39;)<br>#Somat<br>df[&#39;condition&#39;] = df[&#39;condition&#39;].replace(&#39;Somat&#39;, &#39;Somatoform Pain Disorder&#39;)</pre><h3><strong>3. Don’t apply sentimental polarity blindly:</strong></h3><p>Whenever you hear of NLTK and sentiment analysis, people always go blindly to the polarity score. Another important feature to keep an eye on is the Vader sentiment or intensity score in NLTK. it provides a gauge of how strongly an opinion is expressed in the text. For example, an intensity score might indicate whether a positive sentiment is expressed strongly or weakly.</p><blockquote>My son is halfway through his fourth week of …</blockquote><blockquote>review, but it’s just a story!</blockquote><p>and in the case of our reviews, as a glimpse, we noticed there was a lot of chit-chatting and data that we didn’t want to consider, so we used the intensity analyzer.</p><pre>from nltk.sentiment import SentimentIntensityAnalyzer<br>nltk.download(&#39;vader_lexicon&#39;)<br>nltk_analyzer = SentimentIntensityAnalyzer()</pre><p>So whenever you want to consider the sentiment of a review, especially if those reviews were filled by users, you may want to consider the intensity score. Not all reviews are important or have that amount of information. Applying only sentiment polarity can have a poor effect on your modeling phase.</p><h3><strong>4. Modeling:</strong></h3><p>And this is the most challenging part. I want to highlight that if you ever worked with data that took you a lot of time to clean and process but performed poorly in modeling, mainly under-fit, I might have new suggestions for you</p><p>Even after cleaning our data, there were around 213k instances, The nature of our data was so hard to sample, as it performed poorly on sampled training data, and because of the high storage and size of our data, our sessions tended to crash while using Colab. Luckily, Kaggle provides 30 GB of RAM. And since the accuracy score by itself is insufficient, I truly want to draw your attention to the need to apply several accuracy metrics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r_YEOJKp4KLZQmtxwG2mNg.png" /></figure><p>We came up with some decent models of decision trees, and RandomForest accuracy ranges from 0.6–0.7, so we decided to build something new! For increased data flow, some of our peers recommend integrating the API and adding the data to Custom ChaGPT 0.4.</p><p>For me, customizing ChatGPT was a magical experience; I also assisted with prompt engineering. As a typical machine learning practitioner, I don’t find it enjoyable, but it was incredibly quick and simple. Instead of worrying about AI replacing us,</p><p>We had a lot of work to perform and configuration to complete when we incorporated the API. We used Replit! Our instructors suggested that platform, and I find it very useful for developers’ collaboration as a coding environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3rJuMQeITMQ8_Qif1iqAEg.png" /></figure><blockquote>I think we should be concerned about people using AI tools replacing us.</blockquote><p>Fortunately, we were able to utilize our data to create a conversational model that would teach you more about the prescription you should take and how often others recommend it!</p><p>Our project name, SmartMeds, is a bespoke chatGPT. As people tend to talk more and occasionally try to figure out their symptoms while talking to doctors, this conversational approach to data entry is thought to be the best one. The chatbot will help autocomplete and suggest the symptoms that you’re trying to describe by using the existing data and past people’s symptoms. And lastly, based on reviews from the community, it can suggest the top 5 medicines for you.</p><p>In conclusion, I think you should always modify your approach to tackling an issue if you have ever worked on a machine learning project and have the freedom to do so, even after you have dug a little. particularly if you wish to experiment with a sturdy or time-saving approach. Any new technology that can be useful to you can be used.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=460ee267be75" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is the core idea of correlation analysis?]]></title>
            <link>https://medium.com/@ahmedalghali/what-is-the-correlation-analysis-core-idea-d8ab32e2c5de?source=rss-f45408c31317------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8ab32e2c5de</guid>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[correlation]]></category>
            <dc:creator><![CDATA[Ahmed Alghali]]></dc:creator>
            <pubDate>Sun, 25 Jun 2023 10:40:01 GMT</pubDate>
            <atom:updated>2024-01-04T10:05:39.852Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cXicQFUXo-Q2W3CxTNSFKQ.png" /></figure><p>What is the Correlation analysis core Idea?</p><blockquote>Correlation analysis is a statistical method used to determine whether there is a relationship between two variables. It tells us how the two variables are related and how they affect each other.</blockquote><p>The first time you hear the word “correlation,” you might think of the regression line in a scatter plot. A scatter plot is a diagram that shows the relationship between two variables. For example, there is a relationship between the number of hours you spend studying and your grades. There is also a relationship between the number of times you spend watching TV and your sleep performance.</p><p>That’s what is called the correlation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IuYf0Qgb1cK1cH2GWYdPqg.jpeg" /><figcaption>figure 0.1</figcaption></figure><ol><li>The direction (positively correlated (+), negatively co-related(-))</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*QQBoOGk3b8lpnto9zPIatw.png" /><figcaption>figure 0.2</figcaption></figure><ul><li>An example of the diagram when it’s a negative co-relation</li></ul><blockquote>Regression</blockquote><blockquote>Is a statistical method used to describe the nature of the relationship between variables, that is, positive or negative, linear or nonlinear.</blockquote><p>If we assume x and y are parameters, assume x is the number of people and y is the number of available seats in a bus</p><p>The more people there are, the less you find available seats</p><p>For better mathematical intuition, you can see the graph of linear equations; it’s straight, just like the regression.</p><p>In general, the more that u have a result equal to 1, the more likely it is that the relationship is strong and tight</p><p>The range of the correlation coefficient is from -1 to +1 because it’s a linear regression (statistical equation).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*ykaeXqxjZwHmgHMitdd0vg.png" /><figcaption>Equation of Correlation coefficient</figcaption></figure><p>Correlation analysis is a strong foundation for machine learning, and when applying linear regression algorithms, I do see it as one of the best areas to pursue. It will give you a solid understanding of how equations can be represented in the cartesian plane and how to derive conclusions!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8ab32e2c5de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data science hierarchy of AI I Differentiate between a data analyst, a Engineer and a data…]]></title>
            <link>https://medium.com/@ahmedalghali/data-science-hierarchy-of-ai-i-differentiate-between-data-analyst-software-engineer-and-data-49e64a227032?source=rss-f45408c31317------2</link>
            <guid isPermaLink="false">https://medium.com/p/49e64a227032</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Ahmed Alghali]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 06:48:50 GMT</pubDate>
            <atom:updated>2024-01-04T10:00:04.797Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data science hierarchy of AI I Differentiate between a data analyst, a Engineer and a data scientist.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*Zzl3GUXxei1i69L8aG0N1g@2x.jpeg" /></figure><p>just to make things more clear a lot of data science practitioners don’t know what to do or what they are going to do if they get accepted into a position as a data analyst, a data engineer, a product manager, etc.</p><p>it took me a whole year to differentiate between these job titles by reading Books, articles, and sometimes asking data scientists it’s more challenging when you are still a student who wants to decide which position is best for you.</p><p>To make things more confusing, many companies have different definitions of a data scientist.</p><p>ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ</p><p>Remark: If u can’t collect data properly, then there is no point in working on AI and Deep learning</p><p>After making sure u collect the data, you will need to store and move it, whether you used relational database management or CSV files and you will have these data pipelines move the data from one place to another</p><p>When you work on this, you will have a lot of distributive systems so people who work on this should be good at distributive systems so they are either called Software Engineers or some call them Data engineers. They took the first two missions on the hierarchical structure</p><p>So they take the mission, transform it, and clean the data</p><p>Now you have the data and you want to query it</p><p>There is nothing better than SQL to do that</p><p>Some companies have their own tool to query the data. Here is where the mission of the data analyst, business analyst, and product manager comes to answer questions like, How many users have pressed that button or used my new feature?</p><p>As long as we build a great backbone of clean data, we can now work on A/B testing, which is a great framework for companies</p><p>You can also build a simple regression to predict user behaviour and build features around it.</p><p>etc…</p><p>Now we can use AI and Deep learning if we want</p><p>So to make things more clear for the position of the data scientist, data analyst, and data engineer,</p><ol><li>A data analyst will be working on pipeline exploration, storage, data flow, sensors logging, etc.</li><li>Software engineers usually do the collect side since it’s implemented on the frontend side and a little bit of the back side because that is where you collect the user’s data</li><li>Data analyst work on this aggregate part of analytics</li></ol><p>Nowadays, some big tech companies call them data scientists</p><p>4. The data scientist will be working on the A/B testing and the machine learning models area.</p><p>In some companies, like Google, software engineers will do all of the hierarchical structure</p><p>So as Joma Tech just says, you need to look at the job description and the responsibilities.</p><p>— — — — — — — — — —</p><p>reference is: data science cookbook link (https://lnkd.in/dk9HN8F3)</p><p>and the hierarchy of AI by Monica Rogati (link: <a href="https://lnkd.in/d9H2Cjxj)">https://lnkd.in/d9H2Cjxj)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49e64a227032" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>