<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rodney Kirui</title>
    <description>The latest articles on DEV Community by Rodney Kirui (@rodneykirui).</description>
    <link>https://dev.to/rodneykirui</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1029446%2F94e2401b-28ff-4bba-990c-1217e60ed2e5.png</url>
      <title>DEV Community: Rodney Kirui</title>
      <link>https://dev.to/rodneykirui</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rodneykirui"/>
    <language>en</language>
    <item>
      <title>Introduction to Data Version Control</title>
      <dc:creator>Rodney Kirui</dc:creator>
      <pubDate>Mon, 03 Apr 2023 07:55:17 +0000</pubDate>
      <link>https://dev.to/rodneykirui/introduction-to-data-version-control-1kdh</link>
      <guid>https://dev.to/rodneykirui/introduction-to-data-version-control-1kdh</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Data Version Control (DVC)?&lt;/strong&gt;&lt;br&gt;
Data Version Control (DVC) is an open-source tool that enables data scientists to track and manage changes to their data, models, and experiments. DVC is designed to work seamlessly with Git, the popular version control system used for software development.&lt;/p&gt;

&lt;p&gt;Data version control is a critical aspect of any data science project. In traditional software development, version control is used to keep track of changes to source code. With the rise of data-driven applications, data has become a critical part of the development process, and version control is just as important for data as it is for code.&lt;br&gt;
In standard software engineering, many people need to work on a shared codebase and handle multiple versions of the same code. This can quickly lead to confusion and costly mistakes.&lt;/p&gt;

&lt;p&gt;To address this problem, developers use version control systems, such as Git, that help keep team members organized.&lt;/p&gt;

&lt;p&gt;In a version control system, there’s a central repository of code that represents the current, official state of the project. A developer can make a copy of that project, make some changes, and request that their new version become the official one. Their code is then reviewed and tested before it’s deployed to production.&lt;/p&gt;

&lt;p&gt;These quick feedback cycles can happen many times per day in traditional development projects. But similar conventions and standards are largely missing from commercial data science and machine learning. Data version control is a set of tools and processes that tries to adapt the version control process to the data world.&lt;/p&gt;

&lt;p&gt;Having systems in place that allow people to work quickly and pick up where others have left off would increase the speed and quality of delivered results. It would enable people to manage data transparently, run experiments effectively, and collaborate with others.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Is DVC?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DVC is a command-line tool written in Python. It mimics Git commands and workflows to ensure that users can quickly incorporate it into their regular Git practice. If you haven’t worked with Git before, then be sure to check out Introduction to Git and GitHub for Python Developers. If you’re familiar with Git but would like to take your skills to the next level, then check out Advanced Git Tips for Python Developers.&lt;/p&gt;

&lt;p&gt;DVC is meant to be run alongside Git. In fact, the git and dvc commands will often be used in tandem, one after the other. While Git is used to store and version code, DVC does the same for data and model files.&lt;/p&gt;

&lt;p&gt;Git can store code locally and also on a hosting service like GitHub, Bitbucket, or GitLab. Likewise, DVC uses a remote repository to store all your data and models. This is the single source of truth, and it can be shared amongst the whole team. You can get a local copy of the remote repository, modify the files, then upload your changes to share with team members.&lt;/p&gt;

&lt;p&gt;The remote repository can be on the same computer you’re working on, or it can be in the cloud. DVC supports most major cloud providers, including AWS, GCP, and Azure. But you can set up a DVC remote repository on any server and connect it to your laptop. There are safeguards to keep members from corrupting or deleting the remote data.&lt;/p&gt;

&lt;p&gt;When you store your data and models in the remote repository, a .dvc file is created. A .dvc file is a small text file that points to your actual data files in remote storage.&lt;/p&gt;

&lt;p&gt;The .dvc file is lightweight and meant to be stored with your code in GitHub. When you download a Git repository, you also get the .dvc files. You can then use those files to get the data associated with that repository. Large data and model files go in your DVC remote storage, and small .dvc files that point to your data go in GitHub.&lt;/p&gt;

&lt;p&gt;The best way to understand DVC is to use it, so let’s dive in. You’ll explore the most important features by working through several examples. Before you start, you’ll need to set up an environment to work in and then get some data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set Up Your Working Environment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;ou’ll need to have Python and Git installed on your system. You can follow the Python 3 Installation and Setup Guide to install Python on your system. To install Git, you can read through Installing Git.&lt;/p&gt;

&lt;p&gt;Since DVC is a command-line tool, you’ll need to be familiar with working in your operating system’s command line. If you’re a Windows user, have a look at Running DVC on Windows.&lt;/p&gt;

&lt;p&gt;To prepare your workspace, you’ll take the following steps:&lt;/p&gt;

&lt;p&gt;Create and activate a virtual environment.&lt;br&gt;
Install DVC and its prerequisite Python libraries.&lt;br&gt;
Fork and clone a GitHub repository with all the code.&lt;br&gt;
Download a free dataset to use in the examples.&lt;br&gt;
You can use any package and environment manager you want. This tutorial uses conda because it has great support for data science and machine learning tools. To create and activate a virtual environment, open your command-line interface of choice and type the following command:&lt;br&gt;
&lt;code&gt;$ conda create --name dvc python=3.8.2 -y&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The create command creates a new virtual environment. The --name switch gives a name to that environment, which in this case is dvc. The python argument allows you to select the version of Python that you want installed inside the environment. Finally, the -y switch automatically agrees to install all the necessary packages that Python needs, without you having to respond to any prompts.&lt;/p&gt;

&lt;p&gt;Once everything is installed, activate the environment:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ conda activate dvc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You now have a Python environment that is separate from your operating system’s Python installation. This gives you a clean slate and prevents you from accidentally messing up something in your default version of Python.&lt;/p&gt;

&lt;p&gt;You’ll also use some external libraries in this tutorial:&lt;/p&gt;

&lt;p&gt;dvc is the star of this tutorial.&lt;br&gt;
scikit-learn is a machine learning library that allows you to train models.&lt;br&gt;
scikit-image is an image processing library that you’ll use to prepare data for training.&lt;br&gt;
pandas is a library for data analysis that organizes data in table-like structures.&lt;br&gt;
numpy is a numerical computing library that adds support for multidimensional data, like images.&lt;br&gt;
Some of these are available only through conda-forge, so you’ll need to add it to your config and use conda install to install all the libraries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ conda config --add channels conda-forge
$ conda install dvc scikit-learn scikit-image pandas numpy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can use the pip installer:&lt;br&gt;
&lt;code&gt;$ python -m pip install dvc scikit-learn scikit-image pandas numpy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now you have all the necessary Python libraries to run the code.&lt;/p&gt;

&lt;p&gt;This tutorial comes with a ready-to-go repository that contains the directory structure and code to quickly get you experimenting with DVC. &lt;br&gt;
You need to fork the repository to your own GitHub account. On the repository’s GitHub page, click Fork in the top-right corner of the screen and select your private account in the window that pops up. GitHub will create a forked copy of the repository under your account.&lt;/p&gt;

&lt;p&gt;Clone the forked repository to your computer with the git clone command and position your command line inside the repository folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/YourUsername/data-version-control
$ cd data-version-control
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don’t forget to replace Your Username in the above command with your actual username. You should now have a clone of the repository on your computer.&lt;/p&gt;

&lt;p&gt;There are six folders in your repository:&lt;/p&gt;

&lt;p&gt;src/ is for source code.&lt;br&gt;
data/ is for all versions of the dataset.&lt;br&gt;
data/raw/ is for data obtained from an external source.&lt;br&gt;
data/prepared/ is for data modified internally.&lt;br&gt;
model/ is for machine learning models.&lt;br&gt;
data/metrics/ is for tracking the performance metrics of your models.&lt;br&gt;
The src/ folder contains three Python files:&lt;/p&gt;

&lt;p&gt;prepare.py contains code for preparing data for training.&lt;br&gt;
train.py contains code for training a machine learning model.&lt;br&gt;
evaluate.py contains code for evaluating the results of a machine learning model.&lt;br&gt;
The final step in the preparation is to get an example dataset you can use to practice DVC. Images are well suited for this particular tutorial because managing lots of large files is where DVC shines, so you’ll get a good look at DVC’s most powerful features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Data Version Control Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At a high level, DVC works by creating a separate version control system for data and model files, while leveraging Git for code and experiment tracking. When a new data file is added to the project, DVC stores the file in a central repository and generates a small metadata file that contains information about the data, such as its hash value and location.&lt;/p&gt;

&lt;p&gt;When a change is made to the data file, DVC generates a new metadata file with updated information about the file, including the new hash value. This metadata file is then committed to the Git repository, along with any code changes or experiment results.&lt;/p&gt;

&lt;p&gt;Let's dive deeper into how DVC works step-by-step:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Initialize a DVC project:&lt;/strong&gt; The first step is to initialize a new DVC project. This creates a new directory that contains the DVC configuration files and a Git repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Add data to the project:&lt;/strong&gt; Next, data files are added to the project using the DVC add command. When a data file is added to the project, DVC generates a small metadata file that contains information about the data, such as its hash value and location. This metadata file is stored in the DVC cache directory, along with the original data file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Track data changes:&lt;/strong&gt; When a change is made to a data file, DVC detects the change and generates a new metadata file with updated information about the file, including the new hash value. The new metadata file is stored in the DVC cache directory, and the original data file is overwritten with the new data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Commit changes to Git:&lt;/strong&gt; Once the data changes are tracked by DVC, the changes are committed to the Git repository along with any code changes or experiment results. This ensures that all changes to data and code are tracked and versioned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Share data with others:&lt;/strong&gt; To share data with others, the DVC project directory can be pushed to a shared Git repository, or data can be shared directly from the DVC cache directory.&lt;/p&gt;

&lt;p&gt;By using separate metadata files for data and models, DVC can track changes to large files without actually storing the files in the Git repository. This allows data scientists to manage and share large files without overwhelming the Git repository or slowing down the development process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Benefits of Using DVC&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Collaboration: DVC allows team members to work on the same project simultaneously, while ensuring that changes to data and models are tracked and shared.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reproducibility: DVC ensures that data, models, and experiments are stored and versioned, enabling scientists to reproduce experiments easily.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Traceability: DVC provides a detailed history of changes to data and models, making it easy to track down the source of errors or issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scalability: DVC is designed to handle large datasets, allowing data scientists to work with big data without compromising performance or storage.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Data Version Control (DVC) is a powerful tool that enables data scientists to track and manage changes to their data, models, and experiments. By using DVC alongside Git, data scientists can streamline their development process and focus on creating insights from data. DVC provides a way to manage and share large data files, collaborate with team members, and ensure reproducibility and traceability of experiments.&lt;/p&gt;

</description>
      <category>python</category>
      <category>github</category>
    </item>
    <item>
      <title>Getting started with Sentiment Analysis</title>
      <dc:creator>Rodney Kirui</dc:creator>
      <pubDate>Sat, 25 Mar 2023 17:23:48 +0000</pubDate>
      <link>https://dev.to/rodneykirui/getting-started-with-sentiment-analysis-7k7</link>
      <guid>https://dev.to/rodneykirui/getting-started-with-sentiment-analysis-7k7</guid>
      <description>&lt;p&gt;How do customers feel about your products or services? That’s important question business owners shouldn’t neglect. Positive and negative words matter. They can boost your business efforts or initiate a crisis. Luckily, you can measure customer satisfaction through sentiment analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sentiment analysis&lt;/strong&gt; is the process of analyzing online pieces of writing to determine the emotional tone they carry, whether they’re positive, negative, or neutral. In simple words, sentiment analysis helps to find the author’s attitude towards a topic. &lt;br&gt;
Essentially, sentiment analysis or sentiment classification fall into the broad category of text classification tasks where you are supplied with a phrase, or a list of phrases and your classifier is supposed to tell if the sentiment behind that is positive, negative or neutral. Sometimes, the third attribute is not taken to keep it a binary classification problem.&lt;br&gt;
Sentiment analysis tools will collect all publicly available mentions containing your predefined keyword and analyze the emotions behind the message. The results of sentiment analysis are a wealth of information for your customer service teams, product development, or marketing.&lt;br&gt;
Sentiment analysis tools will collect all publicly available mentions containing your predefined keyword and analyse the emotions behind the message. The results of sentiment analysis are a wealth of information for your customer service teams, product development, or marketing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of Sentiment Analysis&lt;/strong&gt;&lt;br&gt;
Sentiment analysis focuses on the polarity of a text (positive, negative, neutral) but it also goes beyond polarity to detect specific feelings and emotions (angry, happy, sad, etc), urgency (urgent, not urgent) and even intentions (interested v. not interested).&lt;/p&gt;

&lt;p&gt;Depending on how you want to interpret customer feedback and queries, you can define and tailor your categories to meet your sentiment analysis needs. In the meantime, here are some of the most popular types of sentiment analysis:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Graded Sentiment Analysis&lt;/strong&gt;&lt;br&gt;
If polarity precision is important to your business, you might consider expanding your polarity categories to include different levels of positive and negative:&lt;/p&gt;

&lt;p&gt;Very positive&lt;br&gt;
Positive&lt;br&gt;
Neutral&lt;br&gt;
Negative&lt;br&gt;
Very negative&lt;br&gt;
This is usually referred to as graded or fine-grained sentiment analysis, and could be used to interpret 5-star ratings in a review, for example:&lt;/p&gt;

&lt;p&gt;Very Positive = 5 stars&lt;br&gt;
Very Negative = 1 star&lt;/p&gt;

&lt;p&gt;Emotion detection&lt;br&gt;
Emotion detection sentiment analysis allows you to go beyond polarity to detect emotions, like happiness, frustration, anger, and sadness.&lt;/p&gt;

&lt;p&gt;Many emotion detection systems use lexicons (i.e. lists of words and the emotions they convey) or complex machine learning algorithms.&lt;/p&gt;

&lt;p&gt;One of the downsides of using lexicons is that people express emotions in different ways. Some words that typically express anger, like bad or kill (e.g. your product is so bad or your customer support is killing me) might also express happiness (e.g. this is bad ass or you are killing it).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aspect-based Sentiment Analysis&lt;/strong&gt;&lt;br&gt;
Usually, when analyzing sentiments of texts you’ll want to know which particular aspects or features people are mentioning in a positive, neutral, or negative way.&lt;/p&gt;

&lt;p&gt;That's where aspect-based sentiment analysis can help, for example in this product review: "The battery life of this camera is too short", an aspect-based classifier would be able to determine that the sentence expresses a negative opinion about the battery life of the product in question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multilingual sentiment analysis&lt;/strong&gt;&lt;br&gt;
Multilingual sentiment analysis can be difficult. It involves a lot of preprocessing and resources. Most of these resources are available online (e.g. sentiment lexicons), while others need to be created (e.g. translated corpora or noise detection algorithms), but you’ll need to know how to code to use them.&lt;/p&gt;

&lt;p&gt;Alternatively, you could detect language in texts automatically with a language classifier, then train a custom sentiment analysis model to classify texts in the language of your choice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Is Sentiment Analysis Important?&lt;/strong&gt;&lt;br&gt;
Since humans express their thoughts and feelings more openly than ever before, sentiment analysis is fast becoming an essential tool to monitor and understand sentiment in all types of data.&lt;/p&gt;

&lt;p&gt;Automatically analyzing customer feedback, such as opinions in survey responses and social media conversations, allows brands to learn what makes customers happy or frustrated, so that they can tailor products and services to meet their customers’ needs.&lt;/p&gt;

&lt;p&gt;For example, using sentiment analysis to automatically analyze 4,000+ open-ended responses in your customer satisfaction surveys could help you discover why customers are happy or unhappy at each stage of the customer journey.&lt;/p&gt;

&lt;p&gt;Maybe you want to track brand sentiment so you can detect disgruntled customers immediately and respond as soon as possible. Maybe you want to compare sentiment from one quarter to the next to see if you need to take action. Then you could dig deeper into your qualitative data to see why sentiment is falling or rising.&lt;br&gt;
&lt;strong&gt;The overall benefits of sentiment analysis include:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Better customer insights&lt;/strong&gt;: Sentiment analysis can help businesses to understand their customers' needs, preferences, and opinions. By analyzing customer feedback, companies can identify areas for improvement and tailor their products and services to better meet customer needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Improved brand reputation&lt;/strong&gt;: By analyzing social media posts and customer reviews, businesses can monitor their brand reputation and identify potential issues before they become major problems. This allows businesses to proactively address customer concerns and maintain a positive brand image.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Increased customer satisfaction&lt;/strong&gt;: By understanding customer feedback and sentiment, businesses can improve their products and services to better meet customer needs. This can lead to increased customer satisfaction and loyalty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Enhanced marketing campaigns&lt;/strong&gt;: Sentiment analysis can help businesses to develop more effective marketing campaigns by identifying customer preferences and trends. By analyzing social media posts and other online content, businesses can identify key influencers and tailor their messaging to better resonate with their target audience.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Streamlined customer support&lt;/strong&gt;: Sentiment analysis can help businesses to quickly identify and prioritize customer issues. By analyzing customer feedback in real-time, businesses can respond to customer inquiries and complaints more efficiently, leading to improved customer support and satisfaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Competitive advantage&lt;/strong&gt;: By analyzing customer sentiment and feedback, businesses can gain valuable insights into their competitors' strengths and weaknesses. This can help businesses to develop more effective marketing strategies and stay ahead of their competitors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Scalability&lt;/strong&gt;: Sentiment analysis can analyze large volumes of textual data quickly and accurately, making it an ideal solution for businesses with large customer bases or high volumes of social media posts and other online content to monitor.&lt;/p&gt;

&lt;p&gt;Overall, sentiment analysis in machine learning can provide businesses with valuable insights into their customers, products, and competitors, leading to improved customer satisfaction, brand reputation, and competitive advantage&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Formulating the problem statement of sentiment analysis:&lt;/strong&gt;&lt;br&gt;
Before understanding the problem statement of a sentiment classification task, you need to have a clear idea of general text classification problem. Let's formally define the problem of a general text classification task.&lt;/p&gt;

&lt;p&gt;Input: - A document d - A fixed set of classes C = {c1,c2,..,cn}&lt;/p&gt;

&lt;p&gt;Output: A predicted class c $\in$ C&lt;br&gt;
The document term here is subjective because in the text classification world. By document, it is meant tweets, phrases, parts of news articles, whole news articles, a full article, a product manual, a story, etc. The reason behind this terminology is word which is an atomic entity and small in this context. So, to denote large sequences of words, this term document is used in general. Tweets mean a shorter document whereas an article means a larger document.&lt;/p&gt;

&lt;p&gt;So, a training set of n labeled documents looks like: (d1,c1), (d2,c2),...,(dn,cn) and the ultimate output is a learned classifier.&lt;/p&gt;

&lt;p&gt;You are doing good! But one question that you must be having at this point is where the features of the documents are? Genuine question! You will get to that a bit later.&lt;/p&gt;

&lt;p&gt;Now, let's move on with the problem formulation and slowly build the intuition behind sentiment classification.&lt;/p&gt;

&lt;p&gt;One crucial point you need to keep in mind while working in sentiment analysis is not all the words in a phrase convey the sentiment of the phrase. Words like "I", "Are", "Am", etc. do not contribute to conveying any kind of sentiments and hence, they are not relative in a sentiment classification context. Consider the problem of feature selection here. In feature selection, you try to figure out the most relevant features that relate the most to the class label. That same idea applies here as well. Therefore, only a handful of words in a phrase take part in this and identifying them and extracting them from the phrases prove to be challenging tasks. But don't worry, you will get to that.&lt;/p&gt;

&lt;p&gt;Consider the following movie review to understand this better:&lt;/p&gt;

&lt;p&gt;"I love this movie! It's sweet, but with satirical humor. The dialogs are great and the adventure scenes are fun. It manages to be romantic and whimsical while laughing at the conventions of the fairy tale genre. I would recommend it to just about anyone. I have seen it several times and I'm always happy to see it again......."&lt;/p&gt;

&lt;p&gt;Yes, this is undoubtedly a review which carries positive sentiments regarding a particular movie. But what are those specific words which define this positivity?&lt;/p&gt;

&lt;p&gt;Retake a look at the review.&lt;/p&gt;

&lt;p&gt;"I love this movie! It's sweet, but with satirical humor. The dialogs are great and the adventure scenes are fun. It manages to be romantic and whimsical while laughing at the conventions of the fairy tale genre. I would recommend it to just about anyone. I have seen it several times and I'm always happy to see it again......."&lt;/p&gt;

&lt;p&gt;You must have got the clear picture now. The bold words in the above piece of text are the most important words which construct the positive nature of the sentiment conveyed by the text.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A simple sentiment classifier in Python:&lt;/strong&gt;&lt;br&gt;
Here's an example of a simple sentiment classifier in Python using the Natural Language Toolkit (NLTK) library. For this case study, you'll use an off-line movie review corpus as covered in the NLTK book &lt;a href="https://www.nltk.org/book/ch06.html#document-classification"&gt;https://www.nltk.org/book/ch06.html#document-classification&lt;/a&gt; and can be downloaded from here &lt;a href="http://www.nltk.org/nltk_data/"&gt;http://www.nltk.org/nltk_data/&lt;/a&gt; nltk provides a version of the dataset. The dataset categorizes each review as positive or negative. You need to download that first as follows:&lt;br&gt;
&lt;code&gt;python -m nltk.downloader all&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
It's not recommended to run it from Jupyter Notebook. Try to run it from the command prompt (if using Windows). It will take some time. So, be patient.&lt;/p&gt;

&lt;p&gt;For more information about NLTK datasets, make sure you visit this link. &lt;a href="https://www.nltk.org/data.html"&gt;https://www.nltk.org/data.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will be implementing Naive Bayes or let's say Multinomial Naive Bayes classifier using NLTK which stands for Natural Language Toolkit. It is a library dedicated to NLP and NLU related tasks, and the documentation is very good. It covers many techniques in a great and provides free datasets as well for experiments.&lt;/p&gt;

&lt;p&gt;This is NLTK's official website. Make sure you check it out because it has some well-written tutorials on NLP covering different NLP concepts.&lt;/p&gt;

&lt;p&gt;After all the data is downloaded, you will start by importing the movie reviews dataset by from nltk.corpus import movie_reviews. Then, you will construct a list of documents, labeled with the appropriate categories.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Load and prepare the dataset
import nltk
from nltk.corpus import movie_reviews
import random

documents = [(list(movie_reviews.words(fileid)), category)
              for category in movie_reviews.categories()
              for fileid in movie_reviews.fileids(category)]

random.shuffle(documents)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, you will define a feature extractor for documents, so the classifier will know which aspects of the data it should pay attention too. "In this case, you can define a feature for each word, indicating whether the document contains that word. To limit the number of features that the classifier needs to process, you start by constructing a list of the 2000 most frequent words in the overall corpus" Source. You can then define a feature extractor that simply checks if each of these words is present in a given document&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Define the feature extractor

all_words = nltk.FreqDist(w.lower() for w in movie_reviews.words())
word_features = list(all_words)[:2000]

def document_features(document):
    document_words = set(document)
    features = {}
    for word in word_features:
        features['contains({})'.format(word)] = (word in document_words)
    return features

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"The reason that you computed the set of all words in a document document_words = set(document), rather than just checking if the word in the document, is that checking whether a word occurs in a set is much faster than checking whether it happens in a list" - Source.&lt;/p&gt;

&lt;p&gt;You have defined the feature extractor. Now, you can use it to train a Naive Bayes classifier to predict the sentiments of new movie reviews. To check your classifier's performance, you will compute its accuracy on the test set. NLTK provides show_most_informative_features() to see which features the classifier found to be most informative.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Train Naive Bayes classifier
featuresets = [(document_features(d), c) for (d,c) in documents]
train_set, test_set = featuresets[100:], featuresets[:100]
classifier = nltk.NaiveBayesClassifier.train(train_set)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Test the classifier
print(nltk.classify.accuracy(classifier, test_set))

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;0.71&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Wow! The classifier was able to achieve an accuracy of 71% without even tweaking any parameters or fine-tuning. This is great for the first go!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Show the most important features as interpreted by Naive Bayes
classifier.show_most_informative_features(5)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Most Informative Features
       contains(winslet) = True              pos : neg    =      8.4 : 1.0
     contains(illogical) = True              neg : pos    =      7.6 : 1.0
      contains(captures) = True              pos : neg    =      7.0 : 1.0
        contains(turkey) = True              neg : pos    =      6.5 : 1.0
        contains(doubts) = True              pos : neg    =      5.8 : 1.0

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;"In the dataset, a review that mentions "Illogical" is almost 8 times more likely to be negative than positive, while a review that mentions "Captures" is about 6 times more likely to be positive" - Source.&lt;/p&gt;

&lt;p&gt;Now the question - why Naive Bayes?&lt;/p&gt;

&lt;p&gt;You chose to study Naive Bayes because of the way it is designed and developed. Text data has some practicle and sophisticated features which are best mapped to Naive Bayes provided you are not considering Neural Nets. Besides, it's easy to interpret and does not create the notion of a blackbox model.&lt;br&gt;
Naive Bayes suffers from a certain disadvantage as well:&lt;br&gt;
The main limitation of Naive Bayes is the assumption of independent predictors. In real life, it is almost impossible that you get a set of predictors which are entirely independent.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Essential SQL Commands for Data Science</title>
      <dc:creator>Rodney Kirui</dc:creator>
      <pubDate>Wed, 15 Mar 2023 10:40:20 +0000</pubDate>
      <link>https://dev.to/rodneykirui/essential-sql-commands-for-data-science-2aeb</link>
      <guid>https://dev.to/rodneykirui/essential-sql-commands-for-data-science-2aeb</guid>
      <description>&lt;p&gt;SQL (Structured Query Language) is a programming language that is widely used for managing and manipulating relational databases. For data scientists, SQL is an essential tool for accessing, querying, and transforming data stored in databases. Here are some essential SQL commands for data science:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. SELECT&lt;/strong&gt;&lt;br&gt;
The SELECT statement is used to select data from a database.&lt;br&gt;
The data returned is stored in a result table, called the result-set.&lt;br&gt;
&lt;code&gt;SELECT * FROM table_name;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;2. WHERE&lt;/strong&gt;&lt;br&gt;
The WHERE clause is used to filter records.&lt;br&gt;
It is used to extract only those records that fulfill a specified condition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column1, column2, ...
FROM table_name
WHERE condition;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;NOTE: The WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. GROUP BY&lt;/strong&gt;&lt;br&gt;
This command is used to group data based on a specific column.&lt;br&gt;
Example:&lt;br&gt;
&lt;code&gt;SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;4. ORDER BY&lt;/strong&gt;&lt;br&gt;
This command is used to sort data in ascending or descending order based on a specific column.&lt;br&gt;
The ORDER BY keyword is used to sort the result-set in ascending or descending order.&lt;br&gt;
The ORDER BY keyword sorts the records in ascending order by default. To sort the records in descending order, use the DESC keyword.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column1, column2, ...
FROM table_name
ORDER BY column1, column2, ... ASC|DESC;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: using Order by without specifying whether 'ASC or DESC' by default arranges data in an ascending order&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. JOIN&lt;/strong&gt;&lt;br&gt;
A JOIN clause is used to combine rows from two or more tables, based on a related column between them.&lt;br&gt;
&lt;code&gt;SELECT * FROM table1 JOIN table2 ON table1.column_name = table2.column_name;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
   &lt;strong&gt;a. Inner Join&lt;/strong&gt;&lt;br&gt;
he INNER JOIN keyword selects records that have matching values in both tables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;b. Left Join&lt;/strong&gt;&lt;br&gt;
The LEFT JOIN keyword returns all records from the left table (table1), and the matching records from the right table (table2). The result is 0 records from the right side, if there is no match.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name = table2.column_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;c. Right Join&lt;/strong&gt;&lt;br&gt;
The RIGHT JOIN keyword returns all records from the right table (table2), and the matching records from the left table (table1). The result is 0 records from the left side, if there is no match.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name(s)
FROM table1
RIGHT JOIN table2
ON table1.column_name = table2.column_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;d. Full Join&lt;/strong&gt;&lt;br&gt;
The FULL OUTER JOIN keyword returns all records when there is a match in left (table1) or right (table2) table records.&lt;br&gt;
Tip: FULL OUTER JOIN and FULL JOIN are the same.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2
ON table1.column_name = table2.column_name
WHERE condition;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;e. Self Join&lt;/strong&gt;&lt;br&gt;
A self join is a regular join, but the table is joined with itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name(s)
FROM table1 T1, table1 T2
WHERE condition;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6. HAVING&lt;/strong&gt;&lt;br&gt;
This command is used to filter data based on conditions after grouping.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
HAVING condition
ORDER BY column_name(s);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The HAVING clause was added to SQL because the WHERE keyword cannot be used with aggregate functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. DISTINCT&lt;/strong&gt;&lt;br&gt;
This command is used to retrieve unique values from a column. The SELECT DISTINCT statement is used to return only distinct (different) values.&lt;br&gt;
Inside a table, a column often contains many duplicate values; and sometimes you only want to list the different (distinct) values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT DISTINCT column1, column2, ...
FROM table_name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;8. COUNT, AVG, SUM&lt;/strong&gt;&lt;br&gt;
These commands are used to perform calculations on a set of data. The COUNT() function returns the number of rows that matches a specified criterion.&lt;br&gt;
COUNT() Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT COUNT(column_name)
FROM table_name
WHERE condition;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The AVG() function returns the average value of a numeric column. &lt;br&gt;
AVG() Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT AVG(column_name)
FROM table_name
WHERE condition;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SUM() function returns the total sum of a numeric column&lt;br&gt;
SUM() Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT SUM(column_name)
FROM table_name
WHERE condition;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;9. UPDATE&lt;/strong&gt;&lt;br&gt;
The UPDATE statement is used to modify the existing records in a table.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;10. DELETE&lt;/strong&gt;&lt;br&gt;
The DELETE statement is used to delete existing records in a table.&lt;br&gt;
&lt;code&gt;DELETE FROM table_name WHERE condition;&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>ULTIMATE GUIDE TO EXPLORATORY DATA ANALYSIS</title>
      <dc:creator>Rodney Kirui</dc:creator>
      <pubDate>Wed, 01 Mar 2023 09:54:37 +0000</pubDate>
      <link>https://dev.to/rodneykirui/ultimate-guide-to-exploratory-data-analysis-1f3h</link>
      <guid>https://dev.to/rodneykirui/ultimate-guide-to-exploratory-data-analysis-1f3h</guid>
      <description>&lt;p&gt;Exploratory Data Analysis is a data analytics process to understand the data in depth and learn the different data characteristics, often with visual means. This allows you to get a better feel of your data and find useful patterns in it.&lt;br&gt;
It is crucial to understand it in depth before you perform data analysis and run your data through an algorithm. You need to know the patterns in your data and determine which variables are important and which do not play a significant role in the output. Further, some variables may have correlations with other variables. You also need to recognize errors in your data. &lt;/p&gt;

&lt;p&gt;All of this can be done with Exploratory Data Analysis. It helps you gather insights and make better sense of the data, and removes irregularities and unnecessary values from data. &lt;/p&gt;

&lt;p&gt;Helps you prepare your dataset for analysis.&lt;br&gt;
Allows a machine learning model to predict our dataset better.&lt;br&gt;
Gives you more accurate results.&lt;br&gt;
It also helps us to choose a better machine learning model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps Involved in Exploratory Data Analysis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;** 1. Understand the Problem **&lt;br&gt;
Before starting the exploratory data analysis (EDA), it is essential to understand the problem you are trying to solve. What is the research question or business problem you are trying to answer? What are the goals of the analysis? Understanding the context of the data will help you frame the analysis and guide your EDA efforts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Data Collection&lt;/strong&gt;&lt;br&gt;
Data collection is an essential part of exploratory data analysis. It refers to the process of finding and loading data into our system. Good, reliable data can be found on various public sites or bought from private organizations. Some reliable sites for data collection are Kaggle, Github, Machine Learning Repository, etc.&lt;br&gt;
example&lt;br&gt;
Let’s explore steps of Exploratory data analysis in detail using customer churn analysis based on the customers behaviour on the website or app data.&lt;/p&gt;

&lt;p&gt;We will classify what kind of customers are likely to sign up for the paid subscription of a website. After analyzing and classifying the dataset, we will be able to do the targeting-based marketing or recommendation to the customers who are likely to sign up for the paid subscription plan.&lt;br&gt;
Import the Libraries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd
import numpy as np
import re
import string
import matplotlib.pyplot as plt
import seaborn as sn
from dateutil import parser
import warnings
warnings.filterwarnings('ignore')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Data is stored in csv file format, hence we are importing it using pd.read_csv&lt;br&gt;
&lt;code&gt;data = pd.read_csv('app_data.csv')&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;How many entries (Rows) and attributes(Columns) are present in the data? What is the shape of the data?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;data.shape&lt;/code&gt;&lt;br&gt;
(50000, 12)&lt;br&gt;
.shape method returns number of rows by number of columns in the dataset. So, in our dataset we have 50000 rows and 12 columns.&lt;/p&gt;

&lt;p&gt;Display the first 5 entries of the data.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;data.head()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;.head() method gives the first 5 rows of the dataset. It is useful for seeing some example values for each variable.&lt;/p&gt;

&lt;p&gt;What are the different features available in the data?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;data.columns&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;.columns method returns all the columns in the dataset.&lt;/p&gt;

&lt;p&gt;Display the distribution of Numerical Variables.&lt;br&gt;
&lt;code&gt;data.describe()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;.describe() method summarizes the count, mean, standard deviation, min, and max for numeric variables. It helps to understand the skewness in the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Data Cleaning&lt;/strong&gt;&lt;br&gt;
Data cleaning refers to the process of removing unwanted variables and values from your dataset and getting rid of any irregularities in it. Such anomalies can disproportionately skew the data and hence adversely affect the results. Some steps that can be done to clean data are:&lt;br&gt;
Missing Data&lt;br&gt;
Irregular Data (Outliers)&lt;br&gt;
Unnecessary Data — Repetitive Data, Duplicates and more&lt;br&gt;
Inconsistent Data — Capitalization, Addresses and more&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Explore the Data&lt;/strong&gt;&lt;br&gt;
Once you have cleaned the data, the next step is to explore the data. Exploratory data analysis involves examining the data to identify patterns, relationships, and trends. There are several ways to explore the data:&lt;/p&gt;

&lt;p&gt;a. Descriptive Statistics: Descriptive statistics summarize the data's main characteristics, such as mean, median, mode, standard deviation, and variance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import math
import statistics
import numpy as np
import scipy.stats
import pandas as pd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are all the packages you’ll need for Python statistics calculations. Usually, you won’t use Python’s built-in math package, but it’ll be useful in this tutorial. Later, you’ll import matplotlib.pyplot for data visualization.&lt;/p&gt;

&lt;p&gt;b. Data Visualization: Data visualization is a powerful way to explore the data. You can create charts, graphs, and plots to visualize the data's distribution, relationships, and patterns.&lt;/p&gt;

&lt;p&gt;c. Statistical Tests: Statistical tests can help you test hypotheses and identify significant differences between groups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Identify Outliers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An outlier is a data point that differs significantly from the majority of the data taken from a sample or population. There are many possible causes of outliers, but here are a few to start you off:&lt;/p&gt;

&lt;p&gt;Natural variation in data&lt;br&gt;
Change in the behavior of the observed system&lt;br&gt;
Errors in data collection&lt;br&gt;
Data collection errors are a particularly prominent cause of outliers. For example, the limitations of measurement instruments or procedures can mean that the correct data is simply not obtainable. Other errors can be caused by miscalculations, data contamination, human error, and more.&lt;/p&gt;

&lt;p&gt;There isn’t a precise mathematical definition of outliers. You have to rely on experience, knowledge about the subject of interest, and common sense to determine if a data point is an outlier and how to handle it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Identify Patterns and Relationships&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you have explored the data, you can identify patterns and relationships between variables. Correlation analysis can help you identify the relationship between two variables, and regression analysis can help you predict the outcome variable based on the predictor variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Iterate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Iterative data exploration is an essential aspect of the exploratory data analysis (EDA) process. EDA is an iterative process that involves repeatedly looking at data from different angles and perspectives to gain a deeper understanding of its properties and relationships.&lt;/p&gt;

&lt;p&gt;In the initial stages of EDA, you may start with a general overview of the data to understand its size, shape, and structure. Once you have a basic understanding of the data, you may start to explore specific aspects, such as relationships between variables, distributions, or outliers.&lt;/p&gt;

&lt;p&gt;As you uncover new information, you may need to go back and revisit earlier steps of the process, updating or refining your analysis. This iterative approach allows you to build a more complete and nuanced understanding of the data, and can help you identify patterns, trends, or anomalies that may be missed with a single pass through the data.&lt;/p&gt;

&lt;p&gt;Overall, iterative data exploration is a critical part of the EDA process, allowing you to explore data from different angles, uncover hidden relationships, and gain a deeper understanding of its properties and patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Reporting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After completing an exploratory data analysis (EDA), it's important to communicate your findings to others. One way to do this is by creating a report that summarizes your EDA process, the insights gained, and any recommendations or conclusions that can be drawn from the data.&lt;/p&gt;

&lt;p&gt;Here are some steps you can follow to create a report after an EDA:&lt;/p&gt;

&lt;p&gt;Start with an introduction: Begin by providing some context about the data and the purpose of the analysis. This could include a brief overview of the data source, the problem you're trying to solve, or the goals of the analysis.&lt;/p&gt;

&lt;p&gt;Describe your EDA process: Explain the methods you used to explore the data, such as summary statistics, visualizations, or hypothesis testing. Provide details on the data cleaning and preparation steps you took, as well as any challenges or limitations you encountered.&lt;/p&gt;

&lt;p&gt;Present your findings: Summarize the key insights you gained from the analysis. This could include trends, patterns, correlations, outliers, or other noteworthy observations. Use visualizations, such as charts, graphs, or tables, to help illustrate your findings.&lt;/p&gt;

&lt;p&gt;Draw conclusions: Based on your findings, draw conclusions about the data and the problem you're trying to solve. Identify any relationships, trends, or patterns that are significant, and provide context for why they matter. Be sure to acknowledge any limitations or uncertainties in your analysis.&lt;/p&gt;

&lt;p&gt;Make recommendations: Based on your conclusions, provide recommendations for next steps or actions that could be taken based on the insights gained from the EDA. This could include further analysis, data collection, or changes to business processes.&lt;/p&gt;

&lt;p&gt;Conclude with a summary: Provide a brief summary of the key points of your report, highlighting the most important findings and recommendations.&lt;/p&gt;

&lt;p&gt;Overall, the goal of the report is to provide a clear, concise, and accurate summary of the EDA process and its results. It should be tailored to the intended audience, using language and visuals that are accessible and easy to understand.&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Introduction to SQL</title>
      <dc:creator>Rodney Kirui</dc:creator>
      <pubDate>Sun, 19 Feb 2023 08:34:47 +0000</pubDate>
      <link>https://dev.to/rodneykirui/introduction-to-sql-1767</link>
      <guid>https://dev.to/rodneykirui/introduction-to-sql-1767</guid>
      <description>&lt;p&gt;&lt;strong&gt;INTRODUCTION&lt;/strong&gt;&lt;br&gt;
SQL is one of the most common programming languages for interacting with data.&lt;/p&gt;

&lt;p&gt;SQL consists of a data definition language, data manipulation language, and a data control language.&lt;/p&gt;

&lt;p&gt;The data definition language deals with the schema creation and modification e.g., CREATE TABLE statement allows you to create a new table in the database and the ALTER TABLE statement changes the structure of an existing table.&lt;br&gt;
The data manipulation language provides the constructs to query data such as the SELECT statement and to update the data such as INSERT, UPDATE and DELETE statements.&lt;br&gt;
The data control language consists of the statements that deal with the user authorization and security such as GRANT and REVOKE statements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HISTORY OF SQL&lt;/strong&gt;&lt;br&gt;
SQL was first brought into origin by IBM Researcher’s – Raymond F. Boyce, and Donald D. Chamberlin in the 1970’s and the initial version created by them was called SEQUEL or Structured English Query Language which worked on manipulation and retrieving data from IBM databases.&lt;/p&gt;

&lt;p&gt;After commercial testing, IBM released various versions like System/38, SQL/DS, and DB2 in 1979, 1981, and 1983, respectively.&lt;/p&gt;

&lt;p&gt;In 1986 making a breakthrough, ANSI and ISO adopted the Standard “Database Language SQL”.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RULES OF WRITING SQL QUERIES&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;SQL statements can span in multi lines.&lt;/li&gt;
&lt;li&gt;SQL queries are capable of performing almost all actions on the database&lt;/li&gt;
&lt;li&gt;SQL queries are not case sensitive, but generally, we write SQL keywords in Uppercase for better understanding.&lt;/li&gt;
&lt;li&gt;SQL follows the principle of tuple relational calculus and the rules of relational algebra.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;SQL Commands and Types&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. DDL (Data Definition Language)&lt;/strong&gt;&lt;br&gt;
Deals with the schema creation and modification e.g., CREATE TABLE statement allows you to create a new table in the database and the ALTER TABLE statement changes the structure of an existing table. EXAMPLE;&lt;br&gt;
&lt;code&gt;CREATE TABLE DataFlair_Employee (&lt;br&gt;
name_emp  varchar(50),&lt;br&gt;
post_emp varchar(50),&lt;br&gt;
email varchar(50),&lt;br&gt;
age int,&lt;br&gt;
salary varchar(10)&lt;br&gt;
);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. DATA MANIPULATION LANGUAGE&lt;/strong&gt;&lt;br&gt;
provides the constructs to query data such as the SELECT statement and to update the data such as INSERT, UPDATE and DELETE statements.&lt;br&gt;
Example;Let us populate the database by using the insert command :&lt;br&gt;
Insert into DataFlair_Employee (name_emp , post_emp , email , age , salary)&lt;br&gt;
&lt;code&gt;Insert into DataFlair_Employee (name_emp , post_emp , email , age , salary)&lt;br&gt;
Values ('Ram' ,  "Intern", 'ram@dataflair.com', 21 , '10000' ),&lt;br&gt;
('Shyam', "Manager", 'shyam@dataflair.com' , 25 , '25000'),&lt;br&gt;
('Ria', "Analyst" , 'ram@dataflair.com', 23 , '20000'),&lt;br&gt;
('Kavya', "Senior Analyst" , 'kavya@dataflair.com', 31 , '30000'),&lt;br&gt;
('Aman', "Database Operator",' rish@dataflair.com' , 26 , '15000') ;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. DQL (Data Query Language)&lt;/strong&gt;&lt;br&gt;
It is used to retrieve the data stored in the database created by us and the data we store in the database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. DCL (Data Control Language)&lt;/strong&gt;&lt;br&gt;
consists of the statements that deal with the user authorization and security such as GRANT and REVOKE statements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performing a simple calculation&lt;/strong&gt;&lt;br&gt;
The following example uses the SELECT statement to get the first name, last name, salary, and new salary:&lt;br&gt;
&lt;code&gt;SELECT &lt;br&gt;
first_name, &lt;br&gt;
last_name, &lt;br&gt;
salary, &lt;br&gt;
salary * 1.05&lt;br&gt;
FROM&lt;br&gt;
    employees;&lt;/code&gt;&lt;br&gt;
The expression salary * 1.05 adds 5% to the salary of every employee. By default, SQL uses the expression as the column heading:&lt;/p&gt;

&lt;p&gt;To assign an expression or a column an alias, you specify the AS keyword followed by the column alias as follows:&lt;/p&gt;

&lt;p&gt;expression AS column_alias&lt;br&gt;
For example, the following SELECT statement uses the new_salary as the column alias for the salary * 1.05 expression:&lt;br&gt;
&lt;code&gt;SELECT &lt;br&gt;
first_name, &lt;br&gt;
last_name, &lt;br&gt;
salary, &lt;br&gt;
salary * 1.05 AS new_salary&lt;br&gt;
FROM&lt;br&gt;
    employees;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CONCLUSION&lt;/strong&gt;&lt;br&gt;
In summary, SQL provides a standard syntax for interacting with relational databases, enabling users to easily retrieve, modify, and manage data in a variety of contexts.&lt;/p&gt;

&lt;p&gt;Overall, the versatility and efficiency of SQL make it a critical component of modern data-driven applications, from business intelligence and data warehousing to web development and analytics.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
