<?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 Soukaina Alaoui on Medium]]></title>
        <description><![CDATA[Stories by Soukaina Alaoui on Medium]]></description>
        <link>https://medium.com/@soukaina.?source=rss-db1a4ed07f14------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*3G1WCkYToSBtKrv2mIza8Q.png</url>
            <title>Stories by Soukaina Alaoui on Medium</title>
            <link>https://medium.com/@soukaina.?source=rss-db1a4ed07f14------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 02:33:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@soukaina./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[Artificial Superintelligence: The Future of Intelligence and Humanity]]></title>
            <link>https://medium.com/@soukaina./artificial-superintelligence-the-future-of-intelligence-and-humanity-13aa9c537fc4?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/13aa9c537fc4</guid>
            <category><![CDATA[superintelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Sat, 17 Oct 2026 01:56:56 GMT</pubDate>
            <atom:updated>2026-10-17T01:56:56.059Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Imagine a machine capable of discovering new medicines, solving scientific problems that have challenged humanity for centuries, designing revolutionary technologies, and finding solutions to global challenges faster than the best human experts. Now imagine that this machine could perform these tasks across almost every field of knowledge. This is the idea behind <strong>Artificial Superintelligence (ASI)</strong>, one of the most fascinating and controversial concepts in artificial intelligence.</p><p>Superintelligence refers to a hypothetical level of intelligence at which a machine surpasses human cognitive abilities across virtually all intellectual domains. Unlike today’s AI systems, which can perform impressive tasks but still have significant limitations, a superintelligent system would potentially outperform the most capable humans in scientific reasoning, creativity, strategic planning, and problem-solving. However, superintelligence remains a theoretical concept, and researchers disagree about whether it will emerge and when it might happen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c9x9m_H8YIapYTzw4Ggivw.png" /></figure><h3>From Artificial Intelligence to Superintelligence</h3><p>To understand superintelligence, it is helpful to distinguish three commonly discussed levels of artificial intelligence.</p><p>The first is <strong>Artificial Narrow Intelligence (ANI)</strong>, which describes systems designed to perform particular tasks. Examples include facial recognition, recommendation systems, translation software, and programs that detect diseases in medical images. These systems can outperform humans in specific activities without possessing general human-level intelligence.</p><p>The second is <strong>Artificial General Intelligence (AGI)</strong>, a hypothetical or debated level of AI that could learn, reason, and perform a broad range of intellectual tasks at a level comparable to humans. There is no universally accepted definition or test for AGI, and whether existing systems meet any proposed definition remains disputed.</p><p>The third is <strong>Artificial Superintelligence (ASI)</strong>, which goes beyond human-level capabilities. Such a system would not simply imitate human intelligence or perform calculations more quickly. It could potentially discover new scientific principles, develop original strategies, and solve problems that humans cannot solve independently.</p><p>The distinction is important because computational speed alone does not equal intelligence. Superintelligence would involve exceptional capabilities across a wide range of intellectual tasks.</p><h3>How Could Superintelligence Be Developed?</h3><p>There is no established method for building artificial superintelligence, but researchers study several possible pathways.</p><p>One approach involves developing more capable machine-learning systems trained on increasingly diverse data. Advances in neural networks, reasoning, memory, and the ability to use tools could allow AI systems to handle increasingly complex tasks.</p><p>Another possibility involves <strong>recursive self-improvement</strong>. In this hypothetical scenario, an AI system could help researchers improve its own architecture, algorithms, or training methods. If each improvement enabled the system to make further improvements more effectively, its capabilities might grow rapidly. However, whether such a process could produce an uncontrolled or extremely rapid increase in intelligence remains uncertain.</p><p>Researchers are also exploring AI agents that can plan, use software tools, conduct experiments, and complete multistep tasks with less direct human supervision. Combined with advances in computing hardware and scientific automation, these capabilities could accelerate technological development.</p><p>Nevertheless, greater computing power and better performance do not automatically guarantee superintelligence. Important questions remain about reasoning, reliability, generalization, and whether systems can operate effectively in unfamiliar situations.</p><h3>Potential Benefits of Superintelligence</h3><p>If developed successfully and used responsibly, superintelligence could offer extraordinary benefits.</p><p>In medicine, it could help researchers understand complex biological processes, identify promising treatments, and accelerate the development of drugs for diseases that remain difficult to treat. It might also support more personalized healthcare by analyzing large amounts of medical and genetic information.</p><p>In science, superintelligent systems could help discover new materials, improve energy storage, develop cleaner energy technologies, and investigate fundamental questions about the universe. Their ability to analyze enormous datasets and explore many hypotheses could transform scientific research.</p><p>Superintelligence could also contribute to addressing climate change by improving energy systems, optimizing industrial processes, and developing more efficient approaches to agriculture and resource management.</p><p>In education, advanced systems might provide personalized instruction adapted to each student’s needs, learning pace, and interests. In engineering, they could help design safer transportation systems, more efficient buildings, and innovative technologies.</p><p>These possibilities are promising, but they are potential outcomes rather than guaranteed achievements. Their realization would depend on technical progress, access to resources, responsible deployment, and human decision-making.</p><h3>Risks and Ethical Challenges</h3><p>Despite its potential benefits, superintelligence raises serious concerns.</p><p>One major challenge is <strong>the alignment problem</strong>: how can developers ensure that a highly capable AI system consistently acts in accordance with human intentions, values, and safety requirements?</p><p>A system might pursue a specified objective in an unexpected way if the objective fails to capture what humans actually want. For example, an automated system instructed to maximize productivity might prioritize output while neglecting worker safety or environmental protection. The problem could become more serious if a future system had extensive autonomy and access to important infrastructure.</p><p>Another concern is the concentration of power. If only a small number of companies or governments controlled extremely capable AI systems, they could gain disproportionate economic, political, or military influence. Automation might also disrupt employment and increase inequality if the benefits of technological progress were distributed unfairly.</p><p>Security is another important issue. Highly capable systems could potentially be misused to develop cyberattacks, manipulate information, or assist in other harmful activities. Researchers therefore investigate methods for evaluating AI behavior, limiting dangerous capabilities, monitoring system actions, and preventing unauthorized access.</p><p>Finally, some researchers worry about catastrophic scenarios in which a powerful AI system becomes difficult to control. The likelihood of such outcomes is uncertain, and expert opinions differ. Nevertheless, the potential consequences make safety research and responsible governance important topics today.</p><h3>Can We Make Superintelligence Safe?</h3><p>Developing powerful AI systems responsibly requires more than improving their performance. Researchers must also understand their behavior, identify weaknesses, and establish reliable safeguards.</p><p>One important area is interpretability, which seeks to understand how AI systems arrive at their outputs and decisions. Another is robustness: ensuring that systems continue to behave reliably when faced with unfamiliar inputs, unexpected circumstances, or attempts to manipulate them.</p><p>Human oversight, rigorous testing, cybersecurity, and independent evaluations may also help reduce risks. Governments, research institutions, and technology companies can contribute by developing appropriate standards, sharing relevant safety knowledge, and establishing clear accountability for high-impact AI applications.</p><p>International cooperation may be particularly important because the development and consequences of advanced AI will not be limited to one country.</p><p>However, no single technique can guarantee that a future superintelligent system will be safe. Researchers must continue studying the technical, social, economic, and ethical dimensions of the problem.</p><h3>Conclusion</h3><p>Artificial Superintelligence represents a possible future in which machines surpass human intellectual capabilities across nearly every domain. It could transform medicine, science, education, engineering, and many other fields, potentially helping humanity solve problems that currently seem impossible.</p><p>At the same time, it raises fundamental questions about control, responsibility, equality, and the future relationship between humans and intelligent machines.</p><p>The central challenge is not simply to build systems that are more intelligent than humans. It is to ensure that increasingly powerful technologies remain reliable, secure, and beneficial to society.</p><p>Whether superintelligence becomes a reality, and how soon it might emerge, remain open questions. What is already clear is that studying its possibilities and risks can help us make better decisions about the AI technologies we develop today.</p><p>Ultimately, the future of superintelligence will depend not only on what machines become capable of doing, but also on the choices humans make about how those capabilities should be used.</p><h3>References:</h3><ul><li>Nature, <a href="https://www.nature.com/articles/d41586-026-03198-6?utm_source=chatgpt.com">The science of superintelligence and why AI is still a useful word</a>, published October 7, 2026. Explains the distinction between today’s AI and hypothetical superintelligence.</li><li>IBM, <a href="https://www.ibm.com/think/topics/artificial-superintelligence?utm_source=chatgpt.com">What is artificial superintelligence?</a>, an introduction to ASI and its potential benefits and risks.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13aa9c537fc4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Green AI: Rethinking Artificial Intelligence in an Age of Efficiency]]></title>
            <link>https://medium.com/@soukaina./green-ai-rethinking-artificial-intelligence-in-an-age-of-efficiency-e59fb76dce26?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/e59fb76dce26</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 15:43:12 GMT</pubDate>
            <atom:updated>2026-06-30T15:43:12.374Z</atom:updated>
            <content:encoded><![CDATA[<p>Artificial Intelligence (AI) has become the driving force behind some of the most transformative technologies of our time, powering self-driving cars, medical imaging, speech recognition, personalized recommendations, and advanced language models. These innovations have revolutionized industries and changed how people interact with technology every day.</p><p>However, behind these remarkable achievements lies a growing challenge. Developing and training today’s most advanced AI models requires enormous amounts of computational power, electricity, specialized hardware, and financial investment. As AI systems continue to grow in size and complexity, so does their environmental and economic impact.</p><p>This raises an important question: <strong>Do we really need increasingly larger and more computationally intensive AI models to achieve innovation, or can we build AI systems that are equally effective while using fewer resources?</strong></p><p>This question has given rise to <strong>Green AI</strong>, an approach to artificial intelligence that emphasizes computational efficiency, lower energy consumption, reduced environmental impact, and accessible AI development alongside high model performance. Rather than measuring success solely by improvements in accuracy, Green AI encourages researchers and organizations to also consider the computational cost, energy requirements, carbon emissions, and financial expense of developing AI systems.</p><p>The concept gained widespread attention through the 2020 paper <em>Green AI</em> by Roy Schwartz and colleagues, which argued that AI research should report computational cost alongside traditional performance metrics. Since then, Green AI has become an increasingly important research direction as governments, companies, and researchers seek more sustainable ways to advance artificial intelligence.</p><p>In this article, we explore the five key pillars of Green AI, examine real-world examples of efficient AI technologies, and discuss why sustainable AI development is becoming essential for the future of both technology and society.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*j1JjEvBYTgHo4H5EDD4xlg.png" /></figure><h3>1. Energy Efficiency</h3><p>One of the primary goals of Green AI is reducing the amount of energy required to train and deploy machine learning models.</p><p>Training state-of-the-art AI models can consume vast amounts of electricity, particularly when thousands of GPUs operate continuously for weeks or months. Early studies estimated that training certain large natural language processing models could produce carbon emissions comparable to the lifetime emissions of several passenger vehicles. Although newer hardware and renewable powered data centers have reduced these impacts, energy consumption remains a major concern.</p><p>Green AI promotes several approaches to improve energy efficiency:</p><ul><li>Developing algorithms that converge faster during training.</li><li>Designing hardware optimized for AI workloads with lower power consumption.</li><li>Using renewable energy sources to power AI data centers.</li><li>Optimizing software to reduce unnecessary computations.</li></ul><p>Many technology companies are already investing in greener infrastructure. Google has significantly improved the energy efficiency of its data centers and uses AI systems developed by DeepMind to optimize cooling, reducing energy required for data center operations. Researchers are also designing energy aware neural network architectures that maximize <strong>accuracy per watt</strong>, rather than accuracy alone.</p><p>The goal is not to slow AI innovation but to ensure that future advances are achieved sustainably.</p><h3>2. Cost Awareness</h3><p>Modern AI development has become increasingly expensive. Training a frontier AI model can require millions of dollars in computing resources, making cutting edge research accessible primarily to large technology companies with substantial financial resources.</p><p>Green AI encourages researchers to develop methods that reduce computational costs while maintaining strong performance.</p><p>These techniques include:</p><ul><li>Parameter sharing, where multiple parts of a model reuse the same parameters.</li><li>Pruning, which removes unnecessary neural network connections after training.</li><li>Quantization, which reduces the numerical precision of model parameters to decrease memory usage and computation.</li><li>Knowledge distillation, where a smaller model learns from a larger, more complex model.</li></ul><p>A well-known example is <strong>DistilBERT</strong>, a compressed version of BERT that retains most of the original model’s performance while requiring significantly fewer parameters, less memory, and faster inference.</p><p>Reducing computational costs democratizes AI research by allowing universities, startups, and independent researchers to participate without requiring massive computing budgets.</p><h3>3. Experimental Efficiency</h3><p>AI research often involves running hundreds or even thousands of experiments to identify the best model architecture or hyperparameters. While experimentation is essential, excessive trial-and-error can waste substantial computational resources, electricity, and researcher time.</p><p>Green AI promotes smarter experimentation by encouraging researchers to:</p><ul><li>Track experiments carefully to avoid repeating failed configurations.</li><li>Use efficient hyperparameter optimization methods, such as Bayesian optimization.</li><li>Apply transfer learning instead of training models entirely from scratch.</li><li>Use early stopping techniques to terminate unpromising experiments.</li><li>Share pretrained models and datasets with the research community.</li></ul><p>Rather than repeatedly reinventing existing models, researchers can build upon previous work, reducing both environmental impact and development time.</p><p>This philosophy can be summarized as <strong>“work smarter, not harder.”</strong></p><h3>4. Environmental Sustainability</h3><p>Beyond reducing energy consumption, Green AI emphasizes understanding and reporting the overall environmental impact of AI systems.</p><p>Historically, AI research has focused almost exclusively on metrics such as accuracy, precision, recall, or benchmark scores. Green AI argues that environmental metrics should also become standard components of AI evaluation.</p><p>These may include:</p><ul><li>Total energy consumed during training.</li><li>Carbon emissions generated.</li><li>Source of electricity used.</li><li>Hardware efficiency.</li><li>Lifetime energy consumption during deployment.</li></ul><p>Imagine reading an AI research paper that reports not only a model’s accuracy but also its carbon footprint. Such transparency would encourage researchers and organizations to develop models that achieve strong performance with lower environmental costs.</p><p>Just as modern vehicles are evaluated using fuel-efficiency ratings, future AI systems may also be compared using standardized measures of energy efficiency.</p><h3>5. Equity and Accessibility</h3><p>Green AI is not only about protecting the environment it is also about making artificial intelligence more accessible.</p><p>If state-of-the-art AI remains dependent on billion-dollar computing infrastructure, many researchers, educational institutions, hospitals, and organizations in lower resource settings will struggle to participate in AI innovation.</p><p>Efficient AI models can run on laptops, smartphones, embedded systems, and low cost edge devices, making advanced technology available to a much wider audience.</p><p>This enables:</p><ul><li>Researchers in developing countries to contribute meaningfully to AI research.</li><li>Hospitals with limited computing resources to deploy AI-assisted diagnostics.</li><li>Schools and universities to use AI for education without expensive infrastructure.</li><li>Small businesses to adopt AI solutions that were previously unaffordable.</li></ul><p>Accessibility is an important aspect of fairness. Green AI seeks to ensure that the benefits of artificial intelligence are shared broadly rather than concentrated among a small number of organizations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*EEoPCrOoM3M9jx7ELbhXAw.png" /></figure><h3>Beyond “Bigger Is Better”</h3><p>For many years, progress in AI has largely been associated with larger datasets, bigger neural networks, and more powerful hardware. While scaling has undoubtedly produced impressive results, Green AI encourages a different perspective: innovation through efficiency.</p><p>Several technologies demonstrate that high performance does not always require enormous models:</p><ul><li><strong>TinyML</strong>, which enables machine learning models to run on microcontrollers consuming only milliwatts of power.</li><li><strong>EfficientNet</strong>, which achieves excellent image recognition accuracy with significantly fewer parameters than many larger convolutional neural networks.</li><li><strong>Federated Learning</strong>, where models are trained collaboratively across multiple devices without centralizing sensitive user data, reducing communication costs while improving privacy.</li></ul><p>These examples illustrate that intelligent design and efficient algorithms can often achieve results comparable to much larger systems.</p><h3>Balancing Efficiency and Performance</h3><p>Although Green AI offers many benefits, it is important to recognize that efficiency is not always the only objective.</p><p>Some scientific applications including climate modeling, drug discovery, astronomical research, and the development of frontier foundation models may require extremely large computational resources to achieve breakthroughs.</p><p>Green AI does not argue against ambitious AI research. Instead, it encourages researchers to carefully evaluate whether additional computational cost is justified by meaningful improvements in performance and societal benefit.</p><p>The goal is to maximize both innovation and sustainability rather than treating them as competing priorities.</p><h3>Why Green AI Matters</h3><p>Artificial intelligence is becoming deeply integrated into healthcare, transportation, finance, education, manufacturing, and scientific research. As AI adoption continues to accelerate, the energy consumed by AI systems and the resources required to develop them will also increase.</p><p>Green AI provides a framework for balancing technological progress with environmental responsibility, economic efficiency, and social inclusion.</p><p>By designing models that consume less energy, require fewer computational resources, and remain accessible to a broader community, Green AI supports a future where innovation benefits not only a handful of technology companies but society as a whole.</p><h3>Final Thoughts</h3><p>Throughout the history of technology, lasting progress has often come not from making systems simply larger, but from making them smarter and more efficient. Cars became more fuel efficient, computers became smaller and faster, and smartphones became increasingly powerful while consuming less energy.</p><p>Artificial intelligence is now entering a similar phase.</p><p>The future of AI will not be defined solely by the size of its models or the number of GPUs used to train them. Instead, it will increasingly depend on how intelligently we use computational resources, how responsibly we manage environmental impacts, and how broadly we make AI accessible to people around the world.</p><p>Green AI reminds us that technological excellence is not measured only by accuracy or scale, but also by sustainability, efficiency, fairness, and long-term societal impact.</p><p>The question is no longer <strong>“How big can our models become?”</strong></p><p>Instead, we should ask:</p><p><strong><em>“How intelligent, sustainable, efficient, and accessible can we make artificial intelligence for everyone?”</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e59fb76dce26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sentiment Analysis Using Large Language Models: A Real World NLP Application]]></title>
            <link>https://medium.com/@soukaina./sentiment-analysis-using-large-language-models-a-real-world-nlp-application-7c3aa3a922f4?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c3aa3a922f4</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Thu, 25 Jun 2026 18:08:04 GMT</pubDate>
            <atom:updated>2026-06-25T18:08:04.966Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgeiGhj8yOlLiT2KM2Gvtw.png" /></figure><h3>Introduction</h3><p>In today’s digital era, people continuously express their opinions, emotions, and experiences through online platforms such as social media, e-commerce websites, blogs, forums, and review portals. Every day, billions of text messages, comments, product reviews, tweets, and customer feedback reports are generated worldwide. This vast amount of textual information contains valuable insights about public opinion, customer satisfaction, market trends, and social behavior. However, manually analyzing such enormous volumes of data is impractical and time consuming. Consequently, organizations increasingly rely on automated Natural Language Processing (NLP) techniques to extract meaningful information from textual data.</p><p>Sentiment Analysis, also known as Opinion Mining, is one of the most widely used applications of NLP. It focuses on identifying and categorizing opinions expressed in text to determine whether they convey positive, negative, or neutral sentiment. Beyond simple polarity classification, modern sentiment analysis systems can detect emotions, attitudes, preferences, and intentions hidden within language. The ability to understand human sentiment at scale provides organizations with a powerful tool for decision making, customer relationship management, brand monitoring, and strategic planning.</p><p>The rapid development of Large Language Models (LLMs) has dramatically improved the effectiveness of sentiment analysis systems. Unlike traditional machine learning methods that depend heavily on manually engineered features and sentiment lexicons, LLMs learn language patterns directly from massive datasets containing books, websites, articles, and online discussions. Through this extensive training process, they acquire a sophisticated understanding of grammar, semantics, context, and human communication. As a result, LLMs can accurately interpret complex expressions, sarcasm, ambiguous statements, and context dependent opinions that often challenge conventional approaches.</p><p>Today, sentiment analysis powered by Large Language Models plays a critical role in numerous industries, including e-commerce, healthcare, education, finance, entertainment, politics, and customer service. Organizations use these systems to gain deeper insights into customer behavior, monitor public opinion, predict market movements, and improve the quality of their products and services. As artificial intelligence continues to evolve, LLM based sentiment analysis is becoming an increasingly valuable component of modern data driven decision making systems.</p><h3>Evolution of Sentiment Analysis</h3><p>The field of sentiment analysis has undergone significant transformations over the past two decades. Early approaches were relatively simple and relied on manually constructed dictionaries of positive and negative words. These rule based systems operated under the assumption that the presence of specific keywords directly indicated sentiment. For example, words such as “excellent,” “wonderful,” and “fantastic” were classified as positive, whereas words such as “poor,” “terrible,” and “disappointing” were categorized as negative.</p><p>Although these methods were easy to implement and interpret, they suffered from several limitations. Human language is highly complex and context dependent. A word that expresses positive sentiment in one situation may convey a completely different meaning in another. Rule based systems often failed to understand nuances such as sarcasm, irony, negation, and contextual relationships between words. Consequently, their performance was often inadequate for real world applications involving complex language.</p><p>The introduction of machine learning techniques marked a significant advancement in sentiment analysis. Researchers began training models using labeled datasets containing examples of positive and negative text. Algorithms such as Naive Bayes, Support Vector Machines, Logistic Regression, and Random Forests learned statistical patterns associated with different sentiment classes. These approaches improved classification accuracy and reduced reliance on manually crafted rules. However, they still depended heavily on feature engineering techniques such as Bag-of-Words and TF-IDF representations, which often failed to capture deeper semantic relationships within text.</p><p>The emergence of deep learning revolutionized NLP and sentiment analysis. Neural network architectures such as Recurrent Neural Networks (RNNs) and Long Short-Term Memory Networks (LSTMs) enabled models to process sequential information and capture contextual dependencies between words. Nevertheless, these models faced challenges when dealing with long texts and complex linguistic structures.</p><p>A major breakthrough occurred with the introduction of the Transformer architecture. Transformers use self attention mechanisms that allow models to analyze relationships between all words in a sentence simultaneously. This innovation significantly improved contextual understanding and enabled the development of Large Language Models. Modern LLMs such as GPT, BERT, RoBERTa, and LLaMA have transformed sentiment analysis by providing unprecedented levels of language comprehension and predictive accuracy.</p><h3>Role of Large Language Models in Sentiment Analysis</h3><p>Large Language Models represent a new generation of AI systems capable of understanding and generating human language with remarkable sophistication. These models are trained on enormous datasets containing diverse textual content from multiple domains. During training, they learn statistical relationships between words, phrases, and concepts, enabling them to develop a rich representation of language.</p><p>In sentiment analysis, LLMs examine textual input and identify patterns that indicate emotional tone and subjective meaning. Rather than focusing solely on individual words, they analyze the broader context in which those words appear. This contextual understanding allows them to distinguish subtle differences in meaning and accurately interpret complex opinions.</p><p>For example, consider the statement:</p><p>“The smartphone’s display is outstanding, but its battery performance is disappointing.”</p><p>A traditional sentiment classifier might struggle to determine the overall sentiment because both positive and negative expressions appear in the same sentence. An LLM can recognize that the review contains positive sentiment regarding the display and negative sentiment regarding battery performance. This capability is particularly valuable in aspect based sentiment analysis, where organizations seek detailed insights into specific product features.</p><p>Another significant advantage of LLMs is their ability to understand indirect expressions of sentiment. Human communication often involves implied meanings rather than explicit statements. A customer who writes, “I expected much better from a company of this reputation,” may never use overtly negative words, yet the sentiment is clearly unfavorable. Large Language Models can infer such implicit opinions through contextual reasoning and semantic understanding.</p><p>Furthermore, LLMs excel at handling long documents, multiple sentiment targets, and conversational interactions. Their ability to process extensive context makes them highly effective for analyzing customer reviews, social media discussions, support tickets, survey responses, and other forms of unstructured textual data.</p><h3>Real World Applications</h3><p>The practical applications of sentiment analysis powered by Large Language Models are extensive and continue to expand across industries. In e-commerce, companies analyze customer reviews to identify strengths and weaknesses in their products. By examining thousands of reviews simultaneously, organizations can detect recurring issues, measure customer satisfaction, and prioritize product improvements. Sentiment analysis also helps businesses understand consumer preferences and develop more effective marketing strategies.</p><p>Social media platforms provide another important application area. Millions of users express their opinions about brands, products, events, and public figures every day. Organizations use LLM based sentiment analysis to monitor public perception in real time. This information allows businesses to respond quickly to emerging concerns, evaluate advertising campaigns, and maintain a positive brand image.</p><p>In healthcare, sentiment analysis supports patient centered care by analyzing patient feedback, online reviews, and health related discussions. Hospitals and healthcare providers can identify areas requiring improvement and better understand patient experiences. Researchers also use sentiment analysis to study mental health indicators in social media posts and online communities.</p><p>Financial institutions increasingly employ sentiment analysis to evaluate market sentiment. Investors analyze news articles, earnings reports, analyst opinions, and social media discussions to assess public confidence in companies and financial markets. Changes in sentiment can influence stock prices and investment decisions, making sentiment analysis a valuable tool for financial forecasting and risk management.</p><p>Educational institutions use sentiment analysis to evaluate student feedback and improve learning experiences. By analyzing course evaluations, discussion forums, and survey responses, educators can identify common challenges faced by students and implement targeted improvements. Similarly, governments and public organizations utilize sentiment analysis to understand citizen opinions regarding policies, social programs, and political events.</p><h3>Benefits of Large Language Models in Sentiment Analysis</h3><p>The adoption of Large Language Models has significantly enhanced the capabilities of sentiment analysis systems. One of the most important advantages is improved contextual understanding. Unlike traditional models that rely heavily on keywords, LLMs consider the surrounding context when interpreting sentiment. This ability reduces misclassification errors and improves overall accuracy.</p><p>Another major benefit is the capability to detect complex linguistic phenomena such as sarcasm, irony, humor, and figurative language. These forms of expression often present challenges for conventional systems because the literal meaning of words differs from the intended message. LLMs can recognize subtle contextual cues and provide more accurate sentiment interpretations.</p><p>Multilingual support represents another significant advantage. Many modern LLMs are trained on multilingual datasets and can perform sentiment analysis across numerous languages. This capability enables multinational organizations to analyze customer opinions from diverse regions without developing separate models for each language.</p><p>Scalability is also a critical strength. LLM based systems can process millions of documents efficiently, making them suitable for large scale industrial applications. Organizations can analyze customer feedback, social media content, and survey responses in near real time, enabling faster decision making and more responsive business operations.</p><h3>Challenges and Future Directions</h3><p>Despite their impressive capabilities, Large Language Models face several challenges in sentiment analysis. Computational requirements remain a major concern. Training and deploying large models demand substantial processing power, memory, and energy resources. These requirements can increase operational costs and limit accessibility for smaller organizations.</p><p>Bias is another important issue. Since LLMs learn from large datasets collected from the internet, they may inherit social, cultural, or demographic biases present in the training data. Such biases can affect sentiment predictions and lead to unfair or inaccurate outcomes.</p><p>Explainability remains a significant research challenge. While LLMs achieve high accuracy, understanding the reasoning behind their predictions is often difficult. Improving model transparency and interpretability is essential for applications in healthcare, finance, and other high stakes domains.</p><p>Future research aims to address these challenges through techniques such as model compression, knowledge distillation, quantization, retrieval augmented generation, and explainable AI frameworks. Researchers are also exploring multimodal sentiment analysis systems that combine text, images, audio, and video to provide a more comprehensive understanding of human emotions and opinions.</p><h3>Conclusion</h3><p>Sentiment analysis has evolved from simple rule based approaches to sophisticated AI systems powered by Large Language Models. These models have transformed the field by enabling deeper contextual understanding, greater accuracy, and broader applicability across industries. Their ability to interpret complex language, identify subtle emotional cues, and process large volumes of textual data makes them invaluable tools for modern organizations. As research continues to improve the reliability, efficiency, and transparency of LLMs, sentiment analysis will play an increasingly important role in helping businesses, governments, and researchers understand human opinions and make informed decisions in an increasingly data driven world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c3aa3a922f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond Big Data: Building Robust Computer Vision with Limited and Imperfect Data]]></title>
            <link>https://medium.com/@soukaina./beyond-big-data-building-robust-computer-vision-with-limited-and-imperfect-data-5c195845f45f?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c195845f45f</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Tue, 07 Apr 2026 21:38:51 GMT</pubDate>
            <atom:updated>2026-04-08T14:48:52.549Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction: When More Data Is Not the Answer</h3><p>Over the past decade, computer vision has achieved remarkable success, largely driven by deep learning and large-scale datasets. However, this success depends on a critical assumption: <strong>access to abundant, clean, and well-labeled data</strong>.</p><p>In reality, most real-world applications such as healthcare, satellite imagery, and industrial systems operate under <strong>limited and imperfect data conditions</strong>.</p><p>This raises a fundamental question:</p><blockquote><strong><em>Can computer vision systems perform reliably when data is scarce, noisy, or imbalanced?</em></strong></blockquote><p>In our survey, <a href="https://www.researchgate.net/publication/403277864_Learning_to_See_with_Less_A_Survey_on_Computer_Vision_with_Limited_and_Imperfect_Data"><em>Learning to See with Less: A Survey on Computer Vision with Limited and Imperfect Data</em></a>, we explore how the field is evolving to answer this challenge.</p><h3>The Core Problem: Imperfect Data</h3><p>Real-world datasets rarely match academic benchmarks. Instead, they often suffer from:</p><ul><li><strong>Data scarcity</strong> → very few labeled samples</li><li><strong>Noisy labels</strong> → incorrect or ambiguous annotations</li><li><strong>Class imbalance</strong> → uneven distribution across categories</li></ul><p>These issues are often interconnected, creating significant obstacles for learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PKR3FTcQZnTJV8N_hDwslg.png" /></figure><h3>Tackling Imperfect Data: Two Complementary Approaches</h3><p>Our survey organizes existing methods into two main paradigms:</p><h3>Data-Centric Approaches</h3><p>Focus on improving the dataset itself:</p><ul><li>Data augmentation</li><li>Synthetic data generation</li><li>Active learning</li><li>Label cleaning</li></ul><h3>Model-Centric Approaches</h3><p>Focus on adapting models to limited or noisy data:</p><ul><li>Transfer learning</li><li>Few-shot and meta-learning</li><li>Robust loss functions</li><li>Self-supervised learning</li></ul><h3>Learning Without Labels: A Paradigm Shift</h3><p>Recent advancements in <strong>self-supervised learning</strong> and <strong>foundation models</strong> allow AI to:</p><ul><li>Learn from large amounts of <strong>unlabeled data</strong></li><li>Capture <strong>rich, generalizable representations</strong></li><li>Reduce dependence on manual annotations</li></ul><p>These approaches are especially useful in low-data environments, though challenges such as domain adaptation and computational requirements remain.</p><h3>Open Challenges and Future Directions</h3><p>Despite progress, several key challenges remain:</p><ul><li><strong>Generalization under distribution shift</strong></li><li><strong>Robustness to noisy labels</strong></li><li><strong>Fairness and bias due to imbalance</strong></li><li><strong>Balancing model complexity with data efficiency</strong></li></ul><p>Addressing these challenges is critical for building <strong>reliable and inclusive AI systems</strong>.</p><h3>Conclusion: Toward Practical Computer Vision</h3><p>The future of computer vision lies not in bigger models or endless datasets, but in <strong>learning effectively from limited and imperfect data</strong>.</p><p>Our survey provides a roadmap toward:</p><ul><li>More robust models</li><li>Real-world deployment readiness</li><li>Accessible, inclusive AI systems</li></ul><blockquote><em>📄 </em>This article is based on our survey:<em><br> </em>“Learning to See with Less: A Survey on Computer Vision with Limited and Imperfect Data”<em><br> Available on ResearchGate.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c195845f45f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predictive AI vs. Generative AI: Understanding the Key Differences]]></title>
            <link>https://medium.com/@soukaina./predictive-ai-vs-generative-ai-understanding-the-key-differences-6209a16ba6bd?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/6209a16ba6bd</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Fri, 07 Nov 2025 18:06:32 GMT</pubDate>
            <atom:updated>2025-11-07T18:07:44.891Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-r6FRjPUtdIbSEsuenp1jw.png" /></figure><p>Artificial Intelligence (AI) is no longer just a futuristic concept it has become a powerful force shaping the modern world. From personalized streaming recommendations to smart assistants, fraud detection systems, and AI-generated art, intelligent technologies are transforming industries and redefining how humans interact with machines.</p><p>Within this rapidly evolving landscape, two major branches stand out: Predictive AI and Generative AI. Though both rely on machine learning, they serve fundamentally different purposes. Predictive AI helps us anticipate what will happen next, while Generative AI enables machines to create something entirely new.</p><p>Understanding how they differ and how they can work together is essential for anyone curious about the present and future of artificial intelligence.</p><h3>What Is Predictive AI?</h3><p>Predictive AI focuses on using data to forecast future outcomes or classify current situations. It learns from historical patterns and uses that knowledge to make informed predictions about what is likely to happen.</p><p>In simpler terms, Predictive AI answers questions like:</p><ul><li>Will this customer cancel their subscription?</li><li>What will the sales numbers look like next quarter?</li><li>Is this transaction fraudulent or legitimate?</li></ul><h3>How It Works</h3><p>Predictive AI typically deals with structured data numbers, transactions, timestamps, or other measurable information. Using statistical and machine learning algorithms, it identifies relationships between variables and extrapolates those insights to new data.</p><p>Common methods include regression analysis for predicting continuous outcomes, decision trees for classification tasks, and deep neural networks for complex data relationships. Once trained, these models can recognize patterns that would be difficult or impossible for humans to detect manually.</p><h3>Real-World Applications</h3><ul><li>Finance: Forecasting stock movements, detecting fraudulent activity, or assessing credit risks.</li><li>Healthcare: Predicting patient outcomes, identifying early signs of disease, and improving treatment recommendations.</li><li>Marketing: Anticipating customer churn, optimizing ad targeting, and forecasting product demand.</li><li>Everyday technology: From predictive text in your messaging app to recommendation engines on Netflix or Spotify.</li></ul><p>The power of Predictive AI lies in accuracy and foresight. It doesn’t generate new content it helps humans make smarter, data-informed decisions based on what’s most probable.</p><h3>What Is Generative AI?</h3><p>Generative AI marks a new phase in artificial intelligence one where machines move beyond analysis and into creation. Instead of merely predicting what’s next, generative systems produce new text, images, audio, code, and even videos that often appear human-made.</p><p>These models power the wave of creativity behind tools like ChatGPT, DALL·E, Midjourney, and Runway ML.</p><h3>How It Works</h3><p>Generative AI relies heavily on deep learning architectures that can model and reproduce the underlying structure of data. Some of the most influential technologies include:</p><ul><li>Transformers, which understand and generate human language at scale (used in models like GPT and Gemini).</li><li>Generative Adversarial Networks (GANs), which pit two neural networks against each other one generates data while the other evaluates it until the results look convincingly real.</li><li>Variational Autoencoders (VAEs), which learn the essential features of data and generate new examples that share similar properties.</li></ul><p>These models are trained on massive datasets containing billions of examples, allowing them to internalize patterns, syntax, and context. When prompted, they generate entirely new outputs that blend learned information with creativity.</p><h3>Examples of Generative AI in Practice</h3><ul><li>Writing and content creation: Tools like ChatGPT and Jasper produce articles, essays, or even computer code.</li><li>Visual design: DALL·E and Midjourney can create artwork, concept sketches, and product designs from a few words of input.</li><li>Music and film: AI systems can now compose original songs, design soundtracks, and even assist in video editing.</li><li>Product development: Designers use generative algorithms to produce architectural models, clothing prototypes, or mechanical parts optimized for function and form.</li></ul><p>Generative AI’s strength lies in creativity and originality. It doesn’t just interpret the world it imagines new possibilities.</p><h3>Predictive and Generative AI: Different Yet Complementary</h3><p>While Predictive AI and Generative AI differ in purpose, they can work together in powerful ways. In fact, the most innovative AI applications today often blend both approaches to deliver smarter, more adaptable systems.</p><h3>Marketing and Business</h3><p>Predictive AI can identify which customers are most likely to cancel a subscription or disengage from a brand. Generative AI can then craft personalized emails, ads, or offers to retain them combining data-driven insights with creative engagement.</p><h3>Healthcare and Biotechnology</h3><p>Predictive AI helps identify individuals at risk of developing certain diseases based on genetic or lifestyle factors. Generative AI takes it a step further by simulating potential drug molecules or modeling protein structures to accelerate medical discoveries.</p><h3>Manufacturing and Engineering</h3><p>Predictive AI forecasts when equipment is likely to fail, allowing proactive maintenance. Meanwhile, generative design tools propose optimized component shapes and materials to improve performance and efficiency.</p><h3>Education and Learning</h3><p>Predictive AI can analyze a student’s progress to identify knowledge gaps, while generative systems can automatically produce customized exercises, explanations, or even interactive simulations to reinforce learning.</p><p>Together, these systems represent a shift toward intelligent collaboration between analysis and creation where machines can both predict outcomes and design innovative solutions.</p><h3>Why the Distinction Matters</h3><p>As AI becomes embedded in nearly every aspect of life, understanding these two paradigms is critical for responsible innovation.</p><p>Organizations use Predictive AI to improve efficiency, reduce uncertainty, and make informed decisions. They turn to Generative AI to accelerate creativity, automate content production, and explore new ideas at scale.</p><p>Yet both come with challenges. Predictive systems must guard against bias and unfairness, ensuring that decisions based on data don’t reinforce existing inequalities. Generative systems raise concerns about authenticity, misinformation, and intellectual property, as AI-generated content blurs the line between human and machine creativity.</p><p>Knowing the distinction helps policymakers, developers, and everyday users apply the right form of AI in the right context and build trust in how these technologies are deployed.</p><h3>The Future of Intelligence: Where Prediction Meets Creation</h3><p>Artificial intelligence is rapidly evolving from tools that analyze the past to systems that can imagine the future. Predictive AI gives us the ability to anticipate outcomes with precision; Generative AI gives us the creativity to shape what comes next.</p><p>The real transformation will happen at the intersection of the two when predictive insights guide generative imagination. Picture an AI that not only forecasts global climate trends but also designs innovative solutions to mitigate them. Or a system that predicts learning gaps in students and generates personalized educational materials on the spot.</p><p>In this new era, AI won’t just <em>serve</em> humanity it will <em>collaborate</em> with us. Predictive models will guide decisions; generative systems will bring ideas to life. Together, they will empower a world that is both smarter and more creative than ever before.</p><p>The future of AI isn’t just about accuracy or creativity it’s about the seamless blend of both.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6209a16ba6bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Heart Disease Prediction Using Neural Networks in Python]]></title>
            <link>https://medium.com/@soukaina./heart-disease-prediction-using-neural-networks-in-python-77317d665b9c?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/77317d665b9c</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Tue, 28 Oct 2025 04:23:34 GMT</pubDate>
            <atom:updated>2025-10-28T13:36:23.309Z</atom:updated>
            <content:encoded><![CDATA[<p>Heart disease is one of the leading causes of death worldwide. Predicting its presence using patient data can help doctors take preventive actions. In this tutorial, we build a neural network using Python in <strong>Google Colab </strong>and the <strong>Heart Disease UCI dataset:</strong> <a href="https://www.kaggle.com/datasets/redwankarimsony/heart-disease-data?resource=download">https://www.kaggle.com/datasets/redwankarimsony/heart-disease-data?resource=download</a>.</p><p><em>Note: Readers can modify the code (e.g., layers, epochs, learning rate, feature engineering) to potentially improve accuracy and results.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bkDUBTDlKClFJ63FqE8aw.jpeg" /></figure><p><strong>Import Libraries</strong></p><pre>import pandas as pd<br>import numpy as np<br>import matplotlib.pyplot as plt<br>import seaborn as sns<br>from sklearn.model_selection import train_test_split<br>from sklearn.preprocessing import StandardScaler<br>from sklearn.metrics import confusion_matrix, classification_report<br><br>import tensorflow as tf<br>from tensorflow.keras.models import Sequential<br>from tensorflow.keras.layers import Dense, Dropout<br>from tensorflow.keras.utils import to_categorical</pre><p><strong>Load and Explore Dataset</strong></p><pre>from google.colab import drive</pre><pre>drive.mount(&#39;/content/drive&#39;)</pre><p>Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount(“/content/drive”, force_remount=True).</p><pre>data = pd.read_csv(&#39;/content/drive/MyDrive/heart_disease_uci.csv&#39;)</pre><pre>print(data.columns)</pre><pre>Index([&#39;id&#39;, &#39;age&#39;, &#39;sex&#39;, &#39;dataset&#39;, &#39;cp&#39;, &#39;trestbps&#39;, &#39;chol&#39;, &#39;fbs&#39;,<br>       &#39;restecg&#39;, &#39;thalch&#39;, &#39;exang&#39;, &#39;oldpeak&#39;, &#39;slope&#39;, &#39;ca&#39;, &#39;thal&#39;, &#39;num&#39;],<br>      dtype=&#39;object&#39;)</pre><pre>print(data.head())<br>print(data.info())<br>print(data.describe())<br><br>sns.countplot(x=&#39;num&#39;, data=data)<br>plt.title(&quot;Heart Disease Distribution (0 = No disease, 1–4 = Disease)&quot;)<br>plt.show()</pre><pre>    id  age     sex    dataset               cp  trestbps   chol    fbs  \<br>0   1   63    Male  Cleveland   typical angina     145.0  233.0   True   <br>1   2   67    Male  Cleveland     asymptomatic     160.0  286.0  False   <br>2   3   67    Male  Cleveland     asymptomatic     120.0  229.0  False   <br>3   4   37    Male  Cleveland      non-anginal     130.0  250.0  False   <br>4   5   41  Female  Cleveland  atypical angina     130.0  204.0  False</pre><pre>         restecg  thalch  exang  oldpeak        slope   ca  \<br>0  lv hypertrophy   150.0  False      2.3  downsloping  0.0   <br>1  lv hypertrophy   108.0   True      1.5         flat  3.0   <br>2  lv hypertrophy   129.0   True      2.6         flat  2.0   <br>3          normal   187.0  False      3.5  downsloping  0.0   <br>4  lv hypertrophy   172.0  False      1.4    upsloping  0.0   </pre><pre>                thal  num  <br>0       fixed defect    0  <br>1             normal    2  <br>2  reversable defect    1  <br>3             normal    0  <br>4             normal    0  <br>&lt;class &#39;pandas.core.frame.DataFrame&#39;&gt;<br>RangeIndex: 920 entries, 0 to 919<br>Data columns (total 16 columns):<br> #   Column    Non-Null Count  Dtype  <br>---  ------    --------------  -----  <br> 0   id        920 non-null    int64  <br> 1   age       920 non-null    int64  <br> 2   sex       920 non-null    object <br> 3   dataset   920 non-null    object <br> 4   cp        920 non-null    object <br> 5   trestbps  861 non-null    float64<br> 6   chol      890 non-null    float64<br> 7   fbs       830 non-null    object <br> 8   restecg   918 non-null    object <br> 9   thalch    865 non-null    float64<br> 10  exang     865 non-null    object <br> 11  oldpeak   858 non-null    float64<br> 12  slope     611 non-null    object <br> 13  ca        309 non-null    float64<br> 14  thal      434 non-null    object <br> 15  num       920 non-null    int64  <br>dtypes: float64(5), int64(3), object(8)<br>memory usage: 115.1+ KB<br>None<br>               id         age    trestbps        chol      thalch     oldpeak  \<br>count  920.000000  920.000000  861.000000  890.000000  865.000000  858.000000   <br>mean   460.500000   53.510870  132.132404  199.130337  137.545665    0.878788   <br>std    265.725422    9.424685   19.066070  110.780810   25.926276    1.091226   <br>min      1.000000   28.000000    0.000000    0.000000   60.000000   -2.600000   <br>25%    230.750000   47.000000  120.000000  175.000000  120.000000    0.000000   <br>50%    460.500000   54.000000  130.000000  223.000000  140.000000    0.500000   <br>75%    690.250000   60.000000  140.000000  268.000000  157.000000    1.500000   <br>max    920.000000   77.000000  200.000000  603.000000  202.000000    6.200000   </pre><pre>               ca         num  <br>count  309.000000  920.000000  <br>mean     0.676375    0.995652  <br>std      0.935653    1.142693  <br>min      0.000000    0.000000  <br>25%      0.000000    0.000000  <br>50%      0.000000    1.000000  <br>75%      1.000000    2.000000  <br>max      3.000000    4.000000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*T7EBX797eIov0ebLwziTjQ.png" /></figure><p><strong>Observations:</strong></p><ul><li>920 patients, 16 features.</li><li>Target num ranges 0–4. For simplicity, we convert it to binary classification.</li></ul><p><strong>Preprocessing</strong></p><pre># Convert stages 1–4 to 1<br>data[&#39;num&#39;] = data[&#39;num&#39;].apply(lambda x: 0 if x == 0 else 1)<br><br># Fill missing numerical values with median<br>num_cols = [&#39;trestbps&#39;,&#39;chol&#39;,&#39;thalch&#39;,&#39;oldpeak&#39;,&#39;ca&#39;]<br>for col in num_cols:<br>    data[col] = data[col].fillna(data[col].median())<br><br># Fill missing categorical values with mode<br>cat_cols = [&#39;fbs&#39;,&#39;restecg&#39;,&#39;exang&#39;,&#39;slope&#39;,&#39;thal&#39;]<br>for col in cat_cols:<br>    data[col] = data[col].fillna(data[col].mode()[0])<br><br># One-hot encode categorical features<br>cat_cols_full = [&#39;sex&#39;,&#39;dataset&#39;,&#39;cp&#39;,&#39;fbs&#39;,&#39;restecg&#39;,&#39;exang&#39;,&#39;slope&#39;,&#39;thal&#39;]<br>data = pd.get_dummies(data, columns=cat_cols_full)<br><br># Split features and target<br>X = data.drop([&#39;id&#39;,&#39;num&#39;], axis=1)<br>y = data[&#39;num&#39;]<br><br># One-hot encode target for neural network<br>y = to_categorical(y, num_classes=2)</pre><pre>/tmp/ipython-input-1822809716.py:12: FutureWarning: Downcasting object dtype arrays on .fillna, .ffill, .bfill is deprecated and will change in a future version. Call result.infer_objects(copy=False) instead. To opt-in to the future behavior, set `pd.set_option(&#39;future.no_silent_downcasting&#39;, True)`<br>  data[col] = data[col].fillna(data[col].mode()[0])</pre><p><strong>Train-Test Split and Feature Scaling</strong></p><pre># Convert stages 1-4 to 1<br>X_train, X_test, y_train, y_test = train_test_split(<br>    X, y, test_size=0.2, random_state=42<br>)<br><br># Scale numerical features for better convergence<br>scaler = StandardScaler()<br>X_train = scaler.fit_transform(X_train)<br>X_test = scaler.transform(X_test)</pre><ul><li>80% of the data is used for training, 20% for testing.</li><li>Scaling ensures that all features contribute equally during training.</li></ul><p><strong>Build the Neural Network</strong></p><pre>model = Sequential([<br>    Dense(32, activation=&#39;relu&#39;, input_shape=(X_train.shape[1],)),<br>    Dropout(0.4),  # Increased dropout<br>    Dense(16, activation=&#39;relu&#39;),<br>    Dropout(0.3),<br>    Dense(2, activation=&#39;softmax&#39;)  # Binary classification<br>])<br><br>model.compile(<br>    optimizer=&#39;adam&#39;,<br>    loss=&#39;categorical_crossentropy&#39;,<br>    metrics=[&#39;accuracy&#39;]<br>)</pre><pre>/usr/local/lib/python3.12/dist-packages/keras/src/layers/core/dense.py:93: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.<br>  super().__init__(activity_regularizer=activity_regularizer, **kwargs)</pre><ul><li>A simple feed-forward neural network with 2 hidden layers is used.</li><li>Dropout prevents overfitting.</li><li>Softmax in the output layer is used for multi-class/binary classification.</li></ul><p><strong>Train the Mode</strong></p><pre>history = model.fit(<br>    X_train, y_train,<br>    validation_split=0.2,<br>    epochs=100,<br>    batch_size=16<br>)<br><br># Plot training history<br>plt.figure(figsize=(12,4))<br><br>plt.subplot(1,2,1)<br>plt.plot(history.history[&#39;loss&#39;], label=&#39;Train Loss&#39;)<br>plt.plot(history.history[&#39;val_loss&#39;], label=&#39;Validation Loss&#39;)<br>plt.title(&#39;Loss over Epochs&#39;)<br>plt.xlabel(&#39;Epochs&#39;)<br>plt.ylabel(&#39;Loss&#39;)<br>plt.legend()<br><br>plt.subplot(1,2,2)<br>plt.plot(history.history[&#39;accuracy&#39;], label=&#39;Train Accuracy&#39;)<br>plt.plot(history.history[&#39;val_accuracy&#39;], label=&#39;Validation Accuracy&#39;)<br>plt.title(&#39;Accuracy over Epochs&#39;)<br>plt.xlabel(&#39;Epochs&#39;)<br>plt.ylabel(&#39;Accuracy&#39;)<br>plt.legend()<br><br>plt.show()</pre><pre>Epoch 1/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 5s 25ms/step - accuracy: 0.4671 - loss: 0.9552 - val_accuracy: 0.6014 - val_loss: 0.6600<br>Epoch 2/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.5859 - loss: 0.6950 - val_accuracy: 0.7365 - val_loss: 0.5761<br>Epoch 3/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.6743 - loss: 0.6288 - val_accuracy: 0.7770 - val_loss: 0.5275<br>Epoch 4/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.6599 - loss: 0.6071 - val_accuracy: 0.7905 - val_loss: 0.4963<br>Epoch 5/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7285 - loss: 0.5508 - val_accuracy: 0.8176 - val_loss: 0.4666<br>Epoch 6/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7539 - loss: 0.5322 - val_accuracy: 0.8243 - val_loss: 0.4444<br>Epoch 7/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7305 - loss: 0.5636 - val_accuracy: 0.8311 - val_loss: 0.4276<br>Epoch 8/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7509 - loss: 0.5483 - val_accuracy: 0.8311 - val_loss: 0.4149<br>Epoch 9/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7785 - loss: 0.4803 - val_accuracy: 0.8311 - val_loss: 0.4075<br>Epoch 10/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7816 - loss: 0.4832 - val_accuracy: 0.8311 - val_loss: 0.3934<br>Epoch 11/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8053 - loss: 0.4779 - val_accuracy: 0.8378 - val_loss: 0.3840<br>Epoch 12/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8156 - loss: 0.4229 - val_accuracy: 0.8378 - val_loss: 0.3778<br>Epoch 13/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8258 - loss: 0.4420 - val_accuracy: 0.8311 - val_loss: 0.3782<br>Epoch 14/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8510 - loss: 0.4277 - val_accuracy: 0.8311 - val_loss: 0.3757<br>Epoch 15/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7936 - loss: 0.4572 - val_accuracy: 0.8311 - val_loss: 0.3733<br>Epoch 16/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8353 - loss: 0.4138 - val_accuracy: 0.8378 - val_loss: 0.3680<br>Epoch 17/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8037 - loss: 0.4238 - val_accuracy: 0.8446 - val_loss: 0.3658<br>Epoch 18/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8169 - loss: 0.4203 - val_accuracy: 0.8378 - val_loss: 0.3675<br>Epoch 19/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8090 - loss: 0.4280 - val_accuracy: 0.8378 - val_loss: 0.3655<br>Epoch 20/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8173 - loss: 0.4290 - val_accuracy: 0.8514 - val_loss: 0.3594<br>Epoch 21/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.7924 - loss: 0.4440 - val_accuracy: 0.8446 - val_loss: 0.3652<br>Epoch 22/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8321 - loss: 0.3905 - val_accuracy: 0.8446 - val_loss: 0.3616<br>Epoch 23/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8686 - loss: 0.3743 - val_accuracy: 0.8514 - val_loss: 0.3624<br>Epoch 24/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8496 - loss: 0.3785 - val_accuracy: 0.8446 - val_loss: 0.3556<br>Epoch 25/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8402 - loss: 0.3798 - val_accuracy: 0.8514 - val_loss: 0.3604<br>Epoch 26/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 5ms/step - accuracy: 0.8441 - loss: 0.3869 - val_accuracy: 0.8446 - val_loss: 0.3609<br>Epoch 27/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8285 - loss: 0.4286 - val_accuracy: 0.8446 - val_loss: 0.3615<br>Epoch 28/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8465 - loss: 0.3796 - val_accuracy: 0.8446 - val_loss: 0.3613<br>Epoch 29/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8531 - loss: 0.4019 - val_accuracy: 0.8446 - val_loss: 0.3609<br>Epoch 30/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8494 - loss: 0.3400 - val_accuracy: 0.8446 - val_loss: 0.3594<br>Epoch 31/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8450 - loss: 0.3824 - val_accuracy: 0.8378 - val_loss: 0.3549<br>Epoch 32/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8301 - loss: 0.3823 - val_accuracy: 0.8446 - val_loss: 0.3519<br>Epoch 33/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8236 - loss: 0.3983 - val_accuracy: 0.8446 - val_loss: 0.3553<br>Epoch 34/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8338 - loss: 0.3562 - val_accuracy: 0.8446 - val_loss: 0.3567<br>Epoch 35/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8529 - loss: 0.3682 - val_accuracy: 0.8446 - val_loss: 0.3566<br>Epoch 36/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8517 - loss: 0.3871 - val_accuracy: 0.8446 - val_loss: 0.3587<br>Epoch 37/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 7ms/step - accuracy: 0.8253 - loss: 0.4002 - val_accuracy: 0.8514 - val_loss: 0.3515<br>Epoch 38/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8462 - loss: 0.3728 - val_accuracy: 0.8514 - val_loss: 0.3509<br>Epoch 39/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8472 - loss: 0.3666 - val_accuracy: 0.8446 - val_loss: 0.3515<br>Epoch 40/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8520 - loss: 0.3522 - val_accuracy: 0.8446 - val_loss: 0.3490<br>Epoch 41/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8368 - loss: 0.3941 - val_accuracy: 0.8514 - val_loss: 0.3485<br>Epoch 42/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8297 - loss: 0.3803 - val_accuracy: 0.8514 - val_loss: 0.3506<br>Epoch 43/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8342 - loss: 0.3897 - val_accuracy: 0.8514 - val_loss: 0.3486<br>Epoch 44/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 7ms/step - accuracy: 0.8529 - loss: 0.3524 - val_accuracy: 0.8514 - val_loss: 0.3502<br>Epoch 45/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8698 - loss: 0.3568 - val_accuracy: 0.8514 - val_loss: 0.3464<br>Epoch 46/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 7ms/step - accuracy: 0.8529 - loss: 0.3574 - val_accuracy: 0.8514 - val_loss: 0.3436<br>Epoch 47/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8544 - loss: 0.3608 - val_accuracy: 0.8514 - val_loss: 0.3451<br>Epoch 48/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 7ms/step - accuracy: 0.8318 - loss: 0.3659 - val_accuracy: 0.8378 - val_loss: 0.3500<br>Epoch 49/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8050 - loss: 0.4032 - val_accuracy: 0.8514 - val_loss: 0.3404<br>Epoch 50/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8502 - loss: 0.3631 - val_accuracy: 0.8514 - val_loss: 0.3428<br>Epoch 51/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8593 - loss: 0.3438 - val_accuracy: 0.8514 - val_loss: 0.3488<br>Epoch 52/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 7ms/step - accuracy: 0.8624 - loss: 0.3347 - val_accuracy: 0.8514 - val_loss: 0.3487<br>Epoch 53/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8351 - loss: 0.3860 - val_accuracy: 0.8514 - val_loss: 0.3480<br>Epoch 54/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 7ms/step - accuracy: 0.8402 - loss: 0.3623 - val_accuracy: 0.8514 - val_loss: 0.3460<br>Epoch 55/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8594 - loss: 0.3061 - val_accuracy: 0.8514 - val_loss: 0.3493<br>Epoch 56/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8606 - loss: 0.3261 - val_accuracy: 0.8581 - val_loss: 0.3482<br>Epoch 57/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8718 - loss: 0.3113 - val_accuracy: 0.8581 - val_loss: 0.3497<br>Epoch 58/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8870 - loss: 0.2982 - val_accuracy: 0.8649 - val_loss: 0.3495<br>Epoch 59/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8669 - loss: 0.3685 - val_accuracy: 0.8514 - val_loss: 0.3521<br>Epoch 60/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8852 - loss: 0.3046 - val_accuracy: 0.8581 - val_loss: 0.3504<br>Epoch 61/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8731 - loss: 0.3429 - val_accuracy: 0.8649 - val_loss: 0.3512<br>Epoch 62/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 5ms/step - accuracy: 0.8619 - loss: 0.3037 - val_accuracy: 0.8649 - val_loss: 0.3511<br>Epoch 63/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8676 - loss: 0.2999 - val_accuracy: 0.8581 - val_loss: 0.3552<br>Epoch 64/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8709 - loss: 0.3053 - val_accuracy: 0.8649 - val_loss: 0.3473<br>Epoch 65/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8480 - loss: 0.3062 - val_accuracy: 0.8581 - val_loss: 0.3495<br>Epoch 66/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8380 - loss: 0.3621 - val_accuracy: 0.8581 - val_loss: 0.3536<br>Epoch 67/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8770 - loss: 0.3208 - val_accuracy: 0.8581 - val_loss: 0.3488<br>Epoch 68/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8662 - loss: 0.3462 - val_accuracy: 0.8716 - val_loss: 0.3505<br>Epoch 69/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8656 - loss: 0.3335 - val_accuracy: 0.8716 - val_loss: 0.3500<br>Epoch 70/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 8ms/step - accuracy: 0.8501 - loss: 0.3310 - val_accuracy: 0.8716 - val_loss: 0.3533<br>Epoch 71/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 1s 6ms/step - accuracy: 0.8775 - loss: 0.3348 - val_accuracy: 0.8716 - val_loss: 0.3484<br>Epoch 72/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8812 - loss: 0.3176 - val_accuracy: 0.8716 - val_loss: 0.3488<br>Epoch 73/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8576 - loss: 0.3163 - val_accuracy: 0.8581 - val_loss: 0.3511<br>Epoch 74/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8698 - loss: 0.3267 - val_accuracy: 0.8649 - val_loss: 0.3528<br>Epoch 75/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8509 - loss: 0.3298 - val_accuracy: 0.8649 - val_loss: 0.3576<br>Epoch 76/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8952 - loss: 0.2880 - val_accuracy: 0.8581 - val_loss: 0.3617<br>Epoch 77/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8794 - loss: 0.3356 - val_accuracy: 0.8649 - val_loss: 0.3572<br>Epoch 78/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8597 - loss: 0.3205 - val_accuracy: 0.8649 - val_loss: 0.3637<br>Epoch 79/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8611 - loss: 0.2968 - val_accuracy: 0.8716 - val_loss: 0.3588<br>Epoch 80/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8596 - loss: 0.3429 - val_accuracy: 0.8716 - val_loss: 0.3575<br>Epoch 81/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8767 - loss: 0.3133 - val_accuracy: 0.8716 - val_loss: 0.3563<br>Epoch 82/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8589 - loss: 0.3270 - val_accuracy: 0.8716 - val_loss: 0.3540<br>Epoch 83/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8632 - loss: 0.3187 - val_accuracy: 0.8514 - val_loss: 0.3561<br>Epoch 84/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8635 - loss: 0.3220 - val_accuracy: 0.8514 - val_loss: 0.3593<br>Epoch 85/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8801 - loss: 0.3270 - val_accuracy: 0.8649 - val_loss: 0.3573<br>Epoch 86/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8522 - loss: 0.3231 - val_accuracy: 0.8716 - val_loss: 0.3547<br>Epoch 87/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8735 - loss: 0.3145 - val_accuracy: 0.8716 - val_loss: 0.3534<br>Epoch 88/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8669 - loss: 0.3100 - val_accuracy: 0.8649 - val_loss: 0.3580<br>Epoch 89/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8689 - loss: 0.3062 - val_accuracy: 0.8581 - val_loss: 0.3604<br>Epoch 90/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8710 - loss: 0.3025 - val_accuracy: 0.8581 - val_loss: 0.3579<br>Epoch 91/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8939 - loss: 0.2991 - val_accuracy: 0.8716 - val_loss: 0.3589<br>Epoch 92/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8452 - loss: 0.3637 - val_accuracy: 0.8581 - val_loss: 0.3590<br>Epoch 93/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8914 - loss: 0.2790 - val_accuracy: 0.8514 - val_loss: 0.3638<br>Epoch 94/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8845 - loss: 0.2924 - val_accuracy: 0.8514 - val_loss: 0.3624<br>Epoch 95/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8861 - loss: 0.2828 - val_accuracy: 0.8514 - val_loss: 0.3639<br>Epoch 96/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8711 - loss: 0.3173 - val_accuracy: 0.8514 - val_loss: 0.3678<br>Epoch 97/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8796 - loss: 0.3271 - val_accuracy: 0.8649 - val_loss: 0.3653<br>Epoch 98/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8679 - loss: 0.2914 - val_accuracy: 0.8649 - val_loss: 0.3650<br>Epoch 99/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8542 - loss: 0.3411 - val_accuracy: 0.8649 - val_loss: 0.3619<br>Epoch 100/100<br>37/37 ━━━━━━━━━━━━━━━━━━━━ 0s 4ms/step - accuracy: 0.8600 - loss: 0.2996 - val_accuracy: 0.8581 - val_loss: 0.3677</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*K9lfWHhs8cF3z4NgEfif8A.png" /></figure><ul><li>Training accuracy reached ~90%, and validation accuracy ~88%.</li><li>Loss decreases steadily, indicating that the model is learning effectively.</li><li>Small gaps between training and validation curves suggest no major overfitting.</li></ul><p><strong>Evaluate the Model</strong></p><pre>test_loss, test_acc = model.evaluate(X_test, y_test)<br>print(f&quot;Test Accuracy: {test_acc:.3f}&quot;)</pre><pre>6/6 ━━━━━━━━━━━━━━━━━━━━ 0s 6ms/step - accuracy: 0.8807 - loss: 0.4099 <br>Test Accuracy: 0.880</pre><ul><li>The model correctly predicts heart disease in 88% of unseen patients.</li><li>This is a strong result for a small dataset with only 920 patients.</li></ul><p><strong>Confusion Matrix &amp; Classification Report</strong></p><pre># Predict classes<br>y_pred = model.predict(X_test)<br>y_true_classes = np.argmax(y_test, axis=1)<br>y_pred_classes = np.argmax(y_pred, axis=1)<br><br># Confusion matrix<br>cm = confusion_matrix(y_true_classes, y_pred_classes)<br>plt.figure(figsize=(6,5))<br>sns.heatmap(cm, annot=True, fmt=&#39;d&#39;, cmap=&#39;Reds&#39;)<br>plt.title(&quot;Confusion Matrix&quot;)<br>plt.xlabel(&quot;Predicted&quot;)<br>plt.ylabel(&quot;Actual&quot;)<br>plt.show()<br><br># Classification report<br>print(&quot;\nClassification Report:&quot;)<br>print(classification_report(y_true_classes, y_pred_classes, digits=3))</pre><pre>6/6 ━━━━━━━━━━━━━━━━━━━━ 0s 10ms/step</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*GjE0rYTEeSAyIHS2EzgEZg.png" /></figure><pre>Classification Report:<br>              precision    recall  f1-score   support<br>           0      0.844     0.867     0.855        75<br>           1      0.907     0.890     0.898       109</pre><pre>    accuracy                          0.880       184<br>   macro avg      0.875     0.878     0.877       184<br>weighted avg      0.881     0.880     0.881       184</pre><ul><li>Precision for class 1 (heart disease): 90% → model rarely mislabels healthy patients as diseased.</li><li>Recall for class 1: 89% → model successfully detects most patients with heart disease.</li><li>Overall accuracy is 88%, which is quite good for a small dataset.</li><li>The confusion matrix visually confirms these results: most predictions are correct, with only a few misclassifications.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77317d665b9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Organoid Intelligence: The Dawn of Living AI]]></title>
            <link>https://medium.com/@soukaina./organoid-intelligence-the-dawn-of-living-ai-2fe0f63ca5bd?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/2fe0f63ca5bd</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[organoid-intelligence]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Wed, 15 Oct 2025 03:19:20 GMT</pubDate>
            <atom:updated>2025-10-15T03:19:20.740Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NHgiLdF79bcEK_qacoYWGw.png" /></figure><h4>Introduction</h4><p>Artificial Intelligence (AI) has already transformed how we live, learn, and create. But what if the next revolution in computing doesn’t come from silicon chips but from living brain cells?</p><p>Welcome to Organoid Intelligence (OI), a bold interdisciplinary field at the intersection of neuroscience, synthetic biology, and computer science. Instead of modeling the brain with algorithms, researchers are beginning to compute with the brain itself using lab-grown neural organoids capable of learning, memory, and adaptation.</p><p>This emerging domain aims to create biological computers systems that merge the energy efficiency and learning capacity of the human brain with the precision and scalability of digital AI.</p><h4>What Is Organoid Intelligence?</h4><p>Organoid Intelligence uses 3D clusters of human brain cells, known as <em>organoids</em>, that self-organize into miniature neural networks. These organoids mimic some structural and functional aspects of the human brain, such as spontaneous electrical activity, synaptic communication, and basic learning patterns.</p><p>By connecting these organoids to electronic interfaces (microelectrode arrays, or MEAs), researchers can both stimulate them with data and record their responses, effectively creating a “wetware” computer.</p><p>The term “Organoid Intelligence” was first popularized by Thomas Hartung and colleagues at Johns Hopkins University, who envisioned “biocomputers” built from human neurons capable of solving tasks that challenge conventional AI systems but at a fraction of the energy cost.</p><h4>The State of the Art: 2024–2025 Breakthroughs</h4><p>The last two years have seen a flurry of experimental progress shifting OI from concept to early demonstration.</p><h4>1. Braille Recognition with Living Neural Networks</h4><p>A 2025 preprint by Tianyi Liu et al. presented the most direct example of biological computation so far.<br> Researchers fed tactile Braille data into human forebrain organoids via electrical stimulation, then read their spike patterns back through MEAs.</p><ul><li>Single organoid accuracy: 61 % in Braille character classification</li><li>Three-organoid ensemble: 83 % accuracy, robust against noise</li><li>Significance: First evidence that neural organoids can perform real sensory classification tasks not just random neural firing.</li></ul><p>The study also proposed a general encoding/decoding pipeline: mapping sensor data → electrical pulse patterns → spike decoding → classification. This could form the backbone of future “living sensors.”</p><h4>2. Scaling Experiments with AI-Designed Environments</h4><p>In September 2025, Brennen Hill published <em>Scaling Environments for Organoid Intelligence with LLM-Automated Design and Plasticity-Based Evaluation</em>.<br> The work envisions closed-loop training environments where organoids “learn” tasks such as conditional avoidance or Pong through stimulus–feedback loops.</p><p>The innovation lies in using large language models (LLMs) to automate the design of stimulation protocols and adaptive environments accelerating experimental design and reproducibility.<br> Hill proposes measuring learning via multi-modal plasticity metrics from synaptic changes to molecular markers linking computational output to biological adaptation.</p><h4>3. The Rise of Wired and Long-Lived Organoids</h4><p>Functional computing requires stable, complex neural networks. Two recent advances made this possible:</p><ul><li>Wired Cortical Organoids (UC San Diego, <em>Nature Protocols</em>, 2024):<br> A protocol for producing <em>mature, interconnected organoids</em> that exhibit coordinated neural oscillations effectively forming “mini-brains with internal wiring.”</li><li>Open Neuroplatform for Organoids (<em>Frontiers in AI</em>, 2024):<br> A remotely accessible platform for long-term experiments, integrating pumps, optics, and MEAs under programmable control.<br> The system supports 100-day-plus recordings across &gt; 1,000 organoids, collecting petabyte-scale data.</li></ul><p>Together, these developments give researchers the tools and longevity to perform reproducible, scalable experiments in OI.</p><h4>4. Understanding Brain-like Morphodynamics</h4><p>In 2025, Akanksha Jain et al. published <em>Morphodynamics of Human Early Brain Organoid Development</em> (<em>Nature</em>, June 2025).<br> While not directly about computation, this work mapped how early organoids self-organize, fold, and form layered structures crucial for wiring complexity and potential learning capacity.<br> Understanding these developmental rules may allow scientists to “engineer intelligence” by guiding organoid structure toward specific computational functions.</p><h4>5. Ethics and Realistic Expectations</h4><p>As the field matures, ethical concerns grow louder.<br> In <em>AAPS Open</em> (2025), Chakka &amp; Maniruzzaman warned against premature claims of consciousness or sentience in organoids.<br> Similarly, an <em>MDPI Organoids</em> article (2025) outlined the limits of current complexity and called for ethical frameworks before scaling experiments further.</p><p>OI systems today exhibit collective neuronal dynamics, but not thought, awareness, or suffering.<br> Maintaining scientific and ethical discipline will be key as these systems gain functional sophistication.</p><h4>Why Organoid Intelligence Matters</h4><h4>1. Biological Efficiency</h4><p>A human brain runs on ~20 W of power less than a light bulb yet performs trillions of operations per second.<br> If organoid computing can replicate even a fraction of this efficiency, it could outclass silicon for tasks involving pattern recognition or adaptive learning.</p><h4>2. Understanding the Brain by Building One</h4><p>OI offers a unique feedback loop: as we teach organoids to compute, we uncover how biological intelligence arises from synaptic plasticity to emergent cognition.</p><h4>3. Sustainability and Green Computing</h4><p>Large AI models require megawatt-hours of energy to train.<br> Living neural networks could operate at microscopic power scales, contributing to a “Green AI” movement grounded in biology.</p><h4>4. Hybrid Human-AI Systems</h4><p>Future architectures may blend biological wetware with digital hardware, forming hybrid intelligence systems where biological computation complements silicon AI for adaptability, creativity, or low-power edge computing.</p><h4>Challenges Ahead</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*DIqOPPczaveFfrmWvGCw0g.png" /></figure><h4>The Road Ahead</h4><p>The next five years will likely see:</p><ol><li>Closed-Loop Experiments: where organoids adapt behavior through real-time feedback (biological reinforcement learning).</li><li>AI-Guided Experiment Design: LLMs generating protocols, analyzing data, and optimizing culture conditions.</li><li>Hybrid Silicon-Biological Circuits: direct co-processing between neuromorphic chips and organoids.</li><li>Standardized “Brainware Platforms”: shared infrastructures akin to cloud computing, but for wetware.</li></ol><p>Organoid Intelligence won’t replace silicon AI, but it could redefine what “intelligence” means in computing.</p><h4>Conclusion</h4><p>Organoid Intelligence represents an audacious new frontier one where biology and computation merge to form <em>living intelligence systems</em>.<br> Although still in its infancy, the field’s momentum is undeniable.<br> From tactile recognition experiments to AI-assisted training environments, OI is evolving from speculative concept to experimental reality.</p><p>If AI was inspired by the brain, OI completes the circle using the brain itself to inspire the next generation of machines.</p><h4>References:</h4><ol><li>Liu, T., Philamore, H., &amp; Ward-Cherrier, B. (2025). <em>Encoding Tactile Stimuli for Organoid Intelligence in Braille Recognition.</em> arXiv:2508.20850.</li><li>Hill, B. (2025). <em>Scaling Environments for Organoid Intelligence with LLM-Automated Design and Plasticity-Based Evaluation.</em> arXiv:2509.04633.</li><li>UC San Diego (2024). <em>Wired Cortical Organoids Protocol.</em></li><li>Frontiers in AI (2024). <em>Open and Remotely Accessible Neuroplatform for Research on Neural Organoids.</em></li><li>Jain, A. et al. (2025). <em>Morphodynamics of Human Early Brain Organoid Development.</em> <em>Nature.</em></li><li>Chakka, K., &amp; Maniruzzaman, M. (2025). <em>Organoid intelligence: training lab-grown mini-brains to learn and compute with AI.</em> <em>AAPS Open.</em></li><li>Smirnova, L., Hartung, T. et al. (2025). <em>Organoid Intelligence — The Ultimate Functionality of a Brain Microphysiological System.</em> <em>ALTEX.</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2fe0f63ca5bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Big Data Analytics with Python: From Massive Datasets to Meaningful Insights]]></title>
            <link>https://medium.com/@soukaina./big-data-analytics-with-python-from-massive-datasets-to-meaningful-insights-907b90484848?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/907b90484848</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Thu, 09 Oct 2025 16:31:45 GMT</pubDate>
            <atom:updated>2025-10-09T16:34:01.432Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>In the digital era, data has become the new oil. Every click, purchase, post, and sensor reading contributes to a vast ocean of information known as Big Data.<br> From healthcare and finance to e-commerce and entertainment, companies are using Big Data to understand customer behavior, optimize operations, and make data-driven decisions.</p><p>However, the challenge lies not in gathering data but in extracting value from it. Traditional data processing tools like Excel or single-machine databases simply can’t handle the volume, velocity, and variety of modern data streams.</p><p>That’s where Python comes in. With its powerful ecosystem of open-source libraries, scalability, and ease of use, Python has become one of the most essential languages for Big Data analytics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qM92urpYVI_s_1F2kJSpWg.jpeg" /></figure><h4><strong>What Exactly Is Big Data?</strong></h4><p>“Big Data” is more than just large datasets. It refers to data so vast, fast, and diverse that traditional software struggles to process it.<br> It’s commonly defined by the three Vs:</p><ol><li>Volume: The scale of data (terabytes, petabytes, or even exabytes).</li><li>Velocity: The speed at which data is generated and needs to be processed.</li><li>Variety : The multiple types and sources of data (structured, semi-structured, and unstructured).</li></ol><p>To put this in perspective:</p><ul><li>Facebook generates over 4 petabytes of data per day.</li><li>Every minute, users send over 350,000 tweets.</li><li>IoT sensors around the world continuously stream environmental and industrial data.</li></ul><h4>Why Python Is the Language of Big Data</h4><p>Python has become the go-to tool for data scientists and analysts working with Big Data because of its simplicity, scalability, and rich ecosystem.</p><p>Here’s why Python shines in Big Data projects:</p><ul><li>Ease of Learning: Python’s clean syntax makes it beginner-friendly yet powerful enough for advanced analytics.</li><li>Vast Libraries: Packages like pandas, NumPy, PySpark, Dask, and Vaex make data manipulation and computation efficient.</li><li>Integration Power: It easily connects with distributed systems like Apache Spark, Hadoop, and cloud platforms like AWS or Google Cloud.</li><li>Visualization and ML: Libraries like matplotlib, seaborn, and scikit-learn allow you to move seamlessly from data analysis to machine learning.</li></ul><h4>Python in Action: Handling Big Data</h4><p>Let’s go step-by-step through a practical example of analyzing large-scale data using Python.</p><h4>1. Handling Large Datasets with Dask</h4><p>When your dataset is too large to fit into memory, Dask allows you to scale your analysis effortlessly. It extends the familiar pandas syntax to larger than memory operations.</p><pre>import dask.dataframe as dd</pre><pre># Load a massive dataset<br>df = dd.read_csv(&quot;big_dataset.csv&quot;)<br># Peek at the data<br>print(df.head())<br># Compute descriptive statistics<br>summary = df.describe().compute()<br>print(summary)</pre><p>Unlike pandas, Dask doesn’t load the full dataset at once. It breaks the file into smaller chunks and processes them in parallel, making it ideal for laptops or clusters.</p><h4>2. Distributed Data Processing with PySpark</h4><p>If you’re dealing with terabytes of data, you’ll want to distribute computation across multiple machines. That’s where Apache Spark comes in and PySpark is its Python interface.</p><pre>from pyspark.sql import SparkSession</pre><pre># Initialize Spark<br>spark = SparkSession.builder.appName(&quot;BigDataExample&quot;).getOrCreate()<br># Load data into a distributed dataframe<br>data = spark.read.csv(&quot;big_dataset.csv&quot;, header=True, inferSchema=True)<br># View schema and sample rows<br>data.printSchema()<br>data.show(5)<br># Analyze: average value by category<br>data.groupBy(&quot;Category&quot;).avg(&quot;Sales&quot;).show()</pre><p>It can process huge datasets across clusters of computers, handle both batch and streaming data, and integrate easily with cloud platforms.</p><h4>3. Data Visualization and Insights</h4><p>After cleaning and aggregating data, visualizing it helps reveal patterns that numbers alone can’t show. Even with large data, you can use samples for visualization.</p><pre>import pandas as pd<br>import seaborn as sns<br>import matplotlib.pyplot as plt</pre><pre># Load a smaller sample for plotting<br>sample = pd.read_csv(&quot;big_dataset_sample.csv&quot;)<br># Distribution of values<br>sns.histplot(sample[&quot;Sales&quot;], bins=40, kde=True)<br>plt.title(&quot;Distribution of Sales&quot;)<br>plt.xlabel(&quot;Sales Amount&quot;)<br>plt.ylabel(&quot;Frequency&quot;)<br>plt.show()<br># Relationship between two features<br>sns.scatterplot(data=sample, x=&quot;Marketing_Spend&quot;, y=&quot;Revenue&quot;)<br>plt.title(&quot;Marketing Spend vs Revenue&quot;)<br>plt.show()</pre><p>These visuals help decision-makers quickly grasp trends, outliers, and correlations key components of actionable business intelligence.</p><h4>Real-World Applications of Big Data Analytics</h4><p>The impact of Big Data stretches across every industry. Here are some real-world examples where Python and data analytics are driving transformation:</p><ul><li>Healthcare: Predicting patient outcomes, diagnosing diseases from medical images, and optimizing hospital resource management.</li><li>Finance: Detecting fraudulent transactions, credit scoring, and algorithmic trading.</li><li>Retail &amp; E-commerce: Product recommendation systems, dynamic pricing, and customer sentiment analysis.</li><li>Smart Cities: Monitoring traffic, managing waste, and optimizing energy usage.</li><li>Entertainment: Streaming platforms like Netflix use Big Data to recommend content and improve user retention.</li></ul><h4>Challenges in Big Data Analytics</h4><p>Despite its potential, Big Data comes with serious challenges:</p><ol><li>Data Quality: Incomplete, noisy, or inconsistent data can lead to unreliable insights.</li><li>Infrastructure Costs: Storing and processing petabytes requires scalable (and often expensive) infrastructure.</li><li>Privacy and Ethics: Data security and compliance with laws like GDPR are major concerns.</li><li>Skill Gaps: Effective Big Data analytics requires a mix of domain knowledge, programming, and statistical expertise.</li></ol><h4>From Data to Intelligence: The Future</h4><p>We’re moving beyond descriptive analytics (“what happened?”) to predictive (“what will happen?”) and prescriptive analytics (“what should we do?”).<br> As artificial intelligence integrates more tightly with data systems, future analysts will need to combine Big Data, machine learning, and cloud computing skills to extract real value from information.</p><p>Python’s ever-growing ecosystem including libraries like PySpark MLlib, TensorFlow, and Hugging Face Transformers positions it perfectly for this new data-centric future.</p><h4>Conclusion</h4><p>Big Data is more than a buzzword it’s a revolution. With Python, we can move from raw, messy data to clear insights that fuel smarter decisions. Whether you’re analyzing millions of customer transactions or real-time sensor streams, Python offers the flexibility and scalability to get the job done.</p><p>By mastering tools like Dask, PySpark, and pandas, you can handle data of any size and complexity.<br> In a world where every organization wants to be data-driven, knowing how to work with Big Data in Python is not just a skill it’s a superpower.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=907b90484848" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern Speech Emotion Analysis in Python: From Audio Signals to Emotional Intelligence]]></title>
            <link>https://medium.com/@soukaina./modern-speech-emotion-analysis-in-python-from-audio-signals-to-emotional-intelligence-de341fe54fa9?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/de341fe54fa9</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Tue, 07 Oct 2025 17:28:36 GMT</pubDate>
            <atom:updated>2025-10-07T17:28:36.460Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>Speech Emotion Recognition (SER) is an evolving field that lies at the intersection of Artificial Intelligence, Linguistics, and Psychology. It focuses on identifying and classifying emotions such as happiness, anger, sadness, or fear from a person’s voice.</p><p>In 2025, with advances in deep learning, transformers, and multimodal emotion models, speech emotion analysis has become more accurate and adaptable. Applications span from AI-powered assistants and customer service monitoring to mental health analysis and affective computing systems.</p><p>In this tutorial, we’ll build a Speech Emotion Analyzer using Python, covering modern approaches for:</p><ul><li>Data loading and preprocessing</li><li>Feature extraction (MFCCs, Chroma, and Spectral Contrast)</li><li>Model training using LSTM and CNN</li><li>Evaluation and deployment</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*9Pamp3KGwNYb9OJ_Ws8cYw.png" /></figure><h4>1. Problem Definition</h4><p>The goal is to develop a system that can automatically detect the emotional state of a speaker from audio input.<br> We’ll use RAVDESS (Ryerson Audio-Visual Database of Emotional Speech and Song) a well-known open-source dataset with labeled emotion recordings.</p><h4>2. Setup and Dependencies</h4><p>Let’s start by installing the required libraries:</p><pre>pip install librosa soundfile numpy pandas scikit-learn keras tensorflow tqdm matplotlib</pre><h4>3. Data Loading and Preprocessing</h4><p>We’ll extract features from each audio file and assign corresponding emotion labels.</p><pre>import os<br>import librosa<br>import numpy as np<br>import pandas as pd<br>from tqdm import tqdm<br>from sklearn.preprocessing import LabelEncoder<br>from sklearn.model_selection import train_test_split<br>from tensorflow.keras.utils import to_categorical</pre><h4>Feature Extraction Function</h4><p>We’ll combine MFCC, Chroma, and Mel Spectrogram features which are proven to improve accuracy in 2025 models.</p><pre>def extract_features(file_name):<br>    try:<br>        audio, sample_rate = librosa.load(file_name, res_type=&#39;kaiser_fast&#39;, duration=3, sr=22050, offset=0.5)<br>        <br>        mfccs = np.mean(librosa.feature.mfcc(y=audio, sr=sample_rate, n_mfcc=40).T, axis=0)<br>        chroma = np.mean(librosa.feature.chroma_stft(y=audio, sr=sample_rate).T, axis=0)<br>        mel = np.mean(librosa.feature.melspectrogram(y=audio, sr=sample_rate).T, axis=0)<br>        <br>        features = np.hstack([mfccs, chroma, mel])<br>        return features<br>    except Exception as e:<br>        print(f&quot;Error processing {file_name}: {e}&quot;)<br>        return None</pre><h4>Loading RAVDESS Dataset</h4><pre>data = []<br>emotions = {<br>    &#39;01&#39;: &#39;neutral&#39;, &#39;02&#39;: &#39;calm&#39;, &#39;03&#39;: &#39;happy&#39;, &#39;04&#39;: &#39;sad&#39;,<br>    &#39;05&#39;: &#39;angry&#39;, &#39;06&#39;: &#39;fearful&#39;, &#39;07&#39;: &#39;disgust&#39;, &#39;08&#39;: &#39;surprised&#39;<br>}</pre><pre>DATA_PATH = &quot;path_to_ravdess/&quot;<br>for root, dirs, files in os.walk(DATA_PATH):<br>    for file in files:<br>        if file.endswith(&quot;.wav&quot;):<br>            emotion_label = emotions[file.split(&quot;-&quot;)[2]]<br>            feature = extract_features(os.path.join(root, file))<br>            if feature is not None:<br>                data.append([feature, emotion_label])<br>df = pd.DataFrame(data, columns=[&#39;feature&#39;, &#39;emotion&#39;])<br>print(df.head())</pre><h4>4. Preparing the Dataset</h4><p>Split into training and testing sets.</p><pre>X = np.array(df[&#39;feature&#39;].tolist())<br>y = np.array(df[&#39;emotion&#39;].tolist())</pre><pre>encoder = LabelEncoder()<br>y = to_categorical(encoder.fit_transform(y))<br>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)</pre><h4>5. Model Architecture Hybrid LSTM + CNN</h4><p>Modern research (2023–2025) shows that combining CNNs (for feature extraction) with LSTMs (for temporal learning) significantly improves performance.</p><pre>from tensorflow.keras.models import Sequential<br>from tensorflow.keras.layers import Dense, Dropout, LSTM, Conv1D, MaxPooling1D, Flatten, BatchNormalization</pre><pre>X_train = np.expand_dims(X_train, -1)<br>X_test = np.expand_dims(X_test, -1)<br>model = Sequential([<br>    Conv1D(128, 5, padding=&#39;same&#39;, activation=&#39;relu&#39;, input_shape=(X_train.shape[1], 1)),<br>    MaxPooling1D(pool_size=2),<br>    BatchNormalization(),<br>    LSTM(128, return_sequences=True),<br>    Dropout(0.3),<br>    LSTM(64),<br>    Dense(64, activation=&#39;relu&#39;),<br>    Dropout(0.3),<br>    Dense(y_train.shape[1], activation=&#39;softmax&#39;)<br>])<br>model.compile(loss=&#39;categorical_crossentropy&#39;, optimizer=&#39;adam&#39;, metrics=[&#39;accuracy&#39;])<br>model.summary()</pre><h4>6. Model Training</h4><pre>history = model.fit(<br>    X_train, y_train,<br>    epochs=80,<br>    batch_size=32,<br>    validation_data=(X_test, y_test),<br>    verbose=1<br>)</pre><h4>7. Evaluation</h4><pre>test_loss, test_acc = model.evaluate(X_test, y_test, verbose=0)<br>print(f&quot;✅ Test Accuracy: {test_acc:.2f}, Loss: {test_loss:.2f}&quot;)</pre><p>You can also visualize training performance:</p><pre>import matplotlib.pyplot as plt</pre><pre>plt.plot(history.history[&#39;accuracy&#39;], label=&#39;train accuracy&#39;)<br>plt.plot(history.history[&#39;val_accuracy&#39;], label=&#39;val accuracy&#39;)<br>plt.title(&#39;Model Accuracy over Epochs&#39;)<br>plt.xlabel(&#39;Epoch&#39;)<br>plt.ylabel(&#39;Accuracy&#39;)<br>plt.legend()<br>plt.show()</pre><h4>8. Model Deployment</h4><p>Once trained, you can deploy the model using Flask, Streamlit, or even integrate it into real-time applications.<br> Example using Streamlit (simplified):</p><pre># streamlit_app.py<br>import streamlit as st<br>import librosa<br>import numpy as np<br>from tensorflow.keras.models import load_model</pre><pre>model = load_model(&#39;speech_emotion_model.h5&#39;)<br>def predict_emotion(file):<br>    features = extract_features(file)<br>    features = np.expand_dims(features, axis=0)<br>    features = np.expand_dims(features, axis=-1)<br>    prediction = model.predict(features)<br>    return np.argmax(prediction)<br>st.title(&quot;Real-Time Speech Emotion Analyzer&quot;)<br>uploaded_file = st.file_uploader(&quot;Upload an audio file&quot;, type=[&quot;wav&quot;])<br>if uploaded_file:<br>    st.audio(uploaded_file)<br>    emotion = predict_emotion(uploaded_file)<br>    st.success(f&quot;Predicted Emotion: {emotion}&quot;)</pre><h4>9. Future Directions</h4><ul><li>Integrate transformer-based models (e.g., Wav2Vec2, Whisper)</li><li>Use multimodal inputs (facial + speech data)</li><li>Apply transfer learning on pre-trained emotion models</li><li>Experiment with self-supervised speech embeddings</li></ul><h4>Conclusion</h4><p>Building a Speech Emotion Analyzer combines signal processing and deep learning to understand human emotions more intuitively.<br> With improved models like CNN-LSTM hybrids and transformer-based encoders, emotion detection systems are now more powerful, adaptable, and accurate paving the way for emotionally intelligent AI in 2025 and beyond.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de341fe54fa9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Importance of Artificial Intelligence in Architecture: Designing the Future with BIM]]></title>
            <link>https://medium.com/@soukaina./the-importance-of-artificial-intelligence-in-architecture-designing-the-future-with-bim-05644ebab98e?source=rss-db1a4ed07f14------2</link>
            <guid isPermaLink="false">https://medium.com/p/05644ebab98e</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Soukaina Alaoui]]></dc:creator>
            <pubDate>Mon, 06 Oct 2025 13:15:29 GMT</pubDate>
            <atom:updated>2025-10-06T13:15:29.091Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction</h4><p>Architecture has always mirrored the evolution of human civilization blending art, science, and technology to shape the spaces in which we live and work. From the intricate hand-drawn blueprints of the Renaissance to the sophisticated computer-aided design (CAD) tools of the 20th century, every technological leap has expanded what architects can imagine and achieve. Today, we stand at the dawn of another major transformation: the rise of Artificial Intelligence (AI) in architectural design and construction.</p><p>Unlike earlier digital tools that simply accelerated manual drafting or modeling, AI introduces true intelligence into the design process. It allows computers not only to execute commands but also to learn, reason, and make informed decisions based on data. In the context of architecture, this means AI can analyze millions of design possibilities, simulate environmental impacts, and even predict how a building will perform years into the future all before the first brick is laid.</p><p>AI’s growing influence is reshaping the architectural landscape in profound ways. It enhances efficiency by automating repetitive design tasks and accelerating complex calculations that once required days or weeks of manual effort. It promotes sustainability by using predictive analytics to minimize waste, reduce energy consumption, and optimize material selection. It improves precision by integrating real-time data from sensors, building information systems, and environmental models to ensure every design decision is grounded in measurable insight. Most importantly, it fuels creativity, enabling architects to experiment freely with forms, materials, and layouts that might have been impractical or even impossible just a decade ago.</p><p>Imagine an AI system that helps an architect design an energy-efficient skyscraper in a dense urban area. The AI can instantly simulate how sunlight moves across the building throughout the year, determine how wind patterns affect ventilation, and calculate the best materials for insulation and cost efficiency. What once took entire teams weeks of analysis can now happen in minutes, allowing human designers to focus on vision, aesthetics, and experience rather than technical constraints.</p><p>At the heart of this transformation lies Building Information Modeling (BIM) a digital framework that integrates geometry, spatial relationships, geographic data, and performance information into a single coherent model. When combined with AI, BIM becomes far more than a static database; it evolves into a living digital twin of a building capable of learning, predicting, and optimizing throughout the building’s lifecycle. This synergy between AI and BIM is revolutionizing how architects conceptualize, design, construct, and maintain buildings.</p><p>As we move further into the era of intelligent design, the collaboration between human architects and AI systems represents a paradigm shift. Rather than replacing human creativity, AI serves as a co-creator and advisor, helping professionals push the boundaries of design innovation while ensuring projects remain efficient, sustainable, and safe. The result is an architectural practice that not only reflects our technological progress but also anticipates the needs of a rapidly changing world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*71HO-4OGG1FKab6ZoKWWjg.png" /></figure><h4>AI in Architecture: Beyond Automation</h4><p>Artificial Intelligence in architecture goes far beyond the automation of routine drafting or documentation tasks. While traditional design software made architects faster, AI makes them smarter augmenting human creativity with data-driven insight, computational intelligence, and predictive foresight. The true potential of AI lies in its ability to process vast amounts of information, recognize patterns that might escape the human eye, and translate that knowledge into actionable design intelligence. In essence, AI serves not as a replacement for the architect but as an intelligent partner that enhances decision-making throughout the design and construction process.</p><p>Below are some of the most transformative ways AI is redefining modern architecture.</p><h4>1. Generative Design: Co-Creating with Algorithms</h4><p>Generative design represents one of the most revolutionary intersections of AI and architecture. Instead of manually drafting every element of a building, architects can now define parameters and goals such as maximizing daylight, reducing structural load, improving airflow, or minimizing construction costs and let AI algorithms generate thousands of optimized design variations.</p><p>These AI systems rely on machine learning and evolutionary algorithms to test, analyze, and evolve design options based on performance metrics. The result is a wide spectrum of innovative possibilities, many of which would be difficult or time-consuming for humans to conceive manually.</p><p>For instance, Autodesk’s generative design tools have been used in large-scale projects where AI produces complex yet efficient structures, balancing aesthetics with functionality. Architects can then select the best designs based on data-driven insights rather than subjective intuition alone. In this way, AI becomes a creative collaborator, expanding the boundaries of what is possible in architectural design.</p><h4>2. Predictive Analysis and Energy Efficiency</h4><p>Energy efficiency is no longer just a design preference it’s a global necessity. AI is playing a pivotal role in helping architects predict and improve a building’s performance long before construction begins. Using historical climate data, real-time environmental inputs, and material performance simulations, AI models can forecast how a building will behave under various conditions.</p><p>For example, AI can simulate how sunlight interacts with a façade throughout the year, allowing architects to optimize shading devices, window placement, and materials to minimize energy use. It can also model airflow to improve ventilation efficiency, predict energy consumption patterns, and suggest renewable energy integrations. This predictive capability aligns with the principles of sustainable design, ensuring that every architectural decision supports environmental responsibility and long-term cost savings.</p><p>In addition, AI-based systems such as digital twins virtual replicas of real-world buildings can continuously monitor a building’s energy performance after construction. These systems learn from operational data to provide feedback for future designs, making architecture an evolving and intelligent discipline rather than a static one.</p><h4>3. Smart Construction and Safety</h4><p>AI’s influence extends well beyond the design studio onto the construction site itself. Through a combination of robotics, computer vision, and data analytics, AI enhances safety, accuracy, and efficiency during the building phase.</p><p>AI-powered drones and cameras can monitor construction progress in real time, comparing on-site activity with digital plans to detect deviations or potential issues early. Computer vision algorithms are capable of identifying safety risks such as missing safety equipment or structural instability before accidents occur. Robots equipped with AI guidance systems can handle repetitive or dangerous tasks such as bricklaying, welding, or material handling, allowing human workers to focus on higher-level problem solving.</p><p>These innovations not only reduce human error and increase precision but also shorten construction timelines and lower costs. The integration of AI into the construction process represents a shift toward smart construction ecosystems, where every decision is supported by continuous feedback and predictive intelligence.</p><h4>4. Enhanced Collaboration and Workflow</h4><p>Architecture is inherently collaborative, involving architects, engineers, contractors, and clients. However, miscommunication or data silos often lead to costly errors and delays. AI is addressing this challenge by enabling intelligent, data-connected workflows.</p><p>Modern AI tools integrate seamlessly with Building Information Modeling (BIM) systems to ensure that every stakeholder accesses the same real-time information. Machine learning algorithms can analyze vast amounts of project data to identify inefficiencies, flag potential design conflicts, and suggest workflow optimizations. Natural language processing (NLP) technologies even allow AI systems to interpret written project documents and automatically update digital models or schedules.</p><p>For example, AI can automatically detect inconsistencies between structural and mechanical drawings or predict where coordination issues might arise in future project phases. By streamlining communication and coordination, AI helps teams work smarter and faster, ensuring fewer misunderstandings and reworks.</p><h4>AI and BIM: A Perfect Match</h4><p>Among all technological advancements in architecture, Building Information Modeling (BIM) has had perhaps the most profound impact. BIM serves as a digital backbone of modern architecture a shared 3D environment that represents both the physical and functional characteristics of a building. It’s used throughout the building’s lifecycle, from conceptual design to demolition, allowing architects, engineers, and contractors to collaborate using a single, data-rich model.</p><p>Traditionally, BIM systems required manual data input, constant coordination, and frequent updates across multiple stakeholders. This process, while powerful, was time-consuming and prone to human error. Today, the integration of AI into BIM is making the system far more intelligent, predictive, and automated.</p><h4>Example: AI-Enhanced BIM in Practice</h4><p>Imagine a large commercial project a multi-story office complex in a busy city center. Traditionally, architects would need to coordinate designs with structural, electrical, and plumbing engineers, ensuring that every pipe, wire, and beam aligns perfectly. A small change in one system could cause a ripple effect throughout the model, requiring weeks of revisions.</p><p>With AI-integrated BIM, this complexity becomes far more manageable.</p><ul><li><strong>Automated Clash Detection:</strong><br> AI algorithms continuously scan the 3D model to detect and resolve conflicts such as an HVAC duct intersecting a structural beam automatically suggesting alternative routes or adjustments before construction begins.</li><li><strong>Predictive Cost and Schedule Estimation:</strong><br> Machine learning models analyze past project data, material prices, and regional market trends to produce accurate cost estimates and construction timelines. This predictive power allows architects and project managers to make informed financial decisions early in the process.</li><li><strong>Sustainability Optimization:</strong><br> AI embedded within BIM evaluates environmental performance indicators such as daylight exposure, energy consumption, and material life cycles. It can recommend greener materials or design modifications to reduce waste and improve energy efficiency.</li><li><strong>Facility Management and Post-Construction Intelligence:</strong><br> Even after the building is complete, AI-enhanced BIM continues to add value. It integrates with IoT sensors to monitor building systems in real time, predicting when maintenance is required like identifying HVAC issues before they escalate. Over time, the BIM model becomes a “living digital twin,” learning from operational data and improving efficiency throughout the building’s lifespan.</li></ul><h4>Benefits of AI in Architectural Practice</h4><p>The integration of Artificial Intelligence (AI) with Building Information Modeling (BIM) is not just a technological upgrade it represents a fundamental shift in how architects conceive, design, and manage the built environment. AI’s ability to analyze data, learn from patterns, and make predictive suggestions translates directly into tangible benefits across the architectural workflow. From concept design to post-occupancy management, AI enhances every stage of the process, enabling more informed decisions, optimized outcomes, and sustainable innovation.</p><p>Below are some of the most impactful benefits AI brings to architectural practice.</p><h4>1. Increased Design Efficiency</h4><p>Traditionally, much of an architect’s time was consumed by technical drafting, data entry, and coordination tasks. AI revolutionizes this workflow by automating repetitive processes such as model generation, code compliance checks, and spatial optimization. This automation allows architects to focus more on creativity, vision, and problem-solving, rather than tedious manual work.</p><p>For instance, AI-driven design assistants can quickly produce multiple design options based on set parameters like budget, sunlight exposure, or structural integrity and rank them according to performance metrics. This reduces the time needed for iteration while ensuring every decision aligns with both aesthetic and functional goals. In essence, AI transforms the design process from a linear sequence into an interactive dialogue between human creativity and machine intelligence.</p><h4>2. Reduced Errors and Costs</h4><p>In large architectural projects, even small mistakes can have cascading effects leading to cost overruns, delays, and safety concerns. AI dramatically reduces these risks through continuous, automated error detection and predictive analysis.</p><p>Using AI-integrated BIM systems, inconsistencies between design elements (for example, a plumbing line intersecting a load-bearing column) can be identified instantly, long before construction begins. Similarly, predictive algorithms can forecast potential scheduling delays or cost fluctuations based on historical and market data, allowing project managers to take preventive action.</p><p>The result is a significant reduction in rework, material waste, and unforeseen expenses, leading to smoother project delivery and stronger client trust. AI thus plays a key role not only in precision design but also in the financial sustainability of architectural projects.</p><h4>3. Data-Driven Decision Making</h4><p>Architecture has traditionally relied heavily on the experience and intuition of designers. While intuition remains invaluable, AI enhances it with quantitative insights derived from massive datasets.</p><p>Machine learning models can analyze environmental data, historical building performance, and user behavior patterns to inform design decisions. For example, AI might reveal that office layouts with specific lighting and ventilation patterns lead to higher employee productivity or well-being. Similarly, by analyzing thousands of previous projects, AI can predict which design features are most likely to achieve desired sustainability or acoustic outcomes.</p><p>This approach transforms architecture into an evidence-based discipline, where decisions are guided by data, simulations, and performance predictions ultimately leading to designs that are not only visually appealing but also optimized for human comfort, energy efficiency, and long-term durability.</p><h4>4. Sustainability and Compliance</h4><p>As global concerns about climate change and resource depletion grow, sustainable architecture is no longer optional it’s essential. AI is becoming an indispensable tool for achieving these goals.</p><p>By simulating the energy performance of buildings under varying conditions, AI can identify inefficiencies and suggest greener design alternatives. For instance, it can optimize window placement for natural light, recommend materials with lower embodied carbon, or model the long-term impact of renewable energy systems.</p><p>AI can also assist in meeting green building certification standards such as LEED, BREEAM, or WELL, automatically checking whether the design complies with sustainability benchmarks. This not only ensures environmental responsibility but also enhances a building’s market value and long-term resilience.</p><p>Ultimately, AI enables architects to design with climate intelligence producing structures that harmonize with their environment rather than work against it.</p><h4>5. Lifecycle Management and Smart Maintenance</h4><p>Perhaps one of the most underappreciated advantages of AI in architecture is its role beyond construction. Buildings are living systems that evolve over time, requiring maintenance, renovation, and adaptation. AI ensures data continuity throughout this lifecycle, linking the design and construction stages with facility management and operations.</p><p>AI-enhanced BIM systems act as dynamic “digital twins,” continuously updated with real-time data from sensors embedded in the building. These systems can predict maintenance needs such as when an HVAC unit is likely to fail based on usage patterns and environmental conditions. They can even optimize cleaning schedules, energy consumption, and space utilization automatically.</p><p>This ongoing feedback loop helps architects and facility managers make proactive decisions, reducing downtime, extending equipment life, and improving occupant comfort. The result is a holistic architectural ecosystem where the building is continuously optimized from conception to demolition.</p><h4>Conclusion</h4><p>Artificial Intelligence is redefining architecture as both an art form and a scientific discipline. By integrating AI into systems like Building Information Modeling (BIM), architects gain the ability to visualize, analyze, and optimize projects with unprecedented intelligence. The result is a practice that is not only faster and more efficient but also deeply informed, adaptive, and sustainable.</p><p>Rather than replacing human creativity, AI amplifies it. The architect of the future will not compete with algorithms they will collaborate with them, leveraging AI as a design partner that offers insights, predictions, and inspiration. Buildings will no longer be static objects but living, learning systems that respond intelligently to their environment and users.</p><p>As architecture becomes increasingly data-driven, AI will remain the invisible yet indispensable partner behind every great design helping humanity imagine, design, and construct the future more intelligently than ever before.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=05644ebab98e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>