<?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 Manali_Raut on Medium]]></title>
        <description><![CDATA[Stories by Manali_Raut on Medium]]></description>
        <link>https://medium.com/@manaliraut2?source=rss-5e1df4429bd7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ZcptHzvQdh75_bhRb5jkpw.jpeg</url>
            <title>Stories by Manali_Raut on Medium</title>
            <link>https://medium.com/@manaliraut2?source=rss-5e1df4429bd7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 07:31:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manaliraut2/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[Exploring the World of NLP]]></title>
            <link>https://manaliraut2.medium.com/exploring-the-world-of-nlp-2a87afe05adf?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/2a87afe05adf</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[language-learning]]></category>
            <category><![CDATA[machine-learning-for-nlp]]></category>
            <category><![CDATA[nlp-trends-2024]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Tue, 30 Jul 2024 06:29:01 GMT</pubDate>
            <atom:updated>2024-07-30T06:29:46.235Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Exploring the World of NLP — Introduction to NLP : Part 1</strong></h3><p>Hello, audience! After a year-long hiatus, I am thrilled to reignite my passion for writing and take you on a new journey with me. The past year has been a whirlwind of experiences 🥰, quite the opposite of the life I described in my last blog. Through ups and downs, I discovered a newfound enthusiasm that has inspired me to return to the world of blogging with a fresh perspective.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGfuwMu4XZIrdp9Rw6yL8Q.gif" /><figcaption>created by me</figcaption></figure><p>Today, I am diving into a topic that has captivated my curiosity — Natural Language Processing (NLP). My keen interest in the intricate ways machines understand and interpret human language has driven me to explore this fascinating field. Through this blog series, I aim to share with you a comprehensive and insightful exploration of NLP. Whether you’re a seasoned expert or a curious newcomer, I promise a deep dive into the concepts, techniques, and real-world applications of NLP that will enrich your understanding and spark your interest. Let’s embark on this journey together and unlock the power of language!</p><h4><strong>1. What is Natural Language Processing (NLP)</strong></h4><p>Natural Language Processing (NLP) is a subfield of artificial intelligence (AI) that focuses on the interaction between computers and humans through natural language. The goal of NLP is to enable machines to understand, interpret, and generate human language in a way that is both meaningful and useful. This involves various computational techniques to analyze and synthesize natural language and speech.</p><h4>2. <strong><em>The Evolution of NLP</em></strong></h4><p>The evolution of Natural Language Processing (NLP) reflects the broader advancements in computational linguistics and artificial intelligence over the decades. Historically, NLP began with rule-based systems in the early days, where experts manually crafted linguistic rules to process and understand text. These systems, prevalent in the 1950s and 1960s, were limited in scalability and flexibility but laid the groundwork for future developments. The 1980s and 1990s marked a significant shift as the field moved towards statistical models, leveraging large text corpora to derive probabilistic approaches that improved accuracy and adaptability. This era saw the advent of techniques like Hidden Markov Models (HMMs) and the application of early machine learning algorithms to NLP tasks.</p><p>The most transformative phase came in the 21st century with the rise of machine learning and deep learning, which revolutionized NLP. Neural network-based methods, particularly deep learning, allowed models to automatically learn and extract intricate patterns and representations from vast amounts of data. Key innovations like Word2Vec and GloVe introduced word embeddings that captured semantic meanings, while the development of transformer architectures such as BERT and GPT significantly enhanced the performance and capabilities of NLP systems. Today, NLP continues to evolve rapidly, driven by these advanced AI techniques and the availability of big data, pushing the boundaries of what machines can achieve in understanding and generating human language.</p><h4><em>3. </em><strong><em>Key Aspects of NLP</em></strong></h4><ol><li><strong>Text Preprocessing</strong>: Preparing raw text for analysis by cleaning, tokenizing, stemming, lemmatizing, and removing stop words.</li><li><strong>Syntax and Semantics</strong>: Analyzing the grammatical structure of sentences (syntax) and understanding the meaning of words and sentences (semantics).</li><li><strong>Language Modeling</strong>: Building models that can predict the probability of a sequence of words, which is essential for applications like text generation and machine translation.</li><li><strong>Information Extraction</strong>: Automatically extracting structured information from unstructured text, such as named entity recognition (identifying names, dates, locations) and relation extraction.</li><li><strong>Machine Translation</strong>: Translating text or speech from one language to another using statistical or neural machine translation techniques.</li><li><strong>Sentiment Analysis</strong>: Determining the sentiment or emotional tone behind a body of text, often used in social media monitoring and customer feedback analysis.</li><li><strong>Speech Recognition</strong>: Converting spoken language into text using automatic speech recognition (ASR) systems.</li><li><strong>Natural Language Generation (NLG)</strong>: Generating human-like text from data, used in applications like chatbots and content creation.</li></ol><h4><strong><em>4.Why is NLP Trending Now?</em></strong></h4><p>Natural Language Processing (NLP) is experiencing a surge in popularity and relevance due to a combination of technological advancements and its profound impact on various industries. The improvements in computational power and sophisticated algorithms have enabled the development of more efficient and accurate NLP models. The advent of big data has played a crucial role in this progress, providing the vast amounts of textual information necessary to train these models effectively. As a result, NLP systems can now process and understand human language with unprecedented accuracy and nuance.</p><ol><li><strong><em>Technological Advancements<br></em></strong>The technological landscape has dramatically evolved, with significant improvements in both hardware and software. Modern GPUs and TPUs provide the computational power needed to train complex NLP models quickly and efficiently. Additionally, advancements in algorithms, particularly the development of deep learning architectures like transformers, have revolutionized the field. These improvements have led to NLP models that are more powerful, scalable, and capable of handling a wide range of linguistic tasks.</li><li><strong><em>The Advent of Big Data</em><br></strong>The explosion of digital data has been a game-changer for NLP. The availability of vast amounts of text from social media, websites, and other digital platforms has provided the raw material needed to train sophisticated models. Big data enables NLP systems to learn from diverse and extensive datasets, enhancing their ability to generalize and perform well in real-world scenarios. This abundance of data has driven the development of more accurate and robust NLP applications.</li><li><strong><em>Applications and Impact<br></em></strong>NLP’s real-world applications are vast and varied, making it an indispensable tool across numerous sectors. Chatbots and virtual assistants, like Siri and Alexa, rely on NLP to understand and respond to user queries effectively. Sentiment analysis tools help businesses gauge customer emotions and opinions from social media and reviews. Machine translation services, such as Google Translate, use NLP to break down language barriers, enabling seamless communication across different languages. The impact of NLP is evident in case studies from various industries, showcasing its ability to improve customer service, streamline operations, and enhance decision-making processes. For instance, financial institutions use NLP to analyze market sentiment, while healthcare providers employ it to extract valuable insights from medical records.</li></ol><p>NLP’s trending status is a testament to its transformative potential in understanding and leveraging human language, driving innovation, and creating new opportunities across diverse fields.</p><p>Looking for a way to support my learning journey? <a href="https://bmc.link/manaliraut">Buy me a book </a>and be a part of my intellectual growth! 📚🌱</p><h4>5. NLP in Everyday Life</h4><p>Natural Language Processing (NLP) has seamlessly integrated into our daily routines, making technology interactions more intuitive and efficient. From personal assistants to automated customer service and content recommendations, NLP powers many tools and services that enhance our everyday experiences.</p><p><strong><em>1. Personal Assistants<br></em></strong>Virtual personal assistants like Siri, Alexa, and Google Assistant are prime examples of NLP in action. These smart assistants understand spoken language, process commands, and provide relevant responses or actions. Whether setting reminders, playing music, answering questions, or controlling smart home devices, these assistants leverage advanced NLP algorithms to interpret and respond to user queries accurately and contextually.</p><p><strong><em>2. Customer Service<br></em></strong>NLP-driven automated chatbots and support systems have revolutionized customer service by providing instant, 24/7 assistance. These chatbots can handle a wide range of customer inquiries, from answering frequently asked questions to troubleshooting issues and processing transactions. By understanding and generating human language, they enhance customer experience, reduce wait times, and free human agents to handle more complex tasks. Companies across various industries, including banking, e-commerce, and telecommunications, have adopted these systems to improve their customer service efficiency and satisfaction.</p><p><em>3. </em><strong><em>Content Recommendations<br></em></strong>NLP plays a crucial role in personalized content delivery on platforms like Netflix and YouTube. These platforms use NLP to analyze user preferences, viewing history, and search queries to recommend movies, shows, and videos tailored to individual tastes. By understanding the content’s context and the user’s behavior, these recommendation systems enhance user engagement and satisfaction, helping users discover new content that aligns with their interests.</p><h4>6. Challenges in NLP</h4><p>Natural Language Processing (NLP) has made significant strides in recent years, but it still faces several challenges that impede its ability to fully and accurately understand and generate human language. Two of the most prominent challenges are ambiguity and context understanding, and bias in NLP models.</p><ol><li><strong><em>Ambiguity and Context Understanding<br></em></strong>One of the primary challenges in NLP is the inherent complexity and ambiguity of human language. Words and sentences can have multiple meanings depending on the context in which they are used. For example, the word “bank” can refer to a financial institution, the side of a river, or even the act of tilting an airplane. Similarly, sentences like “The old man the boats” showcase syntactic ambiguity that can confuse NLP systems. Context understanding is crucial for accurately interpreting and generating language, but it remains a difficult task for NLP models. These models often struggle to maintain coherence and relevance over longer texts and conversations. Despite advancements in deep learning and transformer architectures like BERT and GPT, understanding the full context and nuances of human language, including idiomatic expressions, cultural references, and implicit meanings, remains a significant hurdle.</li><li><strong><em>Bias in NLP Models<br></em></strong>Another critical challenge in NLP is the presence of bias in models. NLP systems learn from large datasets that often contain biases reflecting societal prejudices and stereotypes. As a result, these models can inadvertently perpetuate and amplify these biases, leading to unfair and discriminatory outcomes in applications such as hiring, law enforcement, and customer service. Addressing bias in NLP involves multiple strategies, including careful dataset curation, algorithmic fairness techniques, and continuous monitoring and evaluation of deployed models. Ensuring fairness requires a concerted effort to identify and mitigate biases at every stage of the model development pipeline. Researchers and practitioners are increasingly focused on developing methods to detect, reduce, and eliminate bias to create more equitable and just NLP applications.</li></ol><h4><strong>7. The Future of NLP</strong></h4><p>The future of Natural Language Processing (NLP) is poised for exciting developments as emerging trends and new technologies continue to push the boundaries of what machines can achieve in understanding and generating human language. These advancements promise to further transform industries and everyday life, enhancing interactions, automating processes, and unlocking new possibilities.</p><p><strong>Emerging Trends</strong></p><ol><li><strong><em>Multimodal NLP<br></em></strong>Integrating text with other data types such as images, audio, and video, multimodal NLP aims to develop models that can understand and generate content across different modalities. This trend is expected to enhance applications like virtual assistants, making them more intuitive and context-aware.</li><li><strong><em>Few-Shot and Zero-Shot Learning<br></em></strong>Traditional NLP models require vast amounts of labeled data to perform well. Emerging techniques in few-shot and zero-shot learning aim to train models with minimal or even no labeled data, significantly reducing the resources needed for model training and expanding NLP’s applicability to new domains quickly.</li><li><strong><em>Explainable AI in NLP</em><br></strong>As NLP systems become more complex, there is a growing demand for transparency and interpretability. Explainable AI (XAI) in NLP focuses on making model decisions understandable to humans, which is crucial for applications in sensitive areas such as healthcare and finance, where understanding the reasoning behind a model’s output is essential.</li><li><strong><em>Ethical and Fair NLP</em><br></strong>Addressing biases and ensuring fairness in NLP models is a critical trend. Researchers are increasingly focusing on developing techniques to detect, mitigate, and prevent biases in NLP systems to create more equitable technologies.</li><li><strong><em>Advancements in Transformers and Beyond<br></em></strong>While transformer architectures like BERT and GPT have revolutionized NLP, ongoing research aims to develop even more powerful models. Innovations may include more efficient transformers, models with better long-term dependency handling, and architectures that are more computationally efficient and environmentally friendly.</li></ol><p><strong>Potential Impact</strong></p><ol><li><strong><em>Enhanced Human-Computer Interaction</em><br></strong>Future NLP technologies will make interactions with computers more natural and intuitive. From more responsive virtual assistants to advanced conversational agents capable of understanding context and emotions, these improvements will make technology more accessible and user-friendly.</li><li><strong><em>Healthcare Transformation</em><br></strong>NLP can revolutionize healthcare by enabling more efficient patient data analysis, improving diagnostic accuracy, and providing personalized treatment recommendations. NLP-driven systems can analyze clinical notes, research papers, and patient interactions to support healthcare professionals in delivering better care.</li><li><strong><em>Education and Learning<br></em></strong>Adaptive learning platforms powered by NLP can provide personalized education experiences, helping students learn more effectively by tailoring content to their needs and providing real-time feedback. NLP can also assist in automated grading and detecting plagiarism.</li><li><strong><em>Business and Customer Service<br></em> </strong>NLP will continue to enhance customer service through more sophisticated chatbots and automated support systems. Businesses can leverage NLP for better market analysis, sentiment analysis, and customer feedback interpretation, leading to more informed decision-making and improved customer satisfaction.</li><li><strong><em>Accessibility and Inclusion<br></em></strong>NLP advancements can significantly improve accessibility for people with disabilities. For instance, real-time speech-to-text transcription, language translation, and text summarization can help individuals with hearing impairments, language barriers, or learning disabilities access information and communicate more effectively.</li></ol><h4>8. Conclusion</h4><p>I couldn’t be more thrilled 🤠to embark on this journey into the fascinating world of Natural Language Processing (NLP)! It’s like finding 👀a treasure map that leads to endless possibilities, and I can’t wait to explore every hidden gem. From decoding the intricacies of human language to building smarter chatbots, the adventure is bound to be exhilarating. Imagine teaching a computer to understand puns — it’s like trying to explain a joke to your dog, but way more rewarding!</p><p>Buckle up, dear readers, as we dive deep into the wonders of NLP. As they say, “To err is human, but to really foul things up you need a computer” — so let’s have some fun with it!</p><p><em>Stay tuned!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a87afe05adf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I don’t have a good Career, is it okay to survive in this world?]]></title>
            <link>https://manaliraut2.medium.com/i-dont-have-a-good-career-is-it-okay-to-survive-in-this-world-ae70daa87a21?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae70daa87a21</guid>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[career-goals]]></category>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[depression]]></category>
            <category><![CDATA[self-love-courage]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Tue, 18 Jul 2023 04:06:44 GMT</pubDate>
            <atom:updated>2023-07-18T04:06:44.139Z</atom:updated>
            <content:encoded><![CDATA[<p>I’m blaming Medium for this who always asks me to tell more about myself to the world. So, here I go. Read at your own risk !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VdpNMjmbGEWEcT8P" /><figcaption>Photo by <a href="https://unsplash.com/@sseeker?utm_source=medium&amp;utm_medium=referral">Stormseeker</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>As I look back at the last 10 years of my life, I must admit that I haven’t made the progress I had hoped for. I know its too embarrassing to say it out loud but I believe in being truthful, both to my readers and myself. However, I am feeling lucky as you cannot see my face in this embarrassing moment.😶‍🌫️</p><p>I wonder sometimes how my alter ego is doing in the parallel universe? Have I become a Movie Star, a Brilliant Scientist, a Mesmerizing Dancer, World Traveler, Business Woman, an Engineering Scholar or the member of famous Kpop group, though my singing abilities are just beyond anyone’s imagination🤐.. still I have imagine it… Why?</p><p>Because these life roles have always been the dreams of my life. They ignite a fire within me and fill my heart with passion and excitement. The mere thought of pursuing one of these dreams in a parallel universe brings joy of fulfilment to me!! Later on, I began to think that whatever I may be doing in that parallel universe, it could possibly be even better than my current reality.</p><p><strong>If </strong>not performing one of theses roles then what I am doing in this life?<br>Ohh! Hey! Don’t expect an easy answer …I am still working on it. Well, let’s just say I’m a bit of a multi-tasker. In my <strong>“trying 20 different things”, </strong>I have figured out above things and many more. Now exploring various passions to diving into the these new experiences, I’m keeping an open mind and embracing the journey of self-discovery.</p><p>What keeps me falling short? or we can say<strong> “Learn from me how to murder your career goals”?</strong> Enter the realm of my bad habits.</p><ol><li><strong><em>Trying everything, mastering nothing </em></strong>— that’s a bad habit I’ve fallen into. I remember there was a time I used to keep my “task plate” with full of “task menus”. Just like when you fill your food plate with a lot of food at a buffet and struggle to finish it all, I found myself in a similar situation with my daily schedule. I couldn’t share my time equally among all my tasks, resulting in exhaustion and depression. However, I’ve now adopted a “diet” for my tasks, where I’ve trimmed down my menus. Although the number of tasks is fewer, they nourish me, keep me healthy.</li><li><strong><em>Consistency has been a recurring challenge for me</em></strong> — a persistent bad habit that hinders my progress. I often find myself starting strong but struggling to maintain a steady rhythm. But I keep pushing myself. To keep myself steady I have even written a blog on it. It was all about me.🥶 You can find it <a href="https://manaliraut2.medium.com/why-small-steps-lead-to-big-results-b24585f226c5">here</a>.</li><li><strong><em>Stubborn heart that thinks it knows best </em></strong>— a notorious bad habit that has caused me both frustration and missed opportunities. This rebellious organ of mine often insists on following its own desires, disregarding logic and reason. It clings to familiarity and resists change, even when it’s clear that embracing new paths could lead to growth and fulfillment. What I can say more, its a work in progress to guiding my heart towards embracing the possibilities that lie ahead.</li><li><strong><em>Lady Hulk Syndrome</em></strong> — a peculiar bad habit that has left me feeling like a perpetually angry force to be reckoned with. It seems like even the tiniest inconveniences can trigger a fiery rage within me, transforming me into an unstoppable force of anger. Here is also a lot of work in progress to replace the fire in my mouth with the sweetness of honey.<br>Through self-awareness, mindfulness practices, and a conscious effort to channel my emotions in healthier ways, I am learning to tame the Lady Hulk within.</li><li><strong><em>Shiny Object Syndrome</em> </strong>—whether it’s a captivating project, an exciting opportunity, or a fascinating idea, I find myself easily distracted, chasing after the next shiny object that enters my field of vision. This tendency to veer off course can lead to scattered focus and unfinished endeavors. However, I’m actively working on taming this syndrome by cultivating discipline or by simply conditioning myself to think about an ideas for next 10 days with same passion and excitement. If on 11th day, I feel the same for it. I will work on it.</li><li><strong><em>Saving best for the last </em></strong>— I have the habit to save best for the last the way some keep sweet in their plate for the last bite. But when we reach to the last bite we get already full with all other spicy, salty food and cannot enjoy the last bite the way we wanted. It’s a reminder that life’s pleasures should be savored along the way, rather than postponed to an uncertain future. So, I am going to embrace the joy of the present now on indulging in each experience with gusto, rather than saving it for a moment that may never arrive.</li><li><strong><em>Above 30 and Single</em></strong> —not a bad habit, but yes, being above 30 and single is undoubtedly a heinous crime against humanity! How dare I commit such an offense against societal expectations? Clearly, I deserve a place in Azkaban for this unforgivable act. This article won’t be enough for this topic perhaps I should write a book titled “The Outrageous Chronicles of Surviving in Your 30s without Succumbing to Marriage Pressure”. Oops!! I exposed my age here🫣. The womanhood vow to “never reveal our true age” is forgotten for a moment.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*f-YNZrKmPYinfwmg" /><figcaption>Photo by <a href="https://unsplash.com/@coopery?utm_source=medium&amp;utm_medium=referral">Mohamed Nohassi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I want to make it clear that I don’t want you to think of me as a bad or lazy person, even though I must confess that I can be a little laid-back at times. I also have some good habits that contribute to my overall well-being and growth.</p><ol><li><strong><em>Truthful to myself, never lie to self:</em></strong> one of my commendable habits is being truthful to myself. I never feel shy from acknowledging when I am not doing well or falling short. In those moments, I find solace in shedding a few tears, privately embracing my emotions, and gathering the strength to uplift and inspire myself.</li><li><strong><em>Avoid negative self-talk :</em></strong> I don&#39;t remember now since I pursue this habit, but this and above is the extreme strength of mine. I firmly believe in the power of self-kindness and the impact it has on our well-being. Instead of criticising myself for small small things, I choose to embrace a more compassionate approach to overcome challenges with a confident and positive mindset.</li><li><strong><em>Don’t give up even when the odds seemed stacked against me</em></strong> — This is the moment where you play “Unstoppable” by Sia. Like being the underdog in an epic movie, facing impossible challenges with a mischievous grin, I embrace the spirit of a determined hero, refusing to let setbacks or doubts deflate my superpowers. So, bring it on, universe! I’m ready to show you what an unstoppable force of awesomeness looks like!</li><li><strong><em>Back up plan</em></strong> — Because let’s face it, life loves throwing surprises our way! While I am adding this into the list you might be thinking, “Hey, Manali, with all these skills, why haven’t you pursued a backup career?” Well, let me tell you, my backup plan lies in the art of home-making, daily scheduling, come up with multitasking, doing graphics, etc, etc or I maybe be saving my backup career as a secret weapon for when the world desperately needs a superhero with impeccable scheduling skills and a knack for home-making and effortlessly multitasking like a boss. Until then, let’s just say I’m honing my skills in the greatest training ground of all — life’s unpredictable and wonderfully chaotic journey!</li></ol><p>Above is like only 10% of me, I am far beyond this article. It’s okay to laugh about above now, but I can’t deny those moments when I cried alone, feared but faced, went through sleepless nights, moment were I felt like I won’t see the morning next day, but I am still fine. I actually feel proud on myself that survived through many things. Now a days when I have thought that am I in depression? Then my mind be like : “Naah!! you have passed that phase. Watch a movie, eat your favorite food n sleep for 9 hours, you will be fine and rocking next day.” This is the easiest and most effective solution I have found for my bad days.</p><p>I don’t understand why do we need to sparkles at every moment of our life? I mean moon also doesn’t have it’s own light but have you seen how beautiful it look behind dark clouds!!!</p><p>Also, as if I’ve defied the laws of nature by not having a ring on my finger, is the time has really passed? I mean what’s wrong in waiting for your soulmate, even the God Vitthal is also still waiting for someone to arrive by standing on the brick.</p><p>And as for the career, maybe I am not doing good in people’s eye but I am well satisfied where I stand. I have my ideas and plans to work on and visit to the life’s surprising destinations. If I destined to fall I will make sure to fall foreword every time using each stumble as a stepping stone to propel me closer to my dreams. After all, even the humble turtle triumphs over the swift rabbit in its own time.</p><p>Here, I took a chance to accept and say it out loud that “I am not doing good in life” and I am perfectly fine with it. Success is not solely defined by career achievements, but rather by personal growth, happiness, and the relationships we foster along the way. So, I dare to dream big and embrace the boundless possibilities, knowing that in this parallel universe, I may just be rocking, dancing, researching, and achieving greatness beyond my wildest imagination.</p><p>While writing this article, I realized to survive in this world, a good career is not much needed but the passion is, that passion which will make you forget time, age and everything. So to keep my life’s adventure alive, I’ve made a pact with myself to take on monthly challenges. Whether it’s learning a new skill, exploring uncharted territories, or stepping out of my comfort zone, I’m diving headfirst into a sea of thrilling experiences.</p><blockquote>If you’re looking for a meaningful way to support me on my journey, <a href="https://bmc.link/manaliraut">buying me a book</a> that resonates with my aspirations would be a truly cherished gift.</blockquote><p>So let’s raise a toast 🥂 to acceptance, my friend! I’m have confessed that I’m a masterpiece in progress. If you’re soaring higher than me, bravo! If you’re still figuring it out, afraid not, for we’re all on our unique paths. Whether we crawl, hop, or sprint, the beauty lies in the journey itself. Place your hand on your heart and feel the beating rhythm of resilience and courage. It’s a reminder that you’re alive, thriving, and capable of greatness.</p><p>Ever grateful, I cherish life’s blessings.!!<br>Thank you so much for making till here!! <br>You can comment your favorite quote to inspire me…n those who read this.<br>Have a <strong>Great Life</strong> ahead!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae70daa87a21" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sentiment Analysis of Genuine Customer Feedback in Amazon Book Reviews — LazyPredict Inspired…]]></title>
            <link>https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-lazypredict-inspired-part-3-cbb61f182fb2?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/cbb61f182fb2</guid>
            <category><![CDATA[lazy-predict]]></category>
            <category><![CDATA[amazon-review-analysis]]></category>
            <category><![CDATA[sentiment-analysis-python]]></category>
            <category><![CDATA[machine-learning-models]]></category>
            <category><![CDATA[vader-sentiment-analysis]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Mon, 17 Jul 2023 04:10:11 GMT</pubDate>
            <atom:updated>2023-07-17T04:10:11.285Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sentiment Analysis of Genuine Customer Feedback in Amazon Book Reviews — LazyPredict Inspired {Part 3}</h3><p>Welcome back to my blog series on <strong>Sentiment Analysis of Genuine Customer Feedback in Amazon Book Reviews</strong>! If you’ve been following along, you’ve already gained insights from <a href="https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-eda-part-1-c9179515bad4">Part 1</a>, where we explored the world of exploratory data analysis (EDA), and <a href="https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-nlp-vader-part-2-624d95dde614">Part 2</a>, where we dived into the fascinating realm of Natural Language Processing (NLP) and the powerful VADER sentiment analysis tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jf7lsLlO_p_OMYdVGnF6cQ.png" /><figcaption>Image created by Author</figcaption></figure><p>In Part 3, we will shift our focus to a crucial aspect of sentiment analysis, F<strong>inding the best algorithms for sentiment classification</strong>. Sentiment analysis plays a pivotal role in understanding customer opinions and feedback, especially in the context of Amazon reviews where valuable insights can shape business decisions.</p><ol><li>Introduction</li><li>Importance of Algorithm Selection</li><li>LazyPredict</li><li>LazyPredict Inspired Class for Multiclass Sentiment Analysis</li><li>Evaluation of Best Algorithms</li><li>Analysis of Algorithm Performance</li></ol><p>Note: If you haven’t read <a href="https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-eda-part-1-c9179515bad4">Part 1</a> and <a href="https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-nlp-vader-part-2-624d95dde614">Part 2</a> yet, I highly recommend checking them out to gain a comprehensive understanding of the exploratory data analysis and NLP techniques I have applied to the Amazon books review dataset.</p><p>Alright, folks, here we go again, for the third time!🤠</p><h4><strong>I. Introduction</strong></h4><p>When it comes to sentiment analysis of text data, choosing the right algorithms can be quite a daunting task, especially in <strong>multiclass classification </strong>scenarios. We all want is accurate and efficient machine learning models that can handle the complexities of classifying sentiments across multiple categories.</p><p>During my exploration, I stumbled upon a fascinating machine learning tool called “<strong>LazyPredict</strong>” which caught my attention. However, there was a slight hiccup — it is primarily designed for binary classification tasks. So, I created my own version inspired by LazyPredict, specifically tailored for multiclass classification.</p><h4><strong>II. Importance of Algorithm Selection</strong></h4><p>The selection of the right algorithm is crucial in any machine learning task, and sentiment analysis is no exception. The choice of algorithm can significantly impact the accuracy and performance of the sentiment analysis model. Different algorithms have their strengths and weaknesses, making it essential to understand their characteristics and suitability for the specific task at hand. Factors such as the nature of the data, the complexity of the problem, and the available computational resources should all be considered when selecting an algorithm. By choosing the most appropriate algorithm, we can improve the accuracy of sentiment analysis and gain valuable insights from the text data.</p><h4>III. LazyPredict</h4><p>LazyPredict is an innovative and time-saving Python library that simplifies the process of algorithm selection for machine learning tasks. LazyPredict automates the process of training and evaluating multiple machine learning models, providing quick insights into their performance without the need for extensive manual coding. Although initially designed for binary classification, it can still be used for <strong>multiclass classification</strong> by treating each class as a separate binary classification task.</p><figure><img alt="LazyPredict" src="https://cdn-images-1.medium.com/max/1024/1*HovQnS0-V0vW1UKE_32ztQ.png" /></figure><p>LazyPredict has gained popularity among data enthusiasts and practitioners. It offers a wide range of algorithms, allowing users to experiment and compare various models effortlessly. With LazyPredict, you can quickly assess the performance of multiple machine learning models and identify the most promising ones for your task. You must try it <a href="https://lazypredict.readthedocs.io/">here</a>, the results are fascinating. 😁</p><h4><strong>IV. LazyPredict Inspired Class for Multiclass Sentiment Analysis</strong></h4><p>To tackle the challenge of multiclass sentiment analysis in text data, I have developed a custom class inspired by the concept of LazyPredict. While LazyPredict is primarily designed for binary classification, I have expanded upon its capabilities to support multiclass classification scenarios. This custom class simplifies the process of algorithm selection for <strong>sentiment analysis</strong> by providing an automated way to train and evaluate multiple machine learning models.</p><p>The class incorporates popular machine learning algorithms suitable for multiclass sentiment analysis tasks. It leverages techniques such as TF-IDF vectorization and label encoding to preprocess the text data and prepare it for modeling. By utilizing this custom class, you can effortlessly compare the performance of various algorithms and identify the most effective ones for your specific sentiment analysis problem.</p><blockquote>If you’re still hanging in there with me and finding this blog helpful, how about <a href="https://bmc.link/manaliraut">buying me a book</a>? Yes, you read that right! Just imagine, with a click, you can help expand my knowledge and keep me fueled with new ideas. So go ahead, treat me to a book, and together we’ll continue our quest for learning and exploration! Cheers!</blockquote><h4>V. Evaluation of Best Algorithms</h4><p>Once I have developed the custom class for <strong>multiclass sentiment analysis,</strong> the next step was to evaluate the performance of various algorithms and identify the best ones for the task.</p><p>To assess the performance of each algorithm, I have considered key evaluation metrics such as accuracy, precision, recall, and F1 score. These metrics provide valuable insights into the algorithm’s ability to correctly classify sentiment in text review data. Also, I have took only the sample of the headline review data i.e. 500 sample. Additionally, I have also calculated the time for each algorithm to get a sense of their computational efficiency.</p><p>By evaluating multiple algorithms, we can gain a comprehensive understanding of their strengths and weaknesses in handling <strong>multiclass sentiment analysis</strong>. This knowledge will enable us to select the most suitable algorithms for our specific task, ensuring accurate and reliable sentiment analysis of product reviews.</p><pre>import pandas as pd<br>import numpy as np<br>from sklearn.model_selection import train_test_split<br>from lazypredict_inspired_multiclass_classification import MulticlassClassifier<br><br>amazon_review_sample = pd.read_csv(&quot;data/amazon_review_sample500.csv&quot;)<br><br>#Splitting the data for Review Headlines<br>X = amazon_review_sample[&quot;cleaned_review_headlines&quot;]<br>Y = amazon_review_sample[&#39;headline_sentiments&#39;]<br>X[0]<br><br># Splitting the data<br>X_train_headline, X_test_headline, Y_train_headline, Y_test_headline = train_test_split(X, Y, test_size=0.2, random_state=1)<br><br>#calling MulticlassClassifier<br>MulticlassClassifier.multiclass_classification(X_train_headline,Y_train_headline, X_test_headline, Y_test_headline)<br><br>#Splitting the data for Review Body<br>X1 = amazon_review_sample[&quot;cleaned_review_body&quot;]<br>Y1 = amazon_review_sample[&#39;body_sentiments&#39;]<br>X1[0]<br><br># Splitting the data<br>X_train_body, X_test_body, Y_train_body, Y_test_body = train_test_split(X1, Y1, test_size=0.2, random_state=1)<br>MulticlassClassifier.multiclass_classification(X_train_body,Y_train_body, X_test_body, Y_test_body)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*qK-4YkCWfnlxbmtj09U0qg.png" /><figcaption>Review Headline Sample</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*DqM2ffKR3vmdi_zeSVIdWw.png" /><figcaption>Review Body Sample</figcaption></figure><h4>VI. Analysis of Algorithm Performance</h4><p>After evaluating multiple algorithms for multiclass sentiment analysis on our Amazon review dataset, it’s time to analyze their performance and identify the top performers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*RNl0JiBjQgIxFfws-8KYRQ.png" /><figcaption>Multiclass Classification on Amazon Review Headlines</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*x1smL8YWIFXqMcfYtwXs4w.png" /><figcaption>Multiclass Classification on Amazon Review Body</figcaption></figure><p>The pretty table above indicate that, all the algorithms achieved high training accuracy, reasonably good test accuracy, and moderate precision and recall scores on both the data. The F1 scores reflected the trade-off between precision and recall. These findings indicate that the models have the potential to effectively classify the sentiment of Amazon reviews headlines and body, but there is room for further optimization and fine-tuning to improve overall performance as we have used sample only.</p><h4>VII. Conclusion</h4><p>Our LazyPredict inspired class and the analysis of various algorithms have prepared us to effectively perform sentiment analysis on Amazon reviews. By utilizing the most appropriate algorithms to analyze the review body and headlines, we can gain meaningful insights into customer sentiments and use that knowledge to improve customer satisfaction.</p><p>Hey curious mind, We’ve come a long way on our sentiment analysis journey, but we’re not done just yet. It’s time for Part 4, where we explore more advanced algorithms in detail. <strong><em>I want your input on the 4 algorithms you’d like to see in action on the whole dataset. Drop your top picks in the comments below </em></strong>and let’s unlock even more insights together. Ready to dive deeper? Let’s make it happen!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cbb61f182fb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sentiment Analysis of Genuine Customer Feedback in Amazon Book Reviews —NLP, VADER {Part 2}]]></title>
            <link>https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-nlp-vader-part-2-624d95dde614?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/624d95dde614</guid>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[vader]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Thu, 22 Jun 2023 18:01:25 GMT</pubDate>
            <atom:updated>2023-07-19T17:16:53.495Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of online shopping, Amazon is a powerhouse that connects people and businesses across the globe. It’s not just a platform to buy and sell, but a place where customers share their experiences through detailed reviews. These reviews hold a wealth of valuable information, and that’s where sentiment analysis comes in. In this blog, we’ll continue to explore the fascinating world of sentiment analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IQSD9uZUK-7PnyQi-4r78Q.png" /><figcaption>Image created by Author</figcaption></figure><p>In our previous <a href="https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-eda-part-1-c9179515bad4">blog</a>, we took a deep dive into exploring Amazon book reviews through an exploratory data analysis (EDA). We uncovered interesting patterns and insights about these reviews. Now, it’s time to embark on the next phase of our journey — extracting sentiments from these reviews. So, join me as we unravel the power of sentiment analysis in the world of Amazon book reviews.</p><ol><li>Introduction</li><li>Preprocessing of Amazon Book Reviews</li><li>Natural Language Processing (NLP)</li><li>VADER Sentiment Analysis</li><li>Conclusion</li><li>Reference</li></ol><p>Here we go again !!!🤠</p><h4>1. Introduction</h4><p>Sentiment analysis uses clever technology like AI and machine learning to understand the emotions and opinions expressed in these reviews. Unlike other platforms, where customers need a little push to share their thoughts, Amazon has created a culture of open and honest feedback. By analyzing this feedback, businesses can gain deep insights into their products, even uncovering aspects they might not have considered before.</p><p>In our journey, we are specifically focused on Amazon book reviews. Now, we will discover how sentiment analysis can help publishers, authors, and sellers understand what customers love and what they don’t. We will see real examples of how this analysis can reveal hidden insights.</p><h4>2. Preprocessing of Amazon book reviews</h4><p>Text Preprocessing refers to the initial stage of cleaning and transforming raw text data before it can be used for Natural Language Processing (NLP) tasks. It involves a series of steps that aim to remove irrelevant information, standardize the text, and prepare it for further analysis.</p><p>Common preprocessing techniques include removing punctuation, converting text to lowercase, removing stop words, stemming or lemmatizing words, and handling special characters or numerical values. By preprocessing text, we can enhance the quality of the data, improve the efficiency of NLP algorithms, and extract meaningful insights from text-based data sources.</p><pre>def decontracted(phrase):<br>    # specific<br>    phrase = re.sub(r&quot;won&#39;t&quot;, &quot;will not&quot;, phrase)      # replace won&#39;t with &quot;will not&quot;<br>    phrase = re.sub(r&quot;can\&#39;t&quot;, &quot;can not&quot;, phrase)      # replace can or cant with &#39;can not&#39;<br>    phrase = re.sub(r&quot;n\&#39;t&quot;, &quot; not&quot;, phrase)           # replece n with &#39;not&#39;<br>    phrase = re.sub(r&quot;\&#39;re&quot;, &quot; are&quot;, phrase)           # replace re with &#39;are&#39;<br>    phrase = re.sub(r&quot;\&#39;s&quot;, &quot; is&quot;, phrase)             # replace s with &#39;is&#39;<br>    phrase = re.sub(r&quot;\&#39;d&quot;, &quot; would&quot;, phrase)          # replace &#39;d&#39; with &#39;would&#39;<br>    phrase = re.sub(r&quot;\&#39;ll&quot;, &quot; will&quot;, phrase)          # replace &#39;ll with &#39;will&#39;<br>    phrase = re.sub(r&quot;\&#39;t&quot;, &quot; not&quot;, phrase)            # replace &#39;t&#39; with &#39;not&#39;<br>    phrase = re.sub(r&quot;\&#39;ve&quot;, &quot; have&quot;, phrase)          # replace ve with &#39;have&#39;<br>    phrase = re.sub(r&quot;\&#39;m&quot;, &quot; am&quot;, phrase)             # replace &#39;m with &#39;am&#39;<br>    return phrase<br><br>p_stemmer = PorterStemmer()<br>lemmatizer = WordNetLemmatizer()<br><br>def preprocess_text(text_data):<br>    preprocessed_text = []             <br>    <br>    for sentence in tqdm(text_data):<br>        sent = decontracted(sentence)                  #calling funcion for each sentence<br>        #print(&quot;1st sent&quot; , sent)<br>        sent = sent.replace(&#39;\\r&#39;, &#39; &#39;)                # replace line terminator with space<br>        sent = sent.replace(&#39;\\n&#39;, &#39; &#39;)                # replace new line charactor with space<br>        sent = sent.replace(&#39;\\&quot;&#39;, &#39; &#39;)         <br>        sent = re.sub(&#39;[^A-Za-z]+&#39;, &#39; &#39;, sent)        # remove anything that is not letter<br>        sent = &#39;&#39;.join(p_stemmer.stem(token) for token in sent )<br>        sent = &#39;&#39;.join(lemmatizer.lemmatize(token) for token in sent )<br>        sent  = &#39; &#39;.join(e for e in sent.split() if len( Counter(e)) &gt; 2 )<br>        #sent = lstr(emmatize_text(sent)<br>        # https://gist.github.com/sebleier/554280<br>        sent = &#39; &#39;.join(e for e in sent.split() if e.lower() not in stopwords ) # checking for stop words<br>        preprocessed_text.append(sent.lower().strip())<br>    return preprocessed_text</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*GvMjMSRVGeMpmB36sVNd1Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*0eql6htf8Qh8AFQcK2uDOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*ntc1l2mgZC8UlYrjNrUPfQ.png" /><figcaption>WorldCloud of Review Headline and Review Body</figcaption></figure><blockquote>If you’ve been enjoying this blog and finding it helpful, I have a special request for you. How about supporting my love for learning by <a href="https://bmc.link/manaliraut">buying me a book</a>? Think of it as a way to show appreciation and fuel my passion for sharing valuable insights.</blockquote><h4>3. Natural Language Processing</h4><p>Understanding and analyzing the language used by customers is no easy feat. That’s where natural language processing (NLP) comes into play. NLP, a field of artificial intelligence, equips us with the tools and techniques to extract valuable insights from textual data, unraveling the power hidden within Amazon book reviews.</p><p><strong>3.1 Part-of-speech Tagging<br></strong>Part-of-speech (POS) tagging is the process of assigning a specific grammatical category or part of speech (e.g., noun, verb, adjective, adverb) to each word in a text. It helps in determining the syntactic role and function of each word within a sentence.</p><p><strong>3.2 Named Entity Recognition<br></strong>Named Entity Recognition (NER) is a natural language processing (NLP) technique that aims to identify and classify named entities in text into predefined categories. Named entities refer to specific names of persons, organizations, locations, dates, quantities, and other named entities that hold significance in the given context.</p><pre>def pos_ner_tagging(text_list):<br>    tagged_sentences = []<br>    ner_sentences = []<br>    for sentence in text_list:<br>        tokens = nltk.word_tokenize(sentence)<br>        tagged = nltk.pos_tag(tokens)<br>        tagged_sentences.append(tagged)<br>        <br>        named_entities = nltk.ne_chunk(tagged)<br>        ner_sentences.append(named_entities)<br>    return tagged_sentences, ner_sentences<br><br>tagged_headlines, ner_headlines = pos_ner_tagging(cleaned_headlines)<br>tagged_body, ner_body = pos_ner_tagging(cleaned_body)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*0Us32w2R8jBNX8mozN7mgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*VJf0_d103R-8if9fNwuxJA.png" /></figure><p>By performing part-of-speech tagging and named entity recognition, we gain valuable insights into the linguistic aspects of the reviews, enabling us to better understand the content and extract meaningful information.</p><h4>4. VADER Sentiment Analysis</h4><p>VADER (Valence Aware Dictionary and sEntiment Reasoner) is a popular sentiment analysis tool used for analyzing Amazon book reviews. It works by assigning a sentiment score to each word in a text, taking into account not only the individual word but also the context and the presence of intensifiers or negations. By aggregating these scores, VADER can determine the overall sentiment of a review, whether it is positive, negative, or neutral.</p><p>This enables us to gain valuable insights into the sentiments expressed by customers in their book reviews, helping us understand the overall perception of the books and make data-driven decisions. VADER sentiment analysis is a powerful technique that allows us to harness the power of language and sentiments to extract meaningful information from Amazon book reviews.</p><p>In the context of VADER sentiment analysis, the terms “positive,” “negative,” “neutral,” and “compound” refer to different aspects of the sentiment expressed in a piece of text.<br><strong>a. Positive: </strong>Positive sentiment refers to the expression of favorable or optimistic emotions in the text. It indicates a positive perception, satisfaction, or approval of the subject being discussed.<br><strong>b. Negative:</strong> Negative sentiment indicates the expression of unfavorable or pessimistic emotions in the text. It reflects a negative perception, dissatisfaction, or disapproval of the subject being discussed.<br><strong>c. Neutral:</strong> Neutral sentiment refers to the absence of strong positive or negative emotions in the text. It indicates a neutral or objective stance where the author does not express a clear opinion or emotion towards the subject.<br><strong>d. Compound:</strong> The compound score represents the overall sentiment of a text. It combines the individual sentiment scores of words and phrases to calculate a single compound score that indicates the overall sentiment polarity of the text.</p><pre>vader = SentimentIntensityAnalyzer()<br>amazon_books_data[&#39;headline_score&#39;] = amazon_books_data[&#39;cleaned_review_headlines&#39;].apply(lambda review: vader.polarity_scores(review))<br>amazon_books_data[&#39;body_score&#39;] = amazon_books_data[&#39;cleaned_review_body&#39;].apply(lambda review: vader.polarity_scores(review))</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*7PWW6bCdwfREBI2aVatnPg.png" /></figure><pre>#Converting Compunds values into Sentiments<br>def converting_compound_to_sentiments(compound_list) :<br>    sentiment_list = []<br>    <br>    for compund in compound_list:<br>        if compund &gt;= 0.05 :<br>            sentiment_list.append(&quot;Positive&quot;)<br>        elif compund &lt;= -0.05 :<br>            sentiment_list.append(&quot;Negative&quot;)<br>        else:<br>            sentiment_list.append(&quot;Neutral&quot;)<br>    <br>    return sentiment_list<br><br>sentiments_headline = converting_compound_to_sentiments(headline_compound)<br>sentiments_body = converting_compound_to_sentiments(body_compound)</pre><p>Now, see our newly updated data with sentiments</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLu-BF7QgGFy5iRhVFeNEw.gif" /></figure><p><strong>4.1 Review Headline and Review Body Sentiments</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*jPYgf7ZpKgDQqxTSS1vn3w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*VDRrgFIGd0yxaSO9FNcnXg.png" /></figure><p>We can see that there is a huge gap between the review headline sentiments and review body sentiments.</p><p><strong>4.2 Books with most Positive Headline Reviews</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*LRPwImO_GYWmjK3b6rDNrg.png" /></figure><p><strong>4.3 Books with most Positive Body Reviews</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*rj_iItap-gknDb-lRDdqMQ.png" /></figure><h4>5. Conclusion</h4><p><em>Wow, what an amazing journey it was!! T</em>he combination of Natural Language Processing (NLP) techniques and VADER sentiment analysis proved to be a powerful tool in understanding the sentiments expressed in Amazon book reviews. Through NLP preprocessing, we were able to extract meaningful insights from the reviews, such as identifying key words and entities and VADER sentiment analysis allowed us to quantify the overall sentiment of the reviews, whether they are positive, negative, or neutral.</p><p>This analysis provides valuable information for authors, publishers, and businesses, enabling them to make data-driven decisions and improve their products and services based on customer feedback. NLP and VADER offer a unique opportunity to dive deep into the world of Amazon book reviews and uncover valuable insights that can drive success and customer satisfaction.</p><p>See you for an epic sequel in <a href="https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-lazypredict-inspired-part-3-cbb61f182fb2">part 3</a>!”<br><em>You can find the code in python on </em><a href="https://github.com/Manali-Rajiv-Raut/Amazon-Product-Reviews-sentiment-Analysis"><em>Github</em></a><em>.<br>You can reach me on </em><a href="https://www.linkedin.com/in/manali-raut-61364053/"><em>LinkedIn</em></a><em>.<br>Stay tuned!</em></p><h4>6. References</h4><ol><li>Data : <a href="https://s3.amazonaws.com/amazon-reviews-pds/tsv/index.txt">https://s3.amazonaws.com/amazon-reviews-pds/tsv/index.txt</a></li><li>Data : <a href="https://www.kaggle.com/datasets/mohamedbakhet/amazon-books-reviews?select=books_data.csv">https://www.kaggle.com/datasets/mohamedbakhet/amazon-books-reviews?select=books_data.csv</a></li><li><a href="https://www.repustate.com/blog/amazon-review-analysis/">https://www.repustate.com/blog/amazon-review-analysis/</a></li><li><a href="https://www.kaggle.com/code/rishabhvyas/reviews-eda-and-sentiment-ananlysis">https://www.kaggle.com/code/rishabhvyas/reviews-eda-and-sentiment-ananlysis</a></li><li><a href="https://brandmentions.com/blog/sentiment-analysis/">https://brandmentions.com/blog/sentiment-analysis/</a></li><li><a href="https://www.analyticsvidhya.com/blog/2022/04/a-comprehensive-overview-of-sentiment-analysis/">https://www.analyticsvidhya.com/blog/2022/04/a-comprehensive-overview-of-sentiment-analysis/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=624d95dde614" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sentiment Analysis of Genuine Customer Feedback in Amazon Book Reviews — EDA{Part 1}]]></title>
            <link>https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-eda-part-1-c9179515bad4?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c9179515bad4</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Thu, 22 Jun 2023 17:38:31 GMT</pubDate>
            <atom:updated>2023-07-15T15:39:53.321Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sentiment Analysis of Genuine Customer Feedback in Amazon Book Reviews — EDA{Part 1}</h3><p>Amazon, the popular American multinational corporation, has completely changed the way we shop online. It has millions of customers and offers a wide variety of products. This makes it a treasure trove of data that we can use to gain valuable insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P7ZJ03R1q_efRZuE" /><figcaption>Image Created by Author</figcaption></figure><p>In this article, I will take on an exciting data analysis where we’ll explore the world of sentiment analysis and delve into Amazon product reviews. Using Python, we will uncover hidden insights about what customers really think and feel about the books they purchased.</p><ol><li>Sentiment Analysis</li><li>Understanding the Amazon Books Reviews data</li><li>Exploratory Data Analysis</li><li>Conclusion</li><li>References</li></ol><p><em>Get ready to dive in! Let’s get started on this thrilling journey! </em>🤠</p><h4><strong>1. Sentiment Analysis</strong></h4><blockquote>Sentiment analysis helps us understand the feelings and emotions conveyed in written or spoken online communication. It’s like a tool that mines and analyzes data to extract people’s opinions from the text by Natural Language Processing. By doing so, we can draw valuable conclusions and gain insights into what others think and feel about a particular topic<strong>.</strong></blockquote><p>Well, it seems like sentiment analysis has turned me into a sentiment-retrieving machine! I’m on my fourth case study now of sentiment analysis and I’m starting to wonder if I’m becoming more machine than human. Maybe I should check my circuits for any signs of sentiment overload!! 😄</p><p><strong>1.1 How Does Sentiment Analysis Work?<br></strong>You might wonder, “How can a computer understand feelings?” Well, there are many clever methods and algorithms created to analyze sentiments online using machine learning. Artificial intelligence (AI) has become quite common nowadays, considering the big technological advancements we’ve experienced. It’s no surprise that AI can now help us analyze and understand emotions expressed in text on the internet.</p><p>If you still wonder how it actually works? Let’s break it down in simple terms:<br><strong>a. Data Collection:</strong> First, we gather the text data we want to analyze. This could be social media posts, customer reviews, online comments, or any other form of written communication. Here I have chosen Amazon Books reviews.<br><strong>b. Text Preprocessing: </strong>Before analyzing the sentiments, we need to clean and preprocess the text. This involves removing any irrelevant information like punctuation, special characters, and stop words (common words like “the,” “and,” etc.) that don’t carry much sentiment value.<br><strong>c. Feature Extraction:</strong> Next, we extract meaningful features from the text. These features could be individual words, phrases, or even more complex linguistic structures like n-grams. These features will serve as the input for the sentiment analysis algorithm.<br><strong>d. Sentiment Classification</strong>: This is where the magic happens. We employ various techniques, including machine learning algorithms or lexicon-based approaches, to classify the sentiment of each text snippet. The sentiment can be categorized as positive, negative, neutral, or even more nuanced emotions like joy, anger, or sadness.<br><strong>e. Model Training and Evaluation:</strong> If we’re using machine learning, we train the sentiment analysis model using labeled data, where sentiments are already known. We then evaluate the model’s performance to ensure its accuracy and effectiveness.<br><strong>f. Sentiment Analysis Output:</strong> Once the sentiment analysis model is ready, we apply it to new, unseen text data. The model assigns sentiment labels to each piece of text, allowing us to understand the overall sentiment distribution and trends within the dataset.<br><strong>g. Interpretation and Insights:</strong> Finally, we interpret the results and draw meaningful insights. We can analyze sentiments at different levels, such as document-level sentiment, sentence-level sentiment, or even aspect-level sentiment (specific sentiments related to different aspects of a product or service).</p><p><strong>1.2 Why sentiment analysis on amazon products reviews is important?<br></strong>Product reviews play a crucial role in the purchasing decisions of Amazon customers. According to Trustpilot research, nearly 90% of shoppers rely on reviews before making a purchase. With reviews being a determining factor for many customers, it becomes essential to have an effective system in place to monitor and evaluate them. Ensuring the quality and authenticity of product reviews is vital for businesses to build trust, attract potential buyers, and ultimately drive sales. It also helps in enhancing products, addressing specific issues, and meeting customer needs.</p><p>Additionally, sentiment analysis helps manage brand reputation by identifying positive and negative sentiments. It enables competitive analysis, market research, and aids customers in making informed decisions. By leveraging sentiment analysis, businesses can gain valuable insights to improve products, stay competitive, and cater to customer preferences, ultimately leading to higher customer satisfaction.</p><h4>2. Understanding the Amazon Books Reviews data</h4><p>For this analysis, I collected data from two different websites and merged them together. By combining the data from multiple sources, I thought we can gain a more comprehensive view of customer sentiments and opinions. This approach will allow us to capture a broader range of feedback and ensure a more representative sample for our analysis. The data links are given in the References.</p><p>Here are the data columns for our analysis:<br><strong>a. Marketplace</strong>: Represents the two-letter country code of the marketplace.<br><strong>b. Customer ID</strong>: Contains a random identifier that can be used to aggregate reviews written by a single author.<br><strong>c. Review ID:</strong> Each review is assigned a unique ID.<br><strong>d. Product ID:</strong> Contains the unique ID of the product that the review. pertains to. In the multilingual dataset, reviews for the same product in different countries can be grouped by the same product ID.<br><strong>e. Product Parent:</strong> Provides a random identifier that can be used to aggregate reviews for the same product.</p><p><strong>f. Product Title:</strong> The title of the product(Book).<br><strong>g. Product Category:</strong> Represents the broad product category(Books).<br><strong>h. Star Rating:</strong> The star rating of the review, ranging from 1 to 5.<br><strong>i. Helpful Votes:</strong> Number of helpful votes received by the review.<br><strong>j. Total Votes:</strong> The total number of votes that the review received.</p><p><strong>k. Vine: </strong>If the review was written as part of the Vine program, it is indicated in this column.<br><strong>l. Verified Purchase:</strong> Denotes whether the review is on a verified purchase or not.<br><strong>m. Review Headline:</strong> The title of the review. <br><strong>n. Review Body:</strong> The main text of the review. <br><strong>o. Review Date</strong>: The date when the review was written.<br><strong>p. Description: </strong>Description of the book.</p><p><strong>q. Authors:</strong> Authors name<br><strong>r. Image:</strong> The link of the image of the book cover. <br><strong>s. PreviewLink:</strong> The link to access the book on google store. <br><strong>t. Publisher:</strong> Name of the publisher. <br><strong>u. PublishedDate</strong>: The date of the book when it published. <br><strong>v. Infolink:</strong> The link to get more information about the book. <br><strong>w. Categories</strong>: Genres of books. <br><strong>x. RatingsCount :</strong> Averaging Rating of the book.<br><em>Have a look at our data!!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xP3Cco16Pyu-MxPUv8yNw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/0*1zbF-xDW95GVXK4M" /></figure><p>We are going to focus on more review headlines and review body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/0*_6uq3eGrbDRz9FZa" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/0*k1CR5gGOr1oI4Qjn" /></figure><blockquote>If you’re still with me and enjoying this blog, I have a fun proposition for you. How about supporting my journey by <a href="https://bmc.link/manaliraut">buying me a book</a>? It’s a small gesture that goes a long way in keeping me inspired and motivated to bring you more valuable content.</blockquote><h4>3.Exploratory Data Analysis</h4><p>I am so excited that I can practically hear the data dancing with joy as we are about to embark on our exploratory data analysis adventure!<br>Let’s get the fun ride started !!<br>First, I have checked for missing values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/235/0*ipekl0154yFTgt94" /></figure><p>Ohh !!! this is a lot…<br>The data is huge so simply drop the rows with null values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/0*dh5cMFAT9iJyuQ-u" /></figure><p>Next step and my favorite step is to visualize the data.</p><ol><li><strong>Books Categories</strong><br>I have selected the top 15 categories of book and visualized them in a pie chart.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/0*RWwjDxvMLQXq0UcN" /></figure><p>The above pie chart shows the top 15 categories and their percentage values and below count plot shows their frequency counts out of total data values. We can see that the Fiction category is the most popular one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*OTa_Wu3Q65MUhf70" /></figure><p><strong>2. Vine<br>Amazon Vine</strong> is an invitation-only <strong>program</strong> which selects the most insightful reviewers in the Amazon store to serve as Vine Voices. We will see our top 15 categories are vine or not.</p><pre>g = amazon_books_data.groupby([&#39;categories&#39;])[&#39;vine&#39;].value_counts(normalize=True).sort_values(ascending = False).unstack()\<br>    .mul(100).drop_duplicates().head(15)<br>g.plot(kind=&#39;bar&#39;, figsize=(15,5))<br>plt.title(&#39; Top 15 Catgeories with Vine program [Y, N]&#39;, fontsize = 15)<br>plt.grid()<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*nl6aQhk6iq_VbaF9nAT2vw.png" /></figure><p>Here we can see very few categories are included in vine like ‘Abnormalities, human’, ‘Biography &amp; Autobiography’, ‘Business &amp; Economics’, ‘Education’, ‘Estate Planning’, ‘Fathers’, etc.</p><p><strong>3. Books that Reign with the Most Reviews</strong></p><pre>review_df =amazon_books_data[amazon_books_data[&#39;word_count&#39;] &gt; 4000 ][[&#39;product_title&#39;, &#39;word_count&#39;]].sort_values(ascending = False, by = &#39;word_count&#39;)<br>fig, ax = plt.subplots(figsize =(20, 10))<br># Horizontal Bar Plot<br>ax.barh(review_df[&#39;product_title&#39;], review_df[&#39;word_count&#39;])<br>plt.title(&#39;Books most reviewed &#39;, fontsize = 20)<br>plt.savefig(&quot;most.jpg&quot;)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hQb-5mvtXeMFoa8E9hxRPg.png" /></figure><p>“And the dead shall rise” by Steve Oney is the most reviewed book. For the better look of this plot you can check my GitHub profile, the link is provided below.</p><p><strong>4. Books with the highest rating count</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KYXugybMv5AwIzy7" /></figure><p>There are 15 books listed in the above plot with the highest ratings and my favorite Paulo Coelho’s ‘The Alchemist’ has the highest rating count.</p><p><strong>5. Books with ratingCount and star_rating</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/0*eEs5ESrJtE_EZeSy" /></figure><p><strong>6. Books with helpful votes and total votes</strong></p><pre>books_votes = amazon_books_data.groupby(&quot;product_title&quot;).mean()[[&quot;helpful_votes&quot;, &quot;total_votes&quot;]].head(10)<br>books_votes.plot(kind=&#39;bar&#39;, figsize=(15,5))<br>plt.title(&#39;Books with helpful and total votes&#39;, fontsize = 15)<br>plt.grid()<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*WoFF5ysxI9p4s2XPsH-4Ow.png" /></figure><p>‘ — or Not to be: A Collection of Suicide Notes’ by Marc Etkind book stand alone the most highest in helpful and total votes. Second stands the ‘night, Mother : A play (mermaid Dramabook)’ by Marsha Norman.</p><p><strong>7. Book Categories with Highest and Lowest Star Rating</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*i9MCRHa2_Ifby0he" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/0*D-P1Mu1lNJ-t6y6a" /></figure><p>Above plots shows the Book Categories with the highest and lowest Star ratings.</p><p><strong>8. Authors with Highest &amp; Lowest star ratings</strong></p><pre>plt.figure(figsize=(4,4))<br>authers = amazon_books_data.groupby(&#39;authors&#39;).mean().sort_values(ascending = False, by=&#39;star_rating&#39;).head(10)<br>authers[&#39;star_rating&#39;].plot(kind =&#39;barh&#39;, color=&#39;pink&#39;)<br>plt.title(&#39;Authers with Highest Star Rating&#39;, fontsize = 15)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/0*vkK1NFLQo-Tb6gqC" /></figure><pre>plt.figure(figsize=(4,4))<br>auther_lowest = amazon_books_data.groupby(&#39;authors&#39;).mean().sort_values(ascending = False, by=&#39;star_rating&#39;).tail(10)<br>auther_lowest[&#39;star_rating&#39;].plot(kind =&#39;barh&#39;, color=&quot;gray&quot;)<br>plt.title(&#39;Authers with Lowest Star Rating&#39;, fontsize = 15)<br>plt.show()<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/0*mkHTEEHRKuS6M7XK" /></figure><p>I have found authors with highest and lowest star ratings. But, You know, personally I don’t find any author with the lowest star rating. I believe every author is unique and has their own style of writing.They have the incredible ability to express their thoughts and ideas through their books, helping us understand different perspectives and experiences. So, let’s appreciate the diversity of authors and their talent for conveying meaningful messages through their work.🫰</p><h4><strong>4. Conclusion</strong></h4><p>In conclusion, our exploratory data analysis of Amazon book reviews for sentiment analysis has provided valuable insights into the sentiments expressed by customers. Through the analysis of various data features, we were able to gain a deeper understanding of the customer feedback and opinions regarding the books available on Amazon. And also while doing EDA, I have selected at least 10 books to add to my reading list. Have you selected yours?🤓</p><p><em>Now, its my time to listen the song “Magic Shop” by BTS. <br>We will meet at the same place, different time — see you here for </em><a href="https://manaliraut2.medium.com/sentiment-analysis-of-genuine-customer-feedback-in-amazon-book-reviews-nlp-vader-part-2-624d95dde614"><em>part 2</em></a><em>!<br>You can find the code in python on </em><a href="https://github.com/Manali-Rajiv-Raut/Amazon-Product-Reviews-sentiment-Analysis"><em>Github</em></a><em>.<br>You can reach me on </em><a href="https://www.linkedin.com/in/manali-raut-61364053/"><em>LinkedIn</em></a><em>.<br>Stay tuned!</em></p><h4>5. References</h4><ol><li>Data : <a href="https://s3.amazonaws.com/amazon-reviews-pds/tsv/index.txt">https://s3.amazonaws.com/amazon-reviews-pds/tsv/index.txt</a></li><li>Data : <a href="https://www.kaggle.com/datasets/mohamedbakhet/amazon-books-reviews?select=books_data.csv">https://www.kaggle.com/datasets/mohamedbakhet/amazon-books-reviews?select=books_data.csv</a></li><li><a href="https://www.repustate.com/blog/amazon-review-analysis/">https://www.repustate.com/blog/amazon-review-analysis/</a></li><li><a href="https://www.kaggle.com/code/rishabhvyas/reviews-eda-and-sentiment-ananlysis">https://www.kaggle.com/code/rishabhvyas/reviews-eda-and-sentiment-ananlysis</a></li><li><a href="https://brandmentions.com/blog/sentiment-analysis/">https://brandmentions.com/blog/sentiment-analysis/</a></li><li><a href="https://www.analyticsvidhya.com/blog/2022/04/a-comprehensive-overview-of-sentiment-analysis/">https://www.analyticsvidhya.com/blog/2022/04/a-comprehensive-overview-of-sentiment-analysis/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c9179515bad4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Small Steps Lead to Big Results]]></title>
            <link>https://manaliraut2.medium.com/why-small-steps-lead-to-big-results-b24585f226c5?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b24585f226c5</guid>
            <category><![CDATA[inspiration]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[challenge]]></category>
            <category><![CDATA[benefits]]></category>
            <category><![CDATA[consistency-challenge]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Sun, 14 May 2023 15:44:08 GMT</pubDate>
            <atom:updated>2023-07-15T15:46:02.140Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The Benefits of Consistency</strong></p><p>I am trying something new today for blog. Today, I want to talk about <em>Consistency</em>. In today’s fast-paced world, consistency has become more important than ever. With so much competition in every field, being consistent in your efforts is the key to success. Whether it is your career, personal life, or health and fitness, consistency is the key to achieving your goals. In fact, consistency has been scientifically proven to be one of the most important factors in achieving success.</p><p>But being consistent is not always easy. It requires discipline, motivation, and a strong mindset. So, how can you stay consistent and achieve your goals?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVXYlnHrRovg7C3f3_QsYg.png" /><figcaption>Image created by author</figcaption></figure><p>In this blog, we will explore what consistency is, why it is important, how to be consistent, etc. I will share some tips and strategies that can help you stay consistent and achieve success in every area of your life.</p><p><strong>I. What is Consistency?</strong></p><blockquote>“Success is neither magical nor mysterious. It is the natural consequence of consistently applying basic fundamentals.” - Jim Rohn</blockquote><p>Consistency is one of the most powerful forces in life. It’s the key to success in any area, whether it’s personal development, business, relationships, or health. Consistency is what separates the average from the great, the successful from the unsuccessful.</p><p>But what exactly is consistency? It’s the ability to show up every day and do the work, even when you don’t feel like it. It’s the willingness to stick to a routine and keep pushing forward, no matter what obstacles come your way. And it’s the commitment to your goals, even when they seem far away.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XbZVCDVgTF9IOOmuNSkCAA.png" /><figcaption>Image created by author</figcaption></figure><h4><strong><em>To show up to work every single day is difficult sometimes for me, sometimes I just don’t want to ……</em></strong></h4><p>Self-regulation theory suggests that individuals have a limited amount of self-control resources, and when these resources are depleted, it becomes difficult for individuals to regulate their behaviors effectively. This can lead to a lack of consistency in behavior, such as not showing up to work every day.</p><p>Additionally, motivational psychology suggests that individuals’ motivation to engage in a behavior is influenced by their perceived value and expectancy of the outcome. If the perceived value of showing up to work every day is low, or the expectancy of success is low, individuals may not be motivated to engage in that behavior consistently. Therefore, it is important to understand the underlying psychological factors that influence consistency in behavior and work on strategies to improve motivation and self-regulation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7k1xvqRTTwkocSvFRWV2hw.png" /><figcaption>Image created by author</figcaption></figure><blockquote>To keep me on a consistent learning journey, consider<a href="https://bmc.link/manaliraut"> buying me a book</a>. By expanding my knowledge and exploring new ideas, I can continue providing valuable insights and information through my blogs. So, let’s join forces and keep the learning spirit alive by immersing ourselves in the wonderful world of books. Together, we can make this journey of knowledge and discovery even more exciting!</blockquote><p><strong>II. Why is consistency important for being successful?</strong></p><blockquote>“I’m consistently inconsistent, but reliably unreliable.” — Unknown</blockquote><p>According to scientific research, consistency is one of the most important factors for achieving success. Studies have shown that people who are consistent in their efforts are more likely to achieve their goals than those who are not consistent.</p><p>Consistency is essential for achieving success because it allows you to build habits that lead to progress. It takes an average of 66 days to form a new habit and consistency is crucial during this time. I know, Building habits is a crucial step towards consistency, but it does not guarantee consistency on its own.</p><p>There are many other factors that can affect a person’s ability to remain consistent, such as motivation, external factors, and personal circumstances. When you are consistent, you develop self-discipline, which is crucial for achieving any goal. Consistency also helps you build momentum, which makes it easier to stay motivated and continue making progress towards your goals. It is important to identify the obstacles that are hindering your consistency and take appropriate steps to overcome them.</p><p><strong>III. How consistency can transform your life?</strong></p><blockquote>“I have a love-hate relationship with consistency. Mostly hate.” — Unknown</blockquote><p><strong>a. Consistency builds habits.<br></strong>Habits are the foundation of success. When you do something consistently, it becomes a habit. And habits are automatic, meaning you don’t have to use willpower or motivation to do them. If you consistently eat healthy, it becomes a habit. If you consistently exercise, it becomes a habit. And when something becomes a habit, it’s much easier to maintain.</p><p><strong>b. Consistency creates momentum.<br></strong>Momentum is the force that propels you forward. When you consistently work towards your goals, you create momentum. And momentum is powerful. It’s what helps you overcome obstacles and reach your destination faster. But momentum can only be created by consistent action.</p><p><strong>c. Consistency builds discipline.<br></strong>Discipline is the ability to do what needs to be done, even when you don’t feel like it. And discipline is essential for success. When you consistently do the work, you build discipline. And discipline spills over into other areas of your life, creating a positive ripple effect.</p><p><strong>d. Consistency increases self-confidence.<br></strong>Self-confidence comes from the belief that you can accomplish your goals. And the best way to build self-confidence is through consistent action. When you consistently work towards your goals, you prove to yourself that you can do it and that builds self-confidence.</p><p><strong>e. Consistency leads to success.<br></strong>Success is the result of consistent action. When you consistently work towards your goals, you create momentum, build discipline, and increase self-confidence. And those are the ingredients of success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EYpDayYr3vqdgcc-axe-tQ.png" /><figcaption>Image created by author</figcaption></figure><p><strong>IV. How can you become more consistent in your life?</strong></p><blockquote>Consistency is a journey, not a destination. It’s something that you have to work at every day, but the rewards are worth the effort.</blockquote><p>Here are some tips:<br><strong>a. Start small.<br></strong>Consistency is built one step at a time. Start with a small goal, like exercising for 10 minutes a day, and build from there.</p><p><strong>b. Make a plan.<br></strong>Consistency requires a plan. Decide what you want to accomplish and create a plan to achieve it.</p><p><strong>c. Create a routine.<br></strong>Consistency is easier when you have a routine. Set aside a specific time each day to work towards your goals.</p><p><strong>d. Use accountability.<br></strong>Accountability is a powerful tool for consistency. Tell someone about your goals and ask them to hold you accountable.</p><p><strong>e. Celebrate your progress.<br></strong>Consistency can be a hard work. Celebrate your progress along the way to stay motivated.</p><p><strong>V. How to stick to consistency?</strong></p><blockquote>“I’m consistent at being inconsistent.” — Unknown</blockquote><p>To stick to consistency, it is essential to set realistic goals and create a plan to achieve them. You should also establish a routine and stick to it, even on days when you don’t feel like it. Consistency requires discipline, so it’s important to stay motivated and remind yourself of why you started in the first place. It’s also helpful to track your progress and celebrate small victories along the way.</p><p>Example :<br>Growing a YouTube channel to 1 million subscribers in a year can be a challenging task, but it’s not impossible. Here is a schedule plan that you can follow to achieve your goal:</p><ol><li><strong>Set a target:</strong> Your goal is to grow your channel to 1 million subscribers within a year. Break down this goal into smaller milestones. For example, aim to get 50,000 subscribers in the first 2 months, 1 lakh subscribers in the first 4 months, 5 lakh subscribers in the first 8 months, and so on.</li><li><strong>Consistency is key:</strong> You will need to be consistent with your content. Create a content schedule that allows you to upload at least 2–3 videos per week. Quality of the content is also important.</li><li><strong>Keyword research: </strong>Do proper keyword research before making your videos. Target long-tail keywords that have low competition but are still relevant to your channel.</li><li><strong>Optimize your videos:</strong> Optimize your videos with proper title, description, tags, and thumbnail images.</li><li><strong>Collaborate with other YouTubers: </strong>Collaborate with other YouTubers who have similar content to yours. This can help you get more subscribers and reach new audiences.</li><li><strong>Social media marketing:</strong> Promote your channel on social media platforms like Instagram, Facebook, and Twitter. Share your videos on these platforms and engage with your audience.</li><li><strong>Engage with your audience:</strong> Engage with your viewers by responding to their comments and asking for feedback. This can help you build a loyal audience.</li><li><strong>Paid promotion: </strong>Consider paid promotion to reach a wider audience. Use Google Ads or YouTube Ads to promote your channel and videos.</li><li><strong>Analyze your performance:</strong> Keep track of your progress and analyze your performance regularly. Use tools like Google Analytics to track your views, subscribers, watch time, and other metrics.</li></ol><p>To achieve your goal of 10 lakh subscribers in a year, you will need to upload at least 2–3 videos per week. That means you will need to create around 100–150 videos in a year. Keep in mind that the quality of your content is more important than the quantity, so focus on creating high-quality content that your viewers will enjoy. All this can be done with the help of consistency.</p><p>Good luck with your YouTube channel! 😇This example making me wants to start my own YouTube channel. 🤪</p><h4><strong>But I get tired easily and failed to maintain consistency or I just feel lazy…</strong></h4><p>If you get tired easily and struggle to maintain consistency, there are a few things you can do:</p><ol><li><strong>Create a realistic schedule:</strong> Make a schedule that is achievable for you, considering your work hours and personal life. Don’t overcommit to Complete too many tasks at once.</li><li><strong>Take breaks:</strong> It’s important to take breaks in between work to recharge your energy levels. You can take short breaks, go for a walk, do some stretches, or even take a nap if needed.</li><li><strong>Eat healthy and exercise: </strong>Eating healthy and exercising regularly can help improve your energy levels and help you stay active throughout the day.</li><li><strong>Get enough sleep:</strong> Getting enough sleep is crucial to maintaining energy and focus. Aim to get 7–8 hours of sleep every night.</li><li><strong>Find motivation: </strong>Find ways to motivate yourself, such as setting achievable goals, reminding yourself of your purpose for starting a new task or having a new goal, and celebrating small successes along the way.</li></ol><p><strong>VI. How to schedule a day for being consistent?</strong></p><blockquote>“I’m not inconsistent, I’m just creatively flexible.” — Unknown</blockquote><p>To schedule a day for being consistent, it’s important to establish a routine and stick to it. You should also prioritize your goals and schedule time for them each day. It’s helpful to create a to-do list and prioritize your tasks based on their importance. You should also schedule breaks and downtime to avoid burnout.</p><p><strong>VII. What things may happen when you are not consistent?</strong></p><p>When you are not consistent, you may find that you are not making progress towards your goals. You may also feel demotivated or lose momentum. Not being consistent can also lead to feelings of guilt or disappointment. It’s important to remember that consistency is a process and that setbacks are normal. The key is to stay motivated and continue working towards your goals.</p><p>Well , to be honest, I am not perfectly consistent in my life I also struggle with what menus I have served in my task plate. But, just like any other aspect of life, consistency is key to achieving success in this role. It takes discipline, motivation, and a willingness to stick to a routine even when you don’t feel like it.</p><p>So, let’s all aim to be a little more consistent, whether it’s in our daily routines, our work habits, or our interactions with others. And if we slip up, let’s not beat ourselves up too much, because after all, nobody’s perfect!😛</p><p><em>Stay tuned!<br>You can reach me on </em><a href="https://www.linkedin.com/in/manali-raut-61364053/"><em>LinkedIn</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b24585f226c5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[16 years of UK Accidents: The Good, The Bad, and the preventable — Part 2]]></title>
            <link>https://manaliraut2.medium.com/16-years-of-uk-accidents-the-good-the-bad-and-the-preventable-part-2-4924530818a9?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/4924530818a9</guid>
            <category><![CDATA[accident]]></category>
            <category><![CDATA[uk]]></category>
            <category><![CDATA[random-forest]]></category>
            <category><![CDATA[2021-trends]]></category>
            <category><![CDATA[prediction-model]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Fri, 07 Apr 2023 08:47:11 GMT</pubDate>
            <atom:updated>2023-07-15T15:50:12.376Z</atom:updated>
            <content:encoded><![CDATA[<h3>16 years of UK Accidents: The Good, The Bad, and the preventable — Part 2</h3><p><strong><em>A comprehensive study on Vehicle and Casualties data (2005–2021)</em></strong></p><p>Accidents on the road can have devastating consequences, affecting not only the individuals involved but also their families and society at large. The UK, like many developed countries, has made significant strides in road safety over the years, but accidents still occur. From the <a href="https://medium.com/@manaliraut2/16-years-of-uk-accidents-the-good-the-bad-and-the-preventable-part-1-774d05f8dc88">part 1</a>, we have examined accidents that took place in UK roads from 2005 to 2021, highlighting the factors that led to the incident and the measures that have been put in place to prevent similar accidents in the future. Now, by analyzing another two important datasets related to this case study, I hope to shed light on the challenges and complexities of road safety in the UK and the importance of taking a proactive approach to reduce the risk of accidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*cozG1Dt7E-PU9F8mqsax4w.png" /><figcaption><a href="https://www.redbubble.com/i/art-board-print/City-Clock-Moden-Art-and-Quotes-by-MerryLifestyle/136294591.ZL3U1?asc=u">Clock Tower, London</a></figcaption></figure><p>To understand the flow of sequence, here are the contents:<br>1.Introduction<br>2.Understanding the data<br>3.Applying Feature Engineering<br>4.Exploratory Data Analysis<br>5.Applying Machine Learning Algorithms<br>6.Final Result<br>7.Conclusion<br> Here we go………🚀</p><p><strong>I. Introduction<br></strong>The UK accident case study provides a comprehensive analysis of three crucial aspects of traffic accidents and road safety in the UK: accidents, vehicles, and casualties. In the <a href="https://manaliraut2.medium.com/16-years-of-uk-accidents-the-good-the-bad-and-the-preventable-part-1-774d05f8dc88">part 1</a>, I have focused on accident data, now I will focus on Vehicle and Casualties data together from 2005 to 2021, which will provide a robust and comprehensive view of the trends, patterns, and factors contributing to road accidents in the UK. Through this analysis, we hope to identify key areas for improvement and develop effective strategies to reduce the incidence of road accidents and enhance road safety in the UK.</p><p><strong>II. Understanding the data<br></strong>For this case study<strong>, </strong>I have collected the data from <a href="https://www.data.gov.uk/dataset/cb7ae6f0-4be6-4935-9277-47e5ce24a11f/road-safety-data">here</a> under <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/">Open Government Licence</a>. Let’s explore our new data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*cCPnc97DzkvmzEd2WwkQhw.png" /></figure><p>This is how our combined data looks like. Firstly, I have, ensured that our dataset is clean and free of missing values. Then, I performed feature engineering to reduce data complexity and identify the most relevant features. This approach will enhance the performance of our machine learning models and enable more accurate predictions.</p><p><strong>III. Applying Feature Engineering : Extra Tree Classifier<br></strong>Using an Extra Trees classifier for feature selection is important because it can help to identify the most important features in a dataset while reducing the risk of overfitting. It is an ensemble method that combines multiple decision trees and selects features based on their importance scores. By removing less important features, we can reduce the complexity of the data and improve the performance of our machine learning models, while also enhancing the interpretability of the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*UIEjBfo_C_k8WS9xdRxx3A.png" /></figure><p>Above are the best selected features from vehicle and casualties data. Now, let’s explore these features one by one and try to know them.</p><p><strong>IV. Exploratory Data Analysis<br>1. age_of_casualty<br></strong>It refers to the age of the individual involved in a road accident. This variable provides information on the age distribution of casualties in road accidents and can be used to identify age-specific risk factors and patterns of injury.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*5sLVhYhlM6HKRih8C-Cs3A.png" /></figure><p>Here, we can see that, the majority of casualties in road accidents fall within the age range of 16 to 35 years. This age group is particularly vulnerable to road accidents, with the highest incidence of casualties observed within this range.</p><p><strong>2. driver_imd_decile<br></strong>It refers to the Index of Multiple Deprivation (IMD) decile of the driver involved in a road accident. The IMD is a measure of relative deprivation in small areas across England, based on factors such as income, employment, education, health, and crime. The decile represents the level of deprivation in which the driver falls within a range of 1 to 10, with 1 being the least deprived and 10 being the most deprived. This variable is useful in understanding the relationship between deprivation and road accidents and can help to inform policies and interventions aimed at reducing road accidents in deprived areas. In our case, most data about this feature is missing but we can see similar ranges in least to the most deprived decile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*pjbAlLOX8pHWbg0Y35mGUw.png" /></figure><p><strong>3. accident_year</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*-_B15LxLNsnGzN82fGKBFQ.png" /></figure><p>when we went through accidents par year in <a href="https://manaliraut2.medium.com/16-years-of-uk-accidents-the-good-the-bad-and-the-preventable-part-1-774d05f8dc88">part1 </a>, we saw a downfall from year 2005 to 2021. Here, we can see the most casualties happened in 2016 comparing to other years.</p><p><strong>4. vehicle_manoeuvre<br></strong>It describes the type of manoeuvre that a vehicle was undertaking at the time of an accident. This variable provides information on the actions of the driver and the circumstances surrounding the accident. Examples of manoeuvres include changing lanes, turning left or right, overtaking, and reversing. Understanding the types of manoeuvres involved in road accidents can help to identify high-risk behaviours and inform the development of targeted interventions and policies to reduce the incidence of accidents associated with these manoeuvres. We can see the most observed action of the driver is going ahead than other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*lWWKzAmZFRFiMLQvyJzmEw.png" /></figure><p><strong>5. junction_location<br></strong>It<strong> </strong>refer to the location of a road junction where most of the accidents occurred. In the UK, a road junction is a location where two or more roads meet or intersect, and they can take many different forms, including roundabouts, T-junctions, crossroads, and more. Here, most accidents happened within 20 meters of junction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*B3K4jgoCqk32SI2q1iEbsA.png" /></figure><blockquote>If you’ve been enjoying this blog and finding it helpful, help fuel my curiosity and expand my horizons by buying me a book! 📚✨</blockquote><p><strong>6. first_point_of_impact<br></strong>When two or more vehicles are involved in an accident, the point of impact can be an important factor in determining how the accident occurred, who was at fault, and the severity of the injuries sustained. The first point of impact refers to the specific location on the vehicle where the collision occurred, such as the front bumper, rear bumper, side door, or roof, here we can observed that the vehicle was moving forward at the time of the collision and that the impact occurred at the front of the vehicle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*L8bWjTjDHL3ckkqgFDW_gg.png" /></figure><p><strong>7. age_band_of_driver</strong><br>It refers to the age range of the driver involved in a collision. The age band of the drivers in most accidents is 26–35. This age band is still relatively young, and drivers in this age group may still be prone to accidents due to other factors, such as driver fatigue, speeding, or alcohol or drug use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*OKqwKtD1uOyS0jBs46Icvw.png" /></figure><p><strong>8. vehicle_type<br></strong>It<strong> </strong>refers to the type of vehicle involved in a collision. By identifying the vehicle type involved in an accident, investigators can better understand the factors that may have contributed to the collision and develop strategies to reduce the risk of similar accidents in the future. Here car is found to be involved in a disproportionate number of accidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*kw1hCd_AlozCL7SF97OeDQ.png" /></figure><p><strong>9. casualty_type<br></strong>It refers to the type of person who was injured or killed in a collision. Here, we can see the car occupant means can be a driver or passenger in the car is most found to be involved in serious casualty as we have seen the car is the vehicle type most of the accidents happened with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*vfKPzr4DSrvI6Q7T3HkgGw.png" /></figure><p><strong>10. age_band_of_casualty<br></strong>It refers to the age range of the injured person involved in a collision. It is unfortunate to see that accidents affected individuals from all age groups and no age band is exempted from their impact. But 26–35 is the age band affected most as this band reflects to the peoples who go out everyday for work, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*DrBxhj8kUD-rH0FIkWEGhw.png" /></figure><p>As we gone through and understood our best features which affected the most. Now we are ready to apply machine learning algorithms to see insights of them.</p><p><strong>V. Applying Machine Learning Algorithms<br></strong>I have already mentions why I have selected these algorithms for UK accidents case study. So we will directly move towards Our results.</p><ol><li><strong>Random Forest Algorithm<br></strong>The results I have found using Random Forest:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*3WjRN2q5Nm_6kCPKKIwOFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*7KLqujWwga_mGigaPs0CDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*53s5DWUmO8goVGMGTDZYww.png" /></figure><p>Random Forest<strong> </strong>model correctly classified 86% of the instances in both the training and test sets.</p><p><strong>2. XGBoost<br></strong>The results I have found are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*CsUKwnDuEG-PjkF3X1cOqw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*jf4-Z-2wRKXKhiau22ZEEw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*szni6yP1hjQGlMr3PR5AWQ.png" /></figure><p>XGboost gave me the nearly same results as Random Forest just like the <a href="https://manaliraut2.medium.com/16-years-of-uk-accidents-the-good-the-bad-and-the-preventable-part-1-774d05f8dc88">part 1</a>.</p><p><strong>3. K-Nearest Neighbors<br></strong>The results are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*QhUggjFqLbONEeKuXpHDVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*Z1YlDZjnFus1rfHJcsQ6fw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*A-utW9QJlLeIW1xX4bAVJw.png" /></figure><p>Unlike the part1 , KNN performed very well on this vehicle and casualties data and it is able to distinguish different classes.</p><p><strong>4. AdaBoost Classifier<br></strong>The results I have found from adaBoost is :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*-tVIXiYmAjHfRXOd5Yi4LA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*N15Fm8T8qoq3-9mogKbTxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*zN3inQNUcscezivzsu6aAQ.png" /></figure><p>Adaboost results are also same as XgBoost and Random Forest. It can also can differentiate the classes well.</p><p><strong>5. Bagging Classifier<br></strong>The results are :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*lnUTRtMMlncBHS666JoOfw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*mmIaacuZsFbpIcJvz5HVMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*WHAmrjOB3xOoBSRm6_BzTQ.png" /></figure><p>It seems like the bagging classifier is overfitting the training data as the training accuracy is very high (95%) compared to the test accuracy (84%).</p><p><strong>6. Final Result</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*WCoCiCMPibz3SXUBU7pmGg.png" /></figure><p><strong>7. Conclusion<br></strong>Woah!!!!🥹I am into tears (of joy off course). This case study is such a wealth of valuable information to learn from, not only in Machine Learning but how to be an alert citizen also. I have learned insights on the features that contributed to road accidents and casualties, these 20 features are:<br>1. time<br>2. accident_year<br>3. local_authority_district<br>4. month<br>5. local_authority_highway<br>6. first_road_number<br>7. day_of_week<br>8. police_force<br>9. number_of_vehicles<br>10. number_of_casualties<br>11. age_of_casualty<br>12. driver_imd_decile<br>13. year (casulties)<br>14. vehicle_manoeuvre<br>15. junction_location<br>16. first_point_of_impact<br>17. age_band_of_driver<br>18. vehicle_type<br>19. casualty_type<br>20.age_band_of_casualty</p><p>By working together, governments, organizations, and individuals can make a significant contribution to improving road safety. This not only helps prevent accidents and injuries, but also enhances the overall transportation experience for everyone, making it more efficient, comfortable, and enjoyable.</p><p><em>You can find the code in python on </em><a href="https://github.com/Manali-Rajiv-Raut/UK-Accident-Case-Study-2005-2021-"><em>Github</em></a><em>.<br>You can reach me on </em><a href="https://www.linkedin.com/in/manali-raut-61364053/"><em>LinkedIn</em></a><em>.<br>Stay tuned!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4924530818a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[16 years of UK Accidents: The Good, The Bad, and the preventable — Part 1]]></title>
            <link>https://manaliraut2.medium.com/16-years-of-uk-accidents-the-good-the-bad-and-the-preventable-part-1-774d05f8dc88?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/774d05f8dc88</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[random-forest]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Tue, 14 Mar 2023 16:55:23 GMT</pubDate>
            <atom:updated>2023-07-15T15:51:56.154Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong><em>16 years of UK Accidents: The Good, The Bad, and the preventable — Part 1</em></strong></h3><p><strong><em>A comprehensive study on accident data (2005–2021)</em></strong></p><p>Ensuring road safety has become a crucial issue for many countries across the world, with the alarming rise in the number of road accidents resulting in fatalities and disabilities. Road crashes have now emerged as a major public health concern and a pressing issue that requires immediate attention. As responsible citizens, it is incumbent upon us to remain vigilant and aware of our surroundings while using the roads. This awareness, coupled with scientific knowledge and expertise, can help us to develop effective strategies and interventions to prevent road accidents and reduce their impact.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5m7_E9IwY8tAoXGLy43Q9w.png" /><figcaption><a href="https://www.redbubble.com/i/tapestry/My-favourite-day-is-a-sea-day-Seaful-Quotes-by-MerryLifestyle/104999928.ODB3H?asc=u">My favorite day is a sea day.</a></figcaption></figure><p>1.Introduction<br>2.Understanding the data<br>3.Exploratory Data Analysis <br>4.Applying Feature Engineering<br>5.Applying Machine Learning Algorithms<br>6.Final Result<br>7.Conclusion</p><p>Let’s get started………</p><p><strong>I. Introduction<br></strong>UK accident case study is the detailed analysis of all three data accidents, vehicles and casualties of UK traffic accidents and road safety. Here, I have targeted the first data i.e. accidents data to gain an understanding on the problem and develop insights &amp; preventions related to it. I am going to use the data from 2005 to 2021.</p><p>When working on this case study from scratch , I am literally scratching my head to understand the basic ‘how’, ‘why’, ‘when’, ‘where’ reasons which caused accidents to happen. So without wasting any more time, let’s go deep dive into the data.</p><p><strong>II. Understanding the data<br></strong>Understanding the data of this case study is crucial for developing effective strategies to prevent road accidents. By analyzing the data, we can identify patterns and trends that can help us to better understand the underlying causes of accidents. This understanding can then be used to inform evidence-based policies and programs that can help to reduce the risk of accidents and improve road safety for all. I have collected the data from <a href="https://www.data.gov.uk/dataset/cb7ae6f0-4be6-4935-9277-47e5ce24a11f/road-safety-data">here</a> under <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/">Open Government Licence</a>.</p><p><strong>III. Exploratory Data Analysis<br></strong>In this section we will try to find out the answers of above basic questions which caused accidents to happen. Have a look at our data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*GTrpzfjfOjgaqLTWFgkWgA.png" /></figure><p>The amount of data is so massive, it’s making my brain feel like a squirrel trying to store an entire winter’s worth of nuts in its tiny little head! 😬</p><p>I have ensured that our dataset is free of missing values and made any necessary adjustments. Take a look at our clean data and see how it appears now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*ok-BLc0xDOuSgrIwtmo17Q.png" /></figure><p>Yay!! I must agree that clean data makes me happy.<br>Now , let’s visualize the data to understand better insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*KhsmY_HOsUUoePWfWEH3wA.png" /></figure><p>Accidents per year shows good downfall in the 16 years. Now we need to understand the features that affected them or prevented the accidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9rgEfKwy6sFHAV6kdJTTsQ.png" /></figure><p>The number of accidents was consistently higher throughout all months where October and November have higher and December to February have lowest accidents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*C9C19tVquxudHPGo6YjBbQ.png" /></figure><p>It looks like there are fewer accidents on weekends than on weekdays. Friday has the most accidents and Sunday has the lowest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*SwyzsiqZ1EB2vn0eg9mRtQ.png" /></figure><p>We can clearly see that 8 AM in the morning and near to 16 PM have the darker lines on weekdays where the most accidents usually happen. Maybe it happens because it is the office time on weekdays so there must have been a rush.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*MJ2PR4tHozB6fUQJZcridg.png" /></figure><p>We can see there are 3 types of accident severity, Serious, Slight and Fatal from which most accidents happen in slight severity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*FGmXBX_trDNR3pCKhi8QhQ.png" /></figure><p>Above graph shows the Accidents severity per year where slight severity is the highest in every year and Fatal is lowest. Also, 2020 is the year which has low accidents maybe because this was covid year and it slightly increased in 2021.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*0ZK2RAAjU1fFU4bjYUtDIQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*l1yQ7F2IEEOcf6l4dRBYqw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*SY0m2yGsEWLzAxt2JPI2eA.png" /></figure><p>In the above graph, it shows the most accidents that had happened where the speed limit was 30, road type was single carriageway, mostly happened in Urban areas and road surface condition was dry, weather was Fine with no high winds. Most accidents had happened in the daylight. There were no special conditions and it was not within 20 meters of the junction. In most of the accident cases police officers attend the scene of the accident.</p><p>As all the features appeared to be important, I decided to perform feature engineering to reduce the complexity of the data and enable the use of multiple algorithms. This approach will allow us to better understand the underlying relationships between the features and target variable, and to identify the most relevant features for the problem being solved. Ultimately, this will improve the performance of our machine learning models and enable us to make more accurate predictions.</p><blockquote>Give me the gift of knowledge and inspiration with a <a href="https://bmc.link/manaliraut">buying me a book</a> . Let’s embark on a learning adventure together! 🌟📖</blockquote><p><strong>IV. Applying Feature Engineering : Extra Tree Classifier</strong></p><p>I have used Extra Tree Classifier for this multiclass problem because it is an ensemble learning method that combines the advantages of both decision trees and bagging techniques. Extra Trees use a large number of randomized decision trees to predict the class of an observation, and each tree is trained on a different subset of the original features and observations. This randomness and diversity help to reduce overfitting, improve the stability of the model, and increase the accuracy of predictions. Additionally, Extra Trees can handle both numerical and categorical features, making it a suitable choice for multiclass problems with diverse feature types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*UZFBdaGf5uz1wzvhdgVL7w.png" /></figure><p>Plotted the graph with best 10 features with feature_importances_</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*fEMFh2QLyxAAiSkndcwMGQ.png" /></figure><p>So now, Our best selected features are:<br>1.time<br>2.accident_year<br>3.local_authority_district<br>4.month<br>5.local_authority_highway<br>6.First_road_number<br>7.day_of_week<br>8.Police_force<br>9.Number_of_vehicles<br>10.number_of_casualties</p><p>As we have studied and understood the data and the important features, now it’s time to apply different machine learning algorithms and measure their performance.</p><p><strong>V. Applying Machine Learning Algorithm<br>1. Random Forest Algorithm<br></strong>I chose this algorithm for this case study because this algorithm is known for its high accuracy in predicting outcomes, ability to handle complex datasets with a lot of features. Random Forest is a robust algorithm that is able to handle noise and outliers in the data. This makes it a good choice for datasets that may contain errors or anomalies. The results I have found using Random Forest:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*JbPdiYcA9z8PuzZt3B35ww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/1*iV8cXjjI8H1nTcTgax50lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*zW04qcnRbFJatJWExLYRAw.png" /></figure><p>We can see that the training and test accuracy are nearly same , it indicates RF is performing consistently on both the training and test datasets and its not overfitting. Confusion Matrix and Roc curves shows that model has done prediction slightly better for ‘Fatal’ than ‘Serious’ and ‘Slight’.</p><p><strong>2. XGBoost<br></strong>XGBoost is a boosting algorithm that iteratively builds weak decision trees and combines them to create a strong predictor. It is known for its superior performance on large and complex datasets, and it is particularly effective at reducing bias and variance in the model. XGboost gave me the nearly same results as Random Forest. The results are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*S0XdDNjwGvhxdUNYWwQRLQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/1*iwyWBMa8sklQ4IWNU04Sdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*kWDb89gOS8SmIEezaeIocg.png" /></figure><p><strong>3. K-Nearest Neighbors</strong><br>K-NN is a straightforward algorithm to implement and understand, making it a good choice for simple multiclass classification problems. K-NN is a non-parametric algorithm, which means that it makes no assumptions about the underlying distribution of the data. This can be an advantage in cases where the distribution of the data is unknown or complex. The results are :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/0*RpcLYGG1n_-ZTzEB" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/0*33CTWwmLW1ktSraC" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/0*Otd_Q-ZyUaVawdrJ" /></figure><p>By looking at all the results of KNN, I feel model is not performing well in distinguishing between the different classes.</p><p><strong>4. AdaBoost Classifier<br></strong> AdaBoost is a powerful algorithm for multiclass classification that can achieve high accuracy, handle class imbalance and noisy data, perform feature selection, and is easy to implement. It is a strong classifier, it can capture complex decision boundaries and improve the accuracy of the predictions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*kqXFgf7zyu32E6LBrJTsDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*mzE-utAx-llrzdd99pKZWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*A7LFJRrg3bj2K_zmGKTrTA.png" /></figure><p>AdaBoost gave same result as Random Forest and XGBoost. The model has fitted well and can distinguish between classes.</p><p><strong>5. Bagging Classifier <br></strong>Bagging is a technique used in machine learning to reduce the effects of noise in a dataset. It works by randomly selecting a sample of data from the training set. The same data point can be chosen more than once, as replacement is allowed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*14EmkPyMmYGEFH2ySv8asg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*sfWMIUbl63CBYOphXMcqzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*BY1XRToRshlYfi_khLx9Gw.png" /></figure><p>Based on the given results, it seems like the bagging classifier is overfitting the training data as the training accuracy is very high (99%) compared to the test accuracy (82%).</p><p>husshh!! As a girl, I want to mention, I only compare algorithms — because who needs boys when you have the latest machine learning models to keep you company?<br>Right 😝!!</p><p>Enough Laughing, Let’s go check our final result.</p><p><strong>6. Final Result</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*LovC11kaqAR9AkexSF4o5g.png" /></figure><p><strong>7. Conclusion<br></strong>We found 10 big reasons that caused the most accidents. These include things like the time of day, number of vehicles involved, and the year and location of the accident. We tested five different methods on this data and they all did pretty well. It’s important to remember that road safety is everyone’s responsibility. Governments, organizations, and individuals all need to work together to make our roads safer. By doing this, we can make transportation better for everyone.</p><p><em>We will meet again here with </em><a href="https://manaliraut2.medium.com/16-years-of-uk-accidents-the-good-the-bad-and-the-preventable-part-2-4924530818a9"><em>part 2</em></a><em>.<br>You can find the code in python on </em><a href="https://github.com/Manali-Rajiv-Raut/UK-Accident-Case-Study-2005-2021-"><em>Github</em></a><em>.<br>You can reach me on </em><a href="https://www.linkedin.com/in/manali-raut-61364053/"><em>LinkedIn</em></a><em>.<br>Stay tuned!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=774d05f8dc88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer Personality Analysis — Part 2]]></title>
            <link>https://manaliraut2.medium.com/customer-personality-analysis-part-2-39602f8351c9?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/39602f8351c9</guid>
            <category><![CDATA[k-means-algorithm]]></category>
            <category><![CDATA[customer-perosnality]]></category>
            <category><![CDATA[personality-traits]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[clustering]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Thu, 04 Aug 2022 14:12:35 GMT</pubDate>
            <atom:updated>2023-07-15T15:54:50.553Z</atom:updated>
            <content:encoded><![CDATA[<h3>Customer Personality Analysis — Part 2</h3><p><strong><em>Playing with Different Clustering Techniques</em></strong></p><p>Now-a-days, with the help of machine learning models, it becomes too handy to research and observe human behavior. So it’s time now to learn highly complex relationships for Customer personality Analysis and evaluate their generalizability and robustness with different clustering techniques.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/0*k96ZnI3D6_AxkE0W.png" /><figcaption><a href="https://www.efficy.com/wp-content/uploads/2022/05/market-segmentation.png">https://www.efficy.com/wp-content/uploads/2022/05/market-segmentation.png</a></figcaption></figure><p>As we have studied the personality traits in <a href="https://manaliraut2.medium.com/customer-personality-analysis-part-1-d8fd1eb1a674">part 1 </a>, we understood the data very well. Hence the next step is to apply different clustering algorithms and measure their performance.</p><p>1.Mapping ML Problem<br>2.K-Means Clustering<br>3.Agglomerative Clustering<br>4.GaussianMixture<br>5.Association Rule Mining<br>6.Applications, Advantages &amp; Disadvantages<br>7.Conclusion<br>8.References</p><h3>1. Mapping ML Problem</h3><p><em>The core of this case study is to perform customer segmentation with the help of different clustering algorithms. Each of these algorithms have unique strengths and weaknesses. So we will study how these algorithms result in more natural clusters depending on the data.</em></p><h3>1.1 performance measure</h3><p><strong>1.1.1. Silhouette Score</strong></p><p>The Silhouette Coefficient is calculated using the mean intra-cluster distance (a) and the mean nearest-cluster distance (b) for each sample.</p><p>Silhouette Coefficient for a sample = (b — a) / max(a, b).</p><p>Where, b -&gt; is the distance between a sample and the nearest cluster that the sample is not a part of. Note that Silhouette Coefficient is only defined if number of labels is 2 &lt;= n_labels &lt;= n_samples — 1.</p><p><strong>1.1.2. Support and Confidence</strong></p><p>I have explained them well <a href="https://manaliraut2.medium.com/and-the-machine-replied-i-do-3a3033f8985c">here</a>.</p><h3>2. K-Means Clustering Algorithm</h3><p>The <a href="https://en.wikipedia.org/wiki/K-means_clustering">K-means</a> is an <a href="https://hands-on.cloud/introduction-to-unsupervised-machine-learning/">Unsupervised Machine Learning</a> algorithm that splits a dataset into <strong>K</strong> non-overlapping clusters or subgroups. It allows splitting the data into different groups or categories. Like, if k= 2, then there will be two clusters, if k=3, then there will be three clusters, etc. K-means algorithm is a convenient way to discover the categories of groups in the unlabeled dataset by minimizing the sum of distances between the data point and their corresponding clusters.</p><p><em>The algorithm works as follows:</em></p><ol><li><em>First, initialize k no. of clusters, called means or cluster centroids, randomly.</em></li><li><em>Then categorize each item to its closest mean and update the mean’s coordinates, which are the averages of the items categorized in that cluster so far.</em></li><li><em>Repeat the process for a given number of iterations and at the end, Resultant clusters are formed.</em></li></ol><p>I have used the elbow method to see how many clusters we can form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/0*dHCoEK0g9t2Z-_jX" /></figure><p>I feel 2 is the best no. of clusters based on the elbow method. Now let’s group the data with clusters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9t4Bx2NMVEi3Poq0" /></figure><blockquote>cluster 0 : It feels like Higher class than cluster 1, Higher income, number of Expenses , Purchases and Campaign is higher and have less kids as compare to cluster 1</blockquote><blockquote>-cluster 1 : It feels like middle class or low class as compared to cluster 0, Income is low. Number of Expenses , Purchases and Campaign is Low and has more kids as compared to cluster 0.</blockquote><p>Now we can see the customer segmentation with Income and total purchases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tZo7Cy76B_k5x2G9" /></figure><p>Now, the silhouette score is,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Zx_6AtnpJWh4Lb-o" /></figure><blockquote>Join me on a literary journey by <a href="https://bmc.link/manaliraut">buying a book</a>. Together, we’ll explore new worlds and unlock endless possibilities! 🚀📚</blockquote><h3>3. Agglomerative Clustering</h3><p>Agglomerative Clustering is one of Hierarchical clustering types, is a bottom-up strategy in which each data point is originally a cluster of its own, and as one travels up the hierarchy, more pairs of clusters are combined. In it, two nearest clusters are taken and joined to form one single cluster.</p><p>It worked same like K-Means. Formed 2 clusters, customer segmentation with Income and total purchases is also same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l1rF-kAiPbFlxaRE" /></figure><p>The silhouette score is,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Sb7b-8JJMDdxLKxx" /></figure><h3>4. GaussianMixture</h3><p>It is quite natural and intuitive to assume that the clusters come from different Gaussian Distributions (Univariate or Multivariate) that could have varying parameters of covariance, mean, and density. GaussianMixture models work based on Expectation-Maximization. When the number of clusters for a Gaussian Mixture model is given , the EM algorithm tries to figure out the parameters of these Gaussian distributions with the help of the following steps.</p><ol><li><em>Data points are assigned to a Gaussian cluster and probabilities are calculated that they belong to that cluster on the basis of available data.</em></li><li><em>The mean, covariance, and density are calculated for clusters based on the data points in the E step.</em></li><li><em>The process is repeated with the calculated values continuing to be updated until convergence is reached.</em></li></ol><p>Often, the best way to find an appropriate cluster number is to try different cluster numbers and see which fits your data appropriately. The two popular evaluation metrics for picking cluster numbers for fitting Gaussian Mixture models are BIC and AIC. BIC stands for Bayesian information criterion and AIC stands for Akaike information criterion. These matrics helps to favor the simplest model that maximizes the likelihood function of the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/0*6XqSCaqUoy23QchD" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/0*TP1izvAv4n7oQMfL" /></figure><p>BIC and AIC are meant to be minimized. So I would pick 3 as the most appropriate cluster number for the data as the chart really levels off after that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/0*QMXN959lz-7G88zl" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/0*Tm-6K7Ze6XvmbpAF" /></figure><p>The silhouette score is,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/0*mAzwQM28KnQijCrZ" /></figure><h3>5. Association Rule Mining</h3><p>This is my third time working with Association Rule Mining. Now, it’s serious between us :D !!</p><p><strong><em>Association rule learning</em></strong><em> is a rule based machine learning method for discovering interesting relations between variables in large databases. It is intended to identify strong rules discovered in databases using some measures of interestingness. </em>–Wikipedia , 2021</p><p>I have already given an example <a href="https://manaliraut2.medium.com/and-the-machine-replied-i-do-3a3033f8985c">here</a> about how it works. You will also find apriori there. Apriori takes the input data in the form of 1 and 0 or True and False. Hence I changed the marketing data into following format first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/0*pkWEeh_LMOkmkWP2" /></figure><p>And then into something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/0*ikjIBzsRpu3OdJFt" /></figure><p>Now, by applying apriori I have got the frequent itemset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/0*Lctvkk1ldMljRh47" /></figure><p>and association rules are formed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/0*Dsdt552UvMZthvy_" /></figure><p>Wow!! The Results are amazing. It gave me frozen sets with support and confidence values. Now this is the time to check for the biggest customers of wines :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/0*oF5dxqmwmiAOhInr" /></figure><h3>6. Applications, Advantages &amp; Disadvantages</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/0*hKwLr1pPNJF6tVf7" /></figure><h3>7. <strong>Conclusion</strong></h3><p>By observing all the algorithms performance, the clustering is mostly formed into 2 groups. Cluster 0 is high class with high income and high expenses mostly having 1 child. Cluster 1 is not so high class or can say middle class with low income and low expenses. Customer’s most bought products are wines and meat.It’s not the only approach to this analysis to take business decisions as I limited the number of features. But still I find cluster 0 is the best target for recommending the products and making the marketing effective. As for the future, I would like to explore all of these traits into depth of various relationships amongst features as well incorporate different clustering techniques and improve their measures.</p><p><em>You can find the code in python on </em><a href="https://github.com/Manali-Rajiv-Raut/Customer-Personality-Analysis"><em>Github</em></a><em>.<br>You can reach me on </em><a href="https://www.linkedin.com/in/manali-raut-61364053/"><em>LinkedIn</em></a><em>.<br>Stay tuned!</em></p><h3>8. References</h3><ol><li><a href="https://www.kaggle.com/datasets/imakash3011/customer-personality-analysis">https://www.kaggle.com/datasets/imakash3011/customer-personality-analysis</a></li><li><a href="https://docs.dataprep.ai/user_guide/eda/introduction.html">https://docs.dataprep.ai/user_guide/eda/introduction.html</a></li><li><a href="https://medium.com/@andhikaw.789/customer-personality-analysis-segmentation-clustering-1b68a62a61a2">https://medium.com/@andhikaw.789/customer-personality-analysis-segmentation-clustering-1b68a62a61a2</a></li><li><a href="https://towardsdatascience.com/gaussian-mixture-models-for-clustering-3f62d0da675">https://towardsdatascience.com/gaussian-mixture-models-for-clustering-3f62d0da675</a></li><li><a href="https://nycdatascience.com/blog/python/data-based-customer-personality-analysis-for-businesses/">https://nycdatascience.com/blog/python/data-based-customer-personality-analysis-for-businesses/</a></li><li><a href="https://www.cobuildlab.com/blog/ai/customer-personality-analysis-and-machine-learning-introduction">https://www.cobuildlab.com/blog/ai/customer-personality-analysis-and-machine-learning-introduction</a></li><li><a href="https://github.com/arienugroho050396/Customer-Personality-Analysis/blob/main/Customer%20Personality%20Analysis%20Fix.ipynb">https://github.com/arienugroho050396/Customer-Personality-Analysis/blob/main/Customer%20Personality%20Analysis%20Fix.ipynb</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39602f8351c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Customer Personality Analysis — Part 1]]></title>
            <link>https://manaliraut2.medium.com/customer-personality-analysis-part-1-d8fd1eb1a674?source=rss-5e1df4429bd7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8fd1eb1a674</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[clustering]]></category>
            <category><![CDATA[dataprep]]></category>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Manali_Raut]]></dc:creator>
            <pubDate>Wed, 03 Aug 2022 13:24:53 GMT</pubDate>
            <atom:updated>2023-07-15T15:56:43.513Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Customer Personality Analysis — Part 1</strong></h3><p><strong><em>Detailed Exploratory Data Analysis</em></strong></p><p>Data Science has revolutionized the world a lot through technical transformation. Now, we have gotten accustomed to seeing many machine learning applications in our day-to-day lives. But I am more interested in how machine learning can classify humans based on their personality traits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pDnPx9f7o8asuEqT.jpg" /><figcaption><a href="https://www.lsretail.com/hubfs/BLOG_Retail-queue-covid-times.jpg">https://www.lsretail.com/hubfs/BLOG_Retail-queue-covid-times.jpg</a></figcaption></figure><p>In this article, I will demonstrate the data analysis of Customer Personalities to extract meaningful insights from a large volume of marketing campaign data .This is an attempt to have insights on how the characteristics of a person relate to their personality traits and habits.</p><p>1.Introduction<br>2.Understanding the data<br>3.Exploratory Data Analysis (Matplotlib, Seaborn, Pandas)<br>4.Exploratory Data Analysis ((Dataprep.eda)<br>5.Conclusion</p><h3><strong>1. Introduction</strong></h3><p>Customer Personality Analysis is a detailed analysis of a company’s all types of customers. It also helps a business to understand behavior of customers, increase usage, customer satisfaction and also modify products according to needs. Here I am targeting specific people who paved the way for increasing marketing campaigns. These Personality based analysis are highly effective in increasing the popularity and attractiveness of products and services.</p><h3><strong>2. Understanding The Data</strong></h3><p>Customer personality analysis helps a business to modify its product based on its target customers from different types of customer segments. For example, instead of spending money to market a new product to every customer in the company’s database, a company can analyze which customer segment is most likely to buy the product and then market the product only on that particular segment.</p><h4>2.1 Content</h4><p>2.1.1. People</p><blockquote>ID: Customer’s unique identifier<br>Year_Birth: Customer’s birth year<br>Education: Customer’s education level<br>Marital_Status: Customer’s marital status<br>Income: Customer’s yearly household income<br>Kidhome: Number of children in customer’s household<br>Teenhome: Number of teenagers in customer’s household<br>Dt_Customer: Date of customer’s enrollment with the company<br>Recency: Number of days since customer’s last purchase<br>Complain: 1 if the customer complained in the last 2 years, 0 otherwise</blockquote><p>2.1.2. Products</p><blockquote>MntWines: Amount spent on wine in last 2 years<br>MntFruits: Amount spent on fruits in last 2 years<br>MntMeatProducts: Amount spent on meat in last 2 years<br>MntFishProducts: Amount spent on fish in last 2 years<br>MntSweetProducts: Amount spent on sweets in last 2 years<br>MntGoldProds: Amount spent on gold in last 2 years</blockquote><p>2.1.3. Promotion</p><blockquote>NumDealsPurchases: Number of purchases made with a discount<br>AcceptedCmp1: 1 if customer accepted the offer in the 1st campaign, 0 otherwise<br>AcceptedCmp2: 1 if customer accepted the offer in the 2nd campaign, 0 otherwise<br>AcceptedCmp3: 1 if customer accepted the offer in the 3rd campaign, 0 otherwise<br>AcceptedCmp4: 1 if customer accepted the offer in the 4th campaign, 0 otherwise<br>AcceptedCmp5: 1 if customer accepted the offer in the 5th campaign, 0 otherwise<br>Response: 1 if customer accepted the offer in the last campaign, 0 otherwise</blockquote><p>2.1.4. Place</p><blockquote>NumWebPurchases: Number of purchases made through the company’s website<br>NumCatalogPurchases: Number of purchases made using a catalogue<br>NumStorePurchases: Number of purchases made directly in stores<br>NumWebVisitsMonth: Number of visits to company’s website in the last month</blockquote><h3><strong>3. Exploratory Data Analysis (Matplotlib, Seaborn, Pandas)</strong></h3><p>Let’s look at our data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/0*5K3sLBg_qJejTAsM" /></figure><p>Data looks good as of now. First thing I have done is to check for missing values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/0*PNcUKauIIZ81kUMa" /></figure><p>Found an Income column with 24 missing values so I filled it up with median values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*zWKZ1kha6pQTZKBF" /></figure><p>Now, because there’s a birth year column. I changed birth year to age (I used 2022 year to represent their current age.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/0*oyMqK_eoD37yD4wn" /></figure><p>I summed up the total expenses, total no. of purchases, total accepted campaign and total kids home for each customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C0KURC6mwFU-AheL" /></figure><p>Then, I changed the values of the Marital Status column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dFoeChpl9UKuVbjV" /></figure><p>With the help of the customer ID column, checked for duplicate data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/0*nhDebOMJnjL_Btg-" /></figure><p>Now, let’s check the data information again</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/0*u2SYkjU6I56peBUO" /></figure><blockquote>Want to see me grow and flourish? If you’ve been enjoying this blog and finding it helpful, I have a special request for you. <a href="https://bmc.link/manaliraut">Treat me to a book </a>and watch my ideas bloom! 🌺📚</blockquote><h4>3.1 Data Visualization</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/0*nJE0f7bJc0Euok8O" /></figure><p>As we can see from the income graph, most customers have the income range of 30,000–80,000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/0*kuiuqTKBssMr5s27" /></figure><p>According to the Age column, most customers are between 44 to 57 ages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZhSc_LL_Z2ShGVts" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*CLuWQscFlXoNDDpH" /></figure><p>We can see that out of total expenses wines is the best selling product.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*elUrO2ZaCXKwwEl6" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/0*qZvzzx7PwD0gMFPU" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*o7dv17AssH6pMM00" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/0*jbeJhBAtnuNoO4eM" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/0*jzMeInZP-flhmYZt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*CRv00UqB4kEZbczw" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/0*3WuUxjHzlrvIgiHg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L-ecP5oT67K85hP1" /></figure><p>We can see the Correlation between Income and Total expenses and then followed by Total Purchases. And another correlation is between Total Expenses and Total Purchases.</p><h3>4. Exploratory Data Analysis (Dataprep.eda)</h3><p>Exploratory Data Analysis (EDA) is the process of exploring a dataset and getting insights of its main characteristics. The dataprep.eda package simplifies this process by allowing the user to explore important characteristics with simple APIs. Each API allows the user to analyze the dataset from a high level to a low level, and from different perspectives.</p><p>I have only used one API i.e. create_report which is used to generate reports from pandas dataframe. It provides information like overview, variables, quantiles and descriptive statistics, correlations, missing values, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/0*ZxJGSC8MSNLLdTCd" /></figure><p>Its a clear overview of the whole dataset, showing 24 missing values and almost all variables are skewed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/0*3QM0vUzpkbqwKS91" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/0*S8ok17HrGr0LAz6s" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/0*Vu0oLMssdgn_VWCg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*s7gLFb6f1N32t0G1" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/0*OWEjdqthsxNElCaY" /></figure><p>Here, I have shown all the insights of Education column. create_report gave me all these details about every column variable present in he dataset. It made far easy to understand the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/0*l_Vpkg_OloqlpJUL" /></figure><p>This is the scatterplot showing the relation between income and wines. Customers in the specific range of Income are regular buyers of wine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/0*88iu_tGSNdfd7DY3" /></figure><p>Create_report provided 3 kinds of correlation coefficient here. This is spearman we can see in image above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/0*hYaGBZNH6X9WqiUL" /></figure><p>bar chart of all variables very easily showing missing values in Income column.</p><h3>5. Conclusion</h3><p>This is an attempt to have insights on how the characteristics of a person relate to their personality traits and habits. To summarize my findings, I found and replaced 24 missing values in the Income column, Correlation between Income and Total expenses , no correlation between year of birth and amount spent on wine, there are more customers of wine, mostly graduates and with an average income. And about data.prep, I am amazed!! Now, we will be able to make predictions with the help of algorithms based on these demographics.</p><p>Hushhh!!! Huge work I have done here ;) I am gonna grab some tea and any song by BTS. Will meet you in <a href="https://manaliraut2.medium.com/customer-personality-analysis-part-2-39602f8351c9">part 2</a> .</p><p><em>You can find the code in python on </em><a href="https://github.com/Manali-Rajiv-Raut/Customer-Personality-Analysis"><em>Github</em></a><em>. <br>You can reach me on </em><a href="https://www.linkedin.com/in/manali-raut-61364053/"><em>LinkedIn</em></a><em>.<br>Stay tuned!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8fd1eb1a674" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>