<?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 Nourhan Abdelkerim on Medium]]></title>
        <description><![CDATA[Stories by Nourhan Abdelkerim on Medium]]></description>
        <link>https://medium.com/@nourhanmagdy1?source=rss-d89c7336e197------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Od1U-ni12qnW7Wbzx9Dakg@2x.jpeg</url>
            <title>Stories by Nourhan Abdelkerim on Medium</title>
            <link>https://medium.com/@nourhanmagdy1?source=rss-d89c7336e197------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:05:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nourhanmagdy1/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[How to pass a technical interview as a Data Scientist?]]></title>
            <link>https://medium.com/@nourhanmagdy1/how-to-pass-a-technical-interview-as-a-data-scientist-9485a8334714?source=rss-d89c7336e197------2</link>
            <guid isPermaLink="false">https://medium.com/p/9485a8334714</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Nourhan Abdelkerim]]></dc:creator>
            <pubDate>Tue, 05 May 2026 15:10:03 GMT</pubDate>
            <atom:updated>2026-05-06T08:09:10.245Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Data Science Interview Guide: From Machine Learning Fundamentals to LLMs</blockquote><p><strong>There are 15 main points that you must cover:</strong></p><ol><li><strong>Understanding the Data</strong></li><li><strong>Data Preprocessing</strong></li><li><strong>Machine Learning Models</strong></li><li><strong>Evaluation Metrics</strong></li><li><strong>Core ML Concepts</strong></li><li><strong>Deep Learning Fundamentals</strong></li><li><strong>Sequence Models</strong></li><li><strong>NLP Foundations</strong></li><li><strong>OCR (Computer Vision + NLP)</strong></li><li><strong>Time Series Dataset Understanding</strong></li><li><strong>Hypothesis Testing &amp; A/B Testing</strong></li><li><strong>Large Language Models</strong></li><li><strong>Retrieval Augmented Generation</strong></li><li><strong>LangChain and LangGraph</strong></li><li><strong>MLOps</strong></li></ol><blockquote><strong>In this article, we will discuss and explain these points in detail to understand them deeply. It is just a high-level revision for data scientists.</strong></blockquote><h3><strong>Let’s start…</strong></h3><h4><strong>1. Understanding the data</strong></h4><p><strong>1.1 Data Size</strong></p><p>Data size directly affects model choice and performance.</p><ul><li>Small datasets (&lt;50K rows)<br>Models tend to overfit because they memorize patterns instead of generalizing.<br>Prefer simpler models like Logistic Regression or Decision Trees.</li><li>Medium datasets (~1M rows)<br> You can start using ensemble methods like Random Forest or XGBoost.</li><li>Large datasets (&gt;1M rows)<br> You can safely use complex models (deep learning, transformers).</li></ul><p><strong>1.2 Data Types</strong></p><p>Understanding feature types determines preprocessing.</p><p>1. Quantitative (Numerical)</p><ul><li>Continuous → can take any value (e.g., salary, height)</li><li>Discrete → countable values (e.g., number of transactions)</li></ul><p>2. Qualitative (Categorical)</p><ul><li>Nominal → no order (e.g., country, gender)</li><li>Ordinal → has order (e.g., low &lt; medium &lt; high)</li></ul><p><strong>1.3 Data Splitting &amp; Cross-Validation</strong></p><ul><li>Train/Validation/Test Split: Always divide data to ensure the model generalizes to unseen data.</li><li>Cross-Validation: Training your model on multiple different subsets of the data. This guarantees robustness and ensures the model does not just memorize the training set.</li></ul><h4><strong>2. Data Preprocessing</strong></h4><p><strong>2.1 Missing Values</strong></p><p>Real data is never clean.</p><p>You have two choices:</p><ol><li>Drop rows → if missing values are few</li><li>Fill values (Imputation):</li></ol><ul><li>Mean → for normal distributions</li><li>Median → for skewed data (more robust)</li><li>Mode → for categorical</li><li>Interpolation → for time series <em>(Note: Interpolation is also highly useful to fill in the gaps created if you drop outliers from time-series data).</em></li></ul><p><strong>2.2 Duplicates</strong></p><p>Duplicate rows bias the model.<br>For example, if the same fraud transaction appears 10 times, the model overlearns it.</p><p><strong>2.3 Outliers</strong></p><p>Outliers are extreme values that distort training.</p><p>We detect them using IQR (Interquartile Range):</p><ul><li>Q1 = 25%</li><li>Q3 = 75%</li><li>IQR = Q3 — Q1</li></ul><p>Anything outside: Q1–1.5×IQR and Q3 + 1.5×IQR</p><p>Handling: Remove or Cap <em>(Note: If removing outliers specifically in time series data, remember to use interpolation to fill the resulting missing gaps).</em></p><p><strong>2.4 Encoding</strong></p><p>Models need numbers, not text.</p><ul><li>Label Encoding: use for ordinal data, it is to assign numbers (Low=1, Medium=2, High=3)</li><li>One-Hot Encoding: use for nominal data, it<strong> </strong>is to create binary columns</li></ul><p><strong>2.5 Feature Scaling</strong></p><p>Some models depend on feature magnitude.</p><ol><li>Normalization is scaling data to [0,1]. It is like “Where does this point lie between min and max?”. It is sensitive to outliers.</li><li>Standardization is centering data around mean = 0. It is like “How far is this point from the average?”. It handles outliers well.</li></ol><p>Needed for:</p><ul><li>SVM, KNN, and Neural Networks</li></ul><p>Not required for:</p><ul><li>Tree-based models</li></ul><p><strong>2.6 Imbalanced Data</strong></p><p>When one class dominates.</p><p>For Example, Fraud = 1% and Normal = 99%</p><p>The model can cheat by always predicting &quot; normal &quot;.</p><p>Solutions:</p><ul><li>Oversampling (SMOTE)</li><li>Undersampling</li><li>Class weights</li></ul><p><strong>2.7 Dimensionality Reduction</strong></p><p>Too many features = noise + slow training.</p><ul><li>PCA → reduces features while preserving variance</li><li>Feature selection &amp; L1 Regularization → keep important features only, avoid overfitting, and improve speed.</li></ul><h4>3. Machine Learning Models</h4><p><strong>3.1 Linear Models</strong></p><p>Simple, interpretable, fast and stable.</p><ul><li>Linear Regression → predict continuous values</li><li>Logistic Regression → classification</li></ul><p>Companies love them: easy to explain to the business</p><p><strong>3.2 Tree-Based Models (Favorites for Tabular Data)</strong></p><ol><li>Decision Tree</li></ol><ul><li>Works like rules (if-else)</li><li>Used for simple problems, but easy to overfit</li></ul><p>2. Random Forest (Bagging)</p><ul><li>Many trees are trained independently in parallel</li><li>Take the average of results to reduce variance and overfitting</li></ul><p>3. XGBoost (Boosting)</p><ul><li>Trees trained sequentially, each learns from the previous one.</li><li>Handles missing values, captures non-linearity, reduces bias and variance.</li><li>Slower to train and less interpretable.</li></ul><p><strong>3.3 SVM (Support Vector Machines)</strong></p><p>Finds the best boundary between classes.</p><p>Works well when:</p><ul><li>High-dimensional data</li><li>Small datasets</li></ul><p><strong>3.4 Naive Bayes</strong></p><p>Based on probability.</p><p>Assumes features are independent.</p><p>Works well for:</p><ul><li>Text classification</li><li>Spam detection</li></ul><p><strong>3.5 Unsupervised Learning</strong></p><ul><li><strong>K-Means Clustering:</strong> Grouping unlabelled data into ‘K’ distinct clusters.</li></ul><h4>4. Evaluation Metrics</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*bJNwIJ1jIelgdMl8QrC23g.png" /></figure><p><strong>4.1 Classification Metrics</strong></p><ol><li>Accuracy: Good only when the data is balanced</li><li>Precision: “How many predicted positives are correct?” Use when false positives are costly (e.g., Spam detection, to not block real emails)</li><li>Recall: “How many actual positives did we find?” Use when missing a positive is costly (e.g., Cancer detection &amp; Fraud detection).</li><li>F1 Score: Balance between precision and recall. Best for imbalanced data.</li><li>ROC-AUC: Evaluates true positive vs. false positive rates across different thresholds.</li></ol><p><strong>4.2 Regression Metrics</strong></p><ul><li>MSE → penalizes large errors</li><li>MAE → robust</li><li>RMSE → interpretable</li><li>R² → goodness of fit</li></ul><h4><strong>5. Core ML Concepts</strong></h4><p><strong>5.1 Bias vs Variance</strong></p><ul><li>Bias is error due to overly simple assumptions in the model. High bias → Model is underfitting</li><li>Variance is error due to model being too sensitive to training data. High variance → Model is overfitting</li></ul><p><strong>5.2 Overfitting vs Underfitting</strong></p><ol><li>Overfitting: Model is too complex and memorizes training data.</li></ol><p>Solutions:</p><ul><li>Regularization (Adding a penalty (L1/L2) to the model’s loss function based on the size of its weights/parameters.)</li><li>More data</li><li>Simpler model</li><li>Dropout</li></ul><p>2. Underfitting: Model is too simple to capture patterns.</p><p>Solutions:</p><ul><li>Complex model</li><li>Train longer</li><li>Add meaningful features</li></ul><p><strong>5.3 Bagging vs Boosting</strong></p><ul><li>Bagging → Training decision trees in parallel &amp; independently, taking average of results.</li><li>Boosting → Training trees sequentially &amp; learning each from the previous.</li></ul><h4>6) Deep Learning Concepts</h4><p><strong>6.1 Learning Rate</strong></p><ul><li>Controls the steps the model takes to update weights.</li><li>Too small → slow; Too large → unstable.</li></ul><p><strong>6.2 Vanishing Gradient</strong></p><ul><li>Gradients become 0 → model is not learning anymore.</li></ul><p><strong>6.3 Exploding Gradient</strong></p><ul><li>Training unstable &amp; gradient is huge.</li></ul><p><strong>6.4 Activation Functions</strong></p><ul><li>Allow Neural Networks to learn complex, non-linear patterns.</li><li>ReLU → Most used. Fixes the Vanishing Gradient problem.</li></ul><p><strong>6.6 Dropout</strong></p><ul><li>Randomly turn off neurons during training to prevent overfitting.</li></ul><p><strong>7. Sequence Models</strong></p><p><strong>7.1 RNN</strong></p><ul><li>Processes sequence step-by-step.</li><li>Problems: Cannot capture long-term dependencies, slow (sequential, no parallelism), and suffers from vanishing gradient.</li></ul><p><strong>7.2 LSTM</strong></p><ul><li>Fixes RNN memory problem by using gates.</li><li>Able to handle long-term dependency.</li><li>Problems: Still slow due to sequential method &amp; hard to train.</li></ul><p><strong>7.3 Transformers</strong></p><ul><li>Replaces recurrence with an attention mechanism.</li><li>Advantages: Process all sequences at once (parallel) and better performance.</li></ul><ol><li><strong>Attention Mechanism:</strong> Each word interacts with others.</li></ol><ul><li>Query (Q) → what I am looking for.</li><li>Key (K) → what others offer.</li><li>Value (V) → actual info.</li></ul><p><strong>2. Self-Attention:</strong> Each word attends to all other words in the same sentence.</p><p><strong>3. Multi-Head Attention:</strong> Multiple attention mechanisms instead of one (e.g., one for meaning, one for grammar).</p><p><strong>4. Encoder:</strong> Understands input. Includes multi-head attention, feed forward network, and layer normalization to return context-aware representations.</p><p><strong>5. Decoder:</strong> Generates output sequence. Includes masked self-attention, encoder-decoder attention, and feed forward.</p><h4>8. NLP Fundamentals</h4><p><strong>8.1 Tokenization</strong></p><p>Split text into words (e.g., “hello my friend” → [“hello”, “my”, “friend”]).</p><p><strong>8.2 Stop Words</strong></p><p>Remove common words (e.g., “is”, “are”).</p><p><strong>8.3 Stemming vs Lemmatization</strong></p><ul><li>Reduce word to base form (e.g., “running” → “run”).</li><li>Stemming is crude; Lemmatization is correct.</li></ul><p><strong>8.4 N-grams</strong></p><p>Number of used words together.</p><p>Example:</p><ul><li>1-gram → [“hello”,”my”,”friend”]</li><li>2-gram → [“hello my”, “my friend”]</li></ul><p><strong>8.5 Bag of Words</strong></p><p>Count of word appearances.</p><p><strong>8.6 TF-IDF (</strong>Term Frequency-Inverse Document Frequency)</p><ul><li>Measures importance of a word in a document.</li><li>Common word = low importance; Rare word = high importance.</li></ul><p><strong>8.7 Embeddings</strong></p><p>Numerical vector representation of text that captures meaning in continuous space.</p><h4>9. OCR</h4><ul><li>Process of converting images of text into machine-readable text.</li><li>Used in: Bank statements, Documents.</li><li>Tools: Tesseract, pdfplumber, easyocr.</li></ul><h4>10. Time Series Dataset Understanding</h4><p><strong>10.1 Dataset</strong></p><ol><li>Trend: Long-term movement.</li><li>Seasonality: Repeating patterns at fixed intervals.</li></ol><p><strong>10.2 Models</strong></p><ol><li>ARIMA: Good to use with short-term forecasting on data with clear patterns.</li></ol><p><strong>10.3 Evaluation &amp; Cross-Validation</strong></p><ul><li>Standard cross-validation randomly shuffles data, which causes data leakage in time series (using future data to predict the past).</li><li>Instead, you must strictly respect chronological order using a Rolling Window or Expanding Window (Time Series Split) approach (e.g., Train on Time 1, Validate on Time 2; then Train on Time 1 &amp; 2, Validate on Time 3).</li></ul><h4>11. Hypothesis Testing &amp; A/B Testing</h4><p><strong>11.1 A/B Testing</strong></p><p>Normal testing used to compare two versions to determine which performs better on a defined metric (A → current model, B → new model).</p><p><strong>11.2 Hypothesis Testing</strong></p><ul><li>Check if A &amp; B are statistically significant or not.</li><li>Null hypothesis → means A &amp; B are the same (no difference).</li><li>p-value → probability of seeing results as extreme as this just by random chance.</li><li>If p-value &lt; 0.05 → means both are significant.</li></ul><h4>12. Large Language Models</h4><p><strong>12.1 Token Limits</strong></p><p>Handled by Chunking, Sliding window, and Summarization.</p><p><strong>12.2 Latency</strong></p><p>Time to generate a response.</p><p><strong>12.3 KV Caching</strong></p><ul><li>K for key, V for value.</li><li>Values of each word are stored to reuse for next tokens, meaning the model doesn’t recompute attention for all previous tokens.</li><li>Gives huge speed in generation.</li></ul><p><strong>12.4 Hallucination</strong></p><p>Model generates wrong info. Fix by: RAG, fine-tuning, strict prompt forcing use of provided context, and tool usage.</p><p><strong>12.5 Fine-tuning vs PEFT(Parameter Efficient Fine Tuning)</strong></p><ul><li><strong>Fine-tuning</strong> → update all parameters.</li><li><strong>PEFT</strong> → update subset of parameters.</li></ul><ol><li><strong>LoRA:</strong> Freezes original weights and trains tiny rank decomposition matrices.</li></ol><p><strong>2. QLoRA:</strong> Quantizes base model to 4-bit before applying LoRA.</p><p><strong>3. Adapters:</strong> Small trainable networks inserted between model layers.</p><p><strong>4. Prefix Tuning:</strong> Appends trainable “virtual tokens” to the input.</p><p><strong>12.6 Quantization</strong></p><p>Reduce precision of weights to save memory.</p><p><strong>12.7 RLHF</strong></p><p>Reinforcement Learning from Human Feedback.</p><p>Supervised fine-tuning learns basic behavior, then humans rank outputs, then improve model using reward.</p><p><strong>12.8 Prompting Types</strong></p><ul><li>Zero-shot: Asking the model to perform a task immediately without providing any prior examples or demonstrations.</li><li>Few-shot (example): Including a few input-output examples in the prompt to show the model the desired pattern or format.</li><li>Chain-of-thought: Prompting the model to explain its step-by-step reasoning process before arriving at a final conclusion.</li><li>Instruction prompting: Giving the model a direct, explicit command or set of rules to follow for a specific task.</li><li>Role prompting: Assigning a specific persona or expertise to the model to guide its tone, style, and perspective.</li><li>System prompting: Setting high-level, foundational instructions that define the AI’s core behavior and constraints for the entire session.</li></ul><p><strong>12.9 Deployment</strong></p><p>vLLM for local serving.</p><h4><strong>13. Retrieval Augmented Generation</strong></h4><p><strong>13.1 Chunking Strategy</strong></p><ul><li>Semantic Chunking → split by meaning.</li><li>Overlapping Chunks → use last chunk with the new one to save the context.</li></ul><p><strong>13.2 Retrieval &amp; Search</strong></p><ul><li>Similarity Types: Cosine Similarity for normalized embeddings; Dot product for non-normalized &amp; faster computation.</li><li>Hybrid Search: Make similarity applied on both semantic search &amp; keyword search.</li></ul><p><strong>13.3 Re-ranking</strong></p><ul><li>Because retriever returns top K chunks based on embedding similarity only, use a re-ranker like Cross-Encoder to score query &amp; document together.</li></ul><p><strong>13.4 Evaluation</strong></p><ul><li>Retrieval evaluation → Recall &amp; Precision.</li><li>Generation evaluation → Exact match, BLEU, ROUGE.</li><li>Answer correctness &amp; relevance → Use LLM as judge.</li></ul><h4><strong>14. LangChain and LangGraph</strong></h4><p>Frameworks used to build applications powered by LLMs.</p><h4><strong>15. MLOps</strong></h4><ul><li>Docker image → Save environment and ensure it is isolated.</li><li>CI/CD → Continuous Integration / Continuous Delivery &amp; Deployment to automate testing and rollout.</li></ul><blockquote><strong>At the end, Always focus heavily on projects you have actually worked on and understand deeply.</strong></blockquote><blockquote><strong>Be prepared to narrate your project journey from start to finish. Frame the initial business problem, explain the data challenges you faced, and describe how your solution created an impact.</strong></blockquote><blockquote><strong>Interviewers want to know what <em>you</em> did. Clearly explain your specific role in the project, the technical decisions you independently made, and how those contributions shaped the final outcome.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9485a8334714" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Postman: Enhancing API Development and Testing in Modern Software Engineering]]></title>
            <link>https://medium.com/@nourhanmagdy1/postman-enhancing-api-development-and-testing-in-modern-software-engineering-02c10be355c9?source=rss-d89c7336e197------2</link>
            <guid isPermaLink="false">https://medium.com/p/02c10be355c9</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[postman]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Nourhan Abdelkerim]]></dc:creator>
            <pubDate>Fri, 02 Aug 2024 12:15:23 GMT</pubDate>
            <atom:updated>2024-08-02T12:15:23.991Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>In this tutorial</strong><em>, we will learn about one of the popular and widely used in software industry, Postman. It is the most used tool for to test API responses. We will explain what it is and how to use it in simple tasks. Let’s have a brief introduction to the Postman.</em></blockquote><h3>Introduction</h3><h4>1. Overview</h4><p>Postman is a widely utilized tool for API development and testing, providing developers with the capability to test and document APIs efficiently. It features an intuitive interface for composing HTTP requests and examining the corresponding responses. With Postman, developers can effortlessly send requests to their APIs and scrutinize the outcomes, thus facilitating the debugging and refinement processes.</p><h4><strong>2. Importance</strong></h4><p>Postman effectively simulates browser requests to specified URLs, proving particularly useful in scenarios where URL testing is required independent of a user interface. By emulating the request-response cycle, Postman displays the anticipated responses, thereby allowing developers to validate the functionality of their APIs without the need for a fully developed front-end interface.</p><h3>Usage and case study</h3><blockquote>In Figure 1, as displayed an API is called <a href="http://127.0.0.1:8000/calculate_metrics"><strong>http://127.0.0.1:8000/calculate_metrics</strong></a>, it developed to retrieve mean, median and mode of a list.</blockquote><h4>Steps to test this API, to make sure that it retrieves this output</h4><ol><li>Open Postman then Enter add to add new request.</li><li>Select request type http.</li><li>Select API type (post, get, put, delete, etc.), it should be selected as the same type the API has been developed.</li><li>Enter API URL.</li><li>Select the way to format the input in Body format.</li><li>Select request data into JSON format.</li><li>Enter data that should be sent to the API as an input.</li><li>Press send to send the request.</li><li>The response from request to API is displayed in JSON format.</li><li>Status of request is 200, which means success response. Also here’s the response time.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LtMyop-e67c5ififLS_3ww.png" /></figure><h3>Features</h3><blockquote>Also, postman can help you to generate request in code with your prefere programming language without sending it through postman itself.</blockquote><p><strong>Click &lt;/&gt; , select programming language and the code will appear.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CToO9_ZBdwQ6ZpwlTeSOEw.png" /></figure><blockquote><strong>Developer Experience</strong>: Overall, Postman enhances the developer experience by providing a comprehensive suite of tools that are easy to use yet powerful enough to handle complex workflows. This contributes to a more enjoyable and efficient development process, fostering innovation and creativity.</blockquote><h3>Conclusion</h3><p>This tutorial has explored Postman, a powerful tool for API development and testing. We have delved into some features, including its user-friendly interface and request-building capabilities. Additionally, we highlighted Postman’s strengths in manual testing. We also discussed its broader impact on software development.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02c10be355c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Image Variation Using Stable Diffusion]]></title>
            <link>https://medium.com/@nourhanmagdy1/image-variation-using-stable-diffusion-1e69c901d4ed?source=rss-d89c7336e197------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e69c901d4ed</guid>
            <category><![CDATA[generative-model]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[gans]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <dc:creator><![CDATA[Nourhan Abdelkerim]]></dc:creator>
            <pubDate>Sat, 28 Oct 2023 10:42:32 GMT</pubDate>
            <atom:updated>2023-10-28T12:58:32.909Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NFm7zy3_IfN6ooG3Y8oVrA.png" /></figure><h3>Image variation</h3><p>Image variation in the context of AI generative models typically refers to the diversity of generated images produced by these models. AI generative models, such as Generative Adversarial Networks (GANs) and Variational Autoencoders (VAEs), are designed to create new images or modify existing ones. The concept of image variation is important because it reflects the ability of the model to produce a wide range of visually distinct outputs.</p><p>Image variation measures how different the generated images are from one another while still adhering to the underlying data distribution. A model with high image variation will produce a wide array of images that exhibit different styles, features, and characteristics. While increasing image variation is desirable to avoid repetitive outputs, it should be balanced with the quality of generated images. A model with excessive variation might produce low-quality or unrealistic images.</p><blockquote>You can use stable-diffusion pre-trained model to generate variety of images</blockquote><pre># apply some installments <br>!pip install diffusers transformers accelerate scipy safetensors<br>!pip install compel --upgrade</pre><pre>from diffusers import StableDiffusionImageVariationPipeline<br>from PIL import Image<br>from io import BytesIO<br>import requests<br><br># load the model<br>pipe = StableDiffusionImageVariationPipeline.from_pretrained(&quot;lambdalabs/sd-image-variations-diffusers&quot;, revision=&quot;v2.0&quot;)<br># use cuda gpu to make your code faster<br>pipe = pipe.to(&quot;cuda&quot;)<br><br># enter image url here<br>url = &quot;https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Irises-Vincent_van_Gogh.jpg/1200px-Irises-Vincent_van_Gogh.jpg&quot;<br><br>response = requests.get(url)<br>image = Image.open(BytesIO(response.content)).convert(&quot;RGB&quot;)<br><br># &quot;num_images_per_prompt&quot; refers to number of regenerated images you need<br># &quot;num_inference_steps&quot; refers to The number of denoising steps. More denoising steps usually lead to a higher quality image at the expense of slower inference.<br><br>out = pipe(image, num_images_per_prompt=3, num_inference_steps=25, width=512, hight=264)<br><br># save image<br>out[&quot;images&quot;][1].save(&quot;result2.jpg&quot;)</pre><blockquote>This code requires GPU RAM 11.4 GB, you can run it on Google Colab notebook.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fVPnwqBZiJxaoZR7aTuiSg.png" /><figcaption>Input Image VS. Generated Image</figcaption></figure><blockquote>The quality of images is not good enough but you can use this model in data augmentation to produce data with a real diversity to train your model on.</blockquote><blockquote>Image variation is crucial in applications like image synthesis, style transfer, data augmentation, and art generation. For instance, in art generation, a lack of variation could result in repetitive, uninteresting art, while excessive variation might produce incoherent and messy results.</blockquote><h4>Reference:</h4><p><a href="https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/image_variation">https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion/image_variation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e69c901d4ed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Images Super Resolution Using Generative Models]]></title>
            <link>https://medium.com/@nourhanmagdy1/images-super-resolution-using-generative-models-5c50c7fc38a6?source=rss-d89c7336e197------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c50c7fc38a6</guid>
            <category><![CDATA[generative-model]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[super-resolution]]></category>
            <category><![CDATA[image-processing]]></category>
            <category><![CDATA[image-generation]]></category>
            <dc:creator><![CDATA[Nourhan Abdelkerim]]></dc:creator>
            <pubDate>Fri, 27 Oct 2023 15:46:47 GMT</pubDate>
            <atom:updated>2023-10-27T15:47:44.461Z</atom:updated>
            <content:encoded><![CDATA[<h3>Super Resolution Images Using Generative Models</h3><h3><strong>Image Resolution</strong></h3><p>In the concept of image processing, the meaning of resolution indicates how much information in the image is used to evaluate the quality of the image. Resolution is classified into multiple categories like Spectral Resolution, Radiometric Resolution, Spatial Resolution, and Temporal Resolution. The spatial resolution is used to improve the quality of images. It indicates the number of pixels that are used to construct the image. The smaller the pixel, the higher the resolution.</p><h4>1. Pixels</h4><p>Images are like matrices, they contain a lot of values, and each value indicates to specific pixel. Pixels are the smallest unit of an image which consists of three bands Red, Green, and Blue (RGB). Each band has a value between [0,255]. Zero means the pixel is off, and 255 represents the pixel is fully present.</p><h4>2. Low Resolution</h4><p>As shown in Figure 1, A low-resolution image means that the pixel density of the image is small thereby giving fewer details.</p><h4>3. High Resolution</h4><p>As shown in Figure 1, A high-resolution image means that the pixel density of the image is high leading to more details.</p><h4>4. Super Resolution</h4><p>SR is reconstructing an HR image from a single LR image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*L5OlnmeUGTQIe262ydII8Q.png" /><figcaption>Figure 1 High Resolution Image Vs. Low Resolution Image</figcaption></figure><blockquote><strong>These approaches explain how to reconstruct high resoution images from low resolution ones.</strong></blockquote><h3>Super Resolution Generative Adversarial Networks</h3><p>As shown in Figure 2, the architecture of Super-Resolution Generative Adversarial Networks (SRGAN) contains a combination of a generator network with its residual blocks and a discriminator network. Each block includes multiple convolutional layers with batch norm layers. The generator tries to generate HR images from LR input, and the discriminator judges if the generated images are the same as the target or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*46Rm8Gg1isbvAzqW458q4Q.png" /><figcaption>Figure 2 Super Resolution Generative Adversarial Networks (SRGAN)</figcaption></figure><h4>1. Network Architecture</h4><p>In the training process, there are two models being trained, the Generator model and the Discriminator model. Each one of them has its own network with its training and optimization. The chosen optimizer for the first few trials is ”Adam” for the gan network (the network that combines the generator and discriminator together) as it showed great results in a lot of papers. During the training process, the size of the data is very large. Data generators are being used to deal with this issue. The data generator does not load the whole dataset into the memory, but it loads them in batches so the memory does not get overloaded. In addition, while training the models, the hyper-parameters are tuned in order to get the best achievable results.</p><h4>2. General scheme of a Generative Adversarial Network</h4><p>People are using GANs in super-resolution tasks, because of their ability to provide realistic results with rich textures, quality, and resolution. The idea behind this formulation of training two models at the same time was presented, where a generator network is trained with the goal of producing new samples of data by collecting the distribution of data from the training dataset. In parallel, a discriminator network is trained with the intention of assessing the probability that the data created by the generator network came from the training distribution rather than from the generated samples. They will stay in training until the generator can generate images that are identical to the true training data (HR). In this training process, the cost function is dependent on both networks, generator and discriminator, to reduce the error between the produced and actual samples and to improve the probability of differentiating between the real and the generated (fake) samples on the other.</p><h4>Generator Network</h4><p>The generator is trained to create a realistic copy of HR images from LR images when GANs are used for super-resolution. Because of its strong performance in the super-resolution of natural pictures, the model built in this study is on the PhotoRealistic Single Image Super-Resolution Using a Generative Adversarial Network. The Generator network’s architecture is shown in Figure 3, along with the relevant configuration of kernel size (k), feature maps (n), and stride (s) for each convolutional layer. As a feature extractor, a single convolutional layer is utilized to generate 64 feature maps with 3 x 3 kernels and stride 1, followed by batch-normalization layers and ParametricReLU as the activation function. These maps are the input of a deeper feature extractor made up of (B = 16) residual blocks, and the output is then reconstructed using three convolutional layers. The skip connection transfers low-level features that are combined with high-level features learned by the residual blocks. Skip connection solves the vanishing gradient problem that happens while increasing the number of layers because of back-propagation by propagating larger gradients to the initial layers, and these layers could also learn as fast as the final layers, giving us the ability to train deeper networks. PixelShuffler x2 feature map is used for upscaling. 2 sub-pixel CNN are used in Generator. Since deeper networks are more difficult to be trained. The residual learning framework eases the training of these deep networks, and leading to improved performance, enables them to be substantially deeper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I4vj8jLWatEKRBY-x_nDug.png" /><figcaption>Figure 3 Generator Network</figcaption></figure><h4>Discriminator Network</h4><p>The Discriminator network’s architecture is shown in Figure 4. It is trained to distinguish between real images and generated HR images. It is structured from eight convolutional layers with 3 x 3 filter kernels, increased from 64 to 512 following the original VGG architecture. All convolutional layers have a LeakyReLU activation function, but convolutional layers 2 to 8 are followed by batch normalization layers before LeakyReLU. The convolutional layers end with 512 feature maps, followed by two dense layers and a sigmoid activation function that returns the probability of being real or fake.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vOsXx37FyDBIXdKWwG0Mcw.png" /><figcaption>Figure 4 Discriminator Network</figcaption></figure><h4>Methodology and Loss Functions</h4><p>While training the generator, the low-resolution images are fed into it after applying normalization. The generator will generate super-resolution images and then compare them with the target by measuring the mean absolute error between the generated output and the target for each image. The generator updates its parameters depending on the results of the loss function. After training the generator, it trains along with the discriminator with an adversarial approach, using the weights learned from previous stages and training the models with downsampled and original world-view images. In this stage, a combination of losses is used for updating the weights of the generator and the discriminator.</p><h4>Perceptual Loss</h4><p>The perceptual loss function is essential for the performance of the generator network. Perceptual loss is a combination between Content loss and Adversarial loss.</p><h4>Content Loss</h4><p>Content loss (generator loss) measures the Euclidean distance between- the target and the output of our model. VGG19 is used as a pre-trained model to extract the features and calculate the loss.</p><h4>Adversarial Loss</h4><p>The loss that makes the generator generate high-resolution images looks like the target by using a discriminator that judges if the generated image is the same as the target or not.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c50c7fc38a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is the difference between Computer Vision and Image Processing?]]></title>
            <link>https://medium.com/@nourhanmagdy1/what-is-the-difference-between-computer-vision-and-image-processing-bb36ab63ef84?source=rss-d89c7336e197------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb36ab63ef84</guid>
            <dc:creator><![CDATA[Nourhan Abdelkerim]]></dc:creator>
            <pubDate>Tue, 02 Aug 2022 11:42:31 GMT</pubDate>
            <atom:updated>2022-08-10T13:32:19.263Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Introduction</strong></blockquote><p>Image processing is a subset of computer vision. They both involve computations on images. But they are not the same thing. Let’s take a look at what they are and how they are different.</p><blockquote><strong>What is Computer Vision?</strong></blockquote><p>Computer Vision is the field of AI that gives computers and machines the ability to see, understand and interpret the visual world around us via machine learning techniques. Computer vision is focused on extracting information from the input images or videos to have a proper understanding of them to predict the visual input like a human brain. Image processing is one of the methods that is used for computer vision. A computer vision system uses image processing algorithms to try and perform emulation of vision at a human scale. For example, if the goal is to enhance the image for later use, then this may be called image processing. And if the goal is to recognize objects or defects for automatic driving, then it can be called computer vision.</p><p>Examples of some Computer Vision applications are- Object detection, Face detection, Eye detection, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*sfkgjj0jIsT_WUwQINYbGw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*hb7UXl5k3nfao4GwIUoAyA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*UpRZskX8hiXQEuj7y5C53g.jpeg" /><figcaption>1. Object Detection 2. Face Detection 3. Eye Detection</figcaption></figure><ol><li>Object Detection: We can use object detection to detect things with a self-driving car to turn on the accelerator when something appears around the car.</li><li>Face Detection: We can use face detection to detect if any people are in the image or not, it helps us to move to the second step which is to recognize who is in the image(Face recognition), which is used in security systems. Also, we can use it in applications of the Mask Detection, which detect is a human wears a mask or not and we all know how it is useful these days.</li><li>Eye Detection: We can use eye detection in many applications like detecting the eyes of the driver while he driving and if he drowses the system will alert him(Drowsiness Detection).</li></ol><p>For those interested in the football game, in the next World Cup, they will use an AI referee which is depending on computer vision to detect players in offsite positions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*EogYJk9v5PJui7Hj3XN7lg.jpeg" /><figcaption>Players Detection</figcaption></figure><p><a href="https://github.com/nourhanmagdy1/Computer-Vision">For more info about these projects, you can check my project about Face Detection, Face Recognition, and Drowsiness Detection.</a></p><blockquote>What is Image Processing?</blockquote><p>Image Processing is the field of enhancing the images by tuning many parameters and features of the images. So Image Processing is the subset of Computer Vision. Here, transformations are applied to an input image, and the resultant output image is returned. Some of these transformations are- sharpening, smoothing, stretching, etc. Image processing is mainly focused on processing the raw input images to enhance them or preparing them to do other tasks, like computer vision tasks. Image processing uses methods like Anisotropic diffusion, Hidden Markov models, Independent component analysis, Different Filtering, etc.</p><p>Examples of some Image Processing applications are- Rescaling images, Correcting illumination, Changing tones, etc.</p><blockquote>What are the steps in image processing?</blockquote><p>Image acquisition is the very first step in image processing, followed by analyzing and manipulation, image enhancement and restoration, image transformation, image segmentation, color image processing, image compression, morphological processing, and object detection and recognition.</p><blockquote>Summary</blockquote><p>Image processing algorithms transform images in many ways, such as sharpening, smoothing, filtering, enhancing, restoration, blurring, and so on. Computer vision, on the other hand, focuses on making sense of what the machines see. A computer vision system inputs an image and outputs images based on some specific task, such as object labels and coordinates. Both of them work together in many cases; in fact, many computer vision systems rely on image processing algorithms. Image processing involves processing raw input images and enhancing them, or preparing them to do some specific tasks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb36ab63ef84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A QUESTION ENTAILMENT APPROACH TO QUESTION ANSWERING]]></title>
            <link>https://medium.com/@nourhanmagdy1/a-question-entailment-approach-to-question-answering-7d86d65d767c?source=rss-d89c7336e197------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d86d65d767c</guid>
            <dc:creator><![CDATA[Nourhan Abdelkerim]]></dc:creator>
            <pubDate>Wed, 15 Jun 2022 20:09:25 GMT</pubDate>
            <atom:updated>2022-06-15T20:12:44.841Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Background and objective</strong></blockquote><p>One of the challenges in large-scale information retrieval (IR) is to develop domain-specific methods to answer natural language questions. That is when users try to search online for an answer to their question they struggle to navigate through many links and web pages to find a complete sufficient answer. Despite the availability of numerous sources and datasets for answer retrieval, Question Answering (QA) remains a challenging problem due to the difficulty of the question understanding and answer extraction tasks when tackling domain-specific searches. This is due to several factors, such as the lexical and semantic challenges of domain-specific data that often include advanced argumentation and complex contextual information, the higher sparseness of relevant information sources, and the more pronounced lack of similarities between users’ searches. The objective of the project is to help in building a system to answer questions based on Recognizing Question Entailment (RQE). This system retrieves answers to a premise question by retrieving entailed questions that already have associated answers. Therefore, the entailment relation between two questions is defined as question A entails question B if every answer to B is also a correct answer to A. Our main task is to provide solutions to improve the performance of the Question Answering task. By building a model to measure the entailment score between two questions, will improve the performance by retrieving questions with the highest similarity to the proposed one. The second contribution is a model that can predict the type of the question, It can improve the performance by comparing the proposed question only with questions of the same type, this will reduce the run time and make the Question Answering system faster and provide better results. To accomplish this task we will use two datasets the first one is MedQuAD dataset and the second one is the dataset retrieved from the evaluation of LiveQAMed2017-TestQuestions Dataset.</p><blockquote><strong>Now we will talk about the main two-question should be answered by the two datasets we have</strong></blockquote><p>1. <strong>Regression Question</strong></p><p>What is the entailment score between the two questions? This will help the question answering system to decide which question is similar to the proposed one and retrieve its answer.</p><p>2. <strong>Predictive Question</strong></p><p>Can we predict any characteristics of the user question like question type? this can help the question answering system to provide a better answer which is related to the type of the question by filtering the dataset so that the model finds the entailment within a smaller size of the dataset.</p><blockquote><strong>Dataset</strong></blockquote><ol><li><strong>MedQuAD Dataset</strong></li></ol><p><em>Train Data</em></p><p>The first dataset is MedQuAD. MedQuAD includes 47,457 medical question-answer pairs created from 12 NIH (National Institutes of Health) websites. The collection covers 37 question types (e.g. Treatment, Diagnosis, Side Effects). Data was crawled from websites from the National Institutes of Health7. Each web page describes a specific topic (e.g. name of a disease or a drug). Hand-crafted patterns were constructed for each website to automatically generate the question-answer pairs based on the document structure and the section titles. To provide additional information about the questions that could be used for diverse IR and NLP tasks, the questions were automatically annotated with Semantic Type.</p><p><em>Test Data</em></p><p>The test set is generated from the same dataset (MedQuAD Dataset), we may split the dataset into train and test and use the trainset to learn the model and the test set for evaluation.</p><p>2. <strong>LiveQAMed2017-TestQuestions Dataset</strong></p><p><em>Train Data</em></p><p>The second dataset is extracted from the manual evaluation of the results for the test set (TREC-2017- LiveQA-Medical-Test). To create this dataset, the test questions of the medical task at TREC-2017 LiveQA were passed to a model that can measure the entailment degree between two questions (questions from this test set and questions from the MedQuAD Dataset) and then retrieve the answers of the top 10 candidates. Then an interface to perform the manual evaluation of the retrieved answers was developed. The evaluation was done by 3 assessors: a medical doctor, a medical librarian, and a researcher in medical informatics. They gave a score for each answer from 1 to 4 where Excellent Answer takes rank 4, Correct but Incomplete takes rank 3, Incorrect but Related takes rank 2, and Incorrect takes rank 1. Then these scores are used to tell the entailment degree between the questions. Medical questions at TREC-2017 LiveQA are randomly selected from the consumer health questions that the NLM receives daily from all over the world. The test questions cover different medical entities and have a wide list of question types such as Comparison, Diagnosis, Ingredient, Side effects, and Tapering.</p><p><em>Test Data</em></p><p>To generate a test set LiveQAMed2017-TestQuestions Dataset is split into two parts: 70% for train and 30% for test.</p><blockquote><strong>Data Preprocessing</strong></blockquote><p>Data preprocessing is an essential step in building a Machine Learning model and depending on how well the data has been preprocessed, the results are seen. At the first we removed punctuation like (.,!*”@’) by selecting a pattern of the text that we want and neglecting others then converting all characters to lowercase. In the second step, we removed stopwords from the text by NLTK library as they don’t add any value to the analysis like [’am’, ’is’, ’are’, ’does’, ’has’, ’not’, ’or’ and etc.]. Based on the medical dataset we selected some stopwords and did not remove them like [’who’, ’what’, ’when’, ’why’, ’how’, ’which’, ’where’, ’whom’] because they make a difference in the meaning of the medical questions. We applied lemmatizing or diminished text to the root form and makes sure that it doesn’t lose its meaning by WordNetLemmatizer. After all the text processing steps are performed, the final acquired data is converted into the numeric form using the TF-IDF transformer, which we applied during the pipeline of the model.</p><blockquote><strong>Basic Statistics of the Dataset</strong></blockquote><ol><li>Both datasets have no missing values.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*yQt55-JkIYDp1ujBsLzz8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*utvMhzidgGubZDR5PwREnw.png" /><figcaption>Statistics summary of MedQuAD dataset</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYL-JNNE0rctHQH4LEvSYg.png" /><figcaption>Statistics summary of Pair questions categorical dataset</figcaption></figure><blockquote><strong>Answer to the research questions</strong></blockquote><ol><li>Answer to question #1: Regression Question</li></ol><p>To find the entailment score between two questions we used a feature-based approach in which we extract features from the input questions and feed them to a linear regression model. The first step is to compute six similarity measures between the pre-processed questions and use their values as features. We use Word Overlap, the Dice coefficient based on the number of common bigrams, Cosine, Levenshtein, Jaro Winkler, and the Jaccard similarities. Our feature list also includes the maximum and average values obtained with these measures and the question length ratio (length(PQ)/length(HQ)). Using LiveQAMed2017- TestQuestions Dataset after splitting it to train and test set with 30% for the test set we got the results in a table(2). To improve the model performance we tried different approaches: we tried to use polynomial</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*rf3PF3s60TG4a6hkVCPbOQ.png" /><figcaption>Liner regression score</figcaption></figure><p>regression and replacing the proposed question with the scientific paraphrasing of it. To tune the degree hyper-parameter for the polynomial regression we used grid search and the best model was at degree = 2.</p><p>Then using the polynomial regression model with the scientific question we got the best result for far. you can find the full compression for all trials in a table(3). Using the polynomial features the Mean square error</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMSOOk6uB4iUNsYA_ix0tw.png" /><figcaption>Regression Evaluation scores</figcaption></figure><p>decreased significantly which means more errors are now less than one which means better performance. Regarding using scientific questions the model shows great performance which means if users ask a question using clinical words it’s more likely to get better answers.</p><p>2. Answer to question #3: Predictive Question</p><p>We used the MedQuAD dataset with Questions and question-type columns as inputs. Firstly, we applied Label Encoder preprocessing to the qtype column. For the Questions column, after preprocessing, we applied Tfidf Transformer and CountVectorizer methods. All of these methods are considered in the pipeline. Then we split the dataset by using the train test Split method with 70 percent for the training dataset and 30 percent for the testing dataset. Then we created a support vector machine and logistic regression models with the OneVsRest classifier. This classifier can be used to use a binary classifier like Logistic Regression for multi-class classification. We set C=1, penalty= l1 and solver= liblinear for logistic regression’s hyperparameters and C= 1, gamma= 1, kernel=sigmoid for support vector machine model.</p><p>We evaluated the LogisticRegression model. Firstly, the area under the curve score is 0.99, which means that the model has the best performance for classification.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MiZXe3Qmx_N7TPpY1VVvwA.png" /><figcaption>Logistic Regression evaluation scores</figcaption></figure><p>Then evaluated the SVC model by also AUC = 0.99, so the two models have the same accuracy which means that the dataset is very suitable to predict the question type. So many of these models can help the question system to provide a better answer easily which is related to the question type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cie1dl8s-QaLKn9jZodYOQ.png" /><figcaption>SVC evaluation scores</figcaption></figure><blockquote><strong>Limitations</strong></blockquote><ol><li>For paired questions dataset, during exploration we found data is imbalanced, so we tried to oversample it by resampling library. After oversampling we found the MSE increased. We found that the resample is not a good idea with regression tasks.</li><li>The second thing we found the data contains duplicate pairs of questions but they have different ranks, so we tried to replace these ranks with another value of rank indicates to both of them and then drop duplicates. After replacing ranks we found the model’s performance is increased more than before.</li><li>Our dataset contains three columns of questions, first one is a hypothesis question, the second is a normal question asked by people has no medical background but the third is a scientific question. So we used the third column to measure what will happen to the performance if the asked questions were scientific, not normal. After that, we found the performance is being great.</li></ol><blockquote><strong>Take-away messages</strong></blockquote><ol><li>The ratio of treatment questions in the training dataset is the same as the ratio in the test set.</li><li>Logistic regression achieved high and very sufficient accuracy.</li><li>The question entailment model achieved moderate results and needs more work.</li><li>If users ask questions using clinical words it’s more likely to find a better answer.</li><li>This project needs large-scale datasets instead of the available size of paired question data.</li><li>Need some medical knowledge.</li><li>According to the time limitation we couldn’t apply the huge change in deep learning model hyperparameters to paired question problem, as we searched and according to the papers that we read the Siamese Network Text Similarity model is perfect to fit this problem, and according to the results that we achieved deep learning model achieved higher performance than machine learning models, so we suggest to dive more inside it in the future. We couldn’t have a chance to talk about it in this report cause of slides limit.</li></ol><blockquote><strong>You can check the full notebook here:</strong></blockquote><p><a href="https://github.com/nourhanmagdy1/Recognizing-Questions-Entailment-RQE-/blob/main/Final_Notebook_G20_RQE_machine%26deep.ipynb">https://github.com/nourhanmagdy1/Recognizing-Questions-Entailment-RQE-/blob/main/Final_Notebook_G20_RQE_machine%26deep.ipynb</a></p><blockquote><strong>REFERENCES</strong></blockquote><p><a href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-019-3119-4">https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-019-3119-4</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d86d65d767c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>