<?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 Grace Mwega on Medium]]></title>
        <description><![CDATA[Stories by Grace Mwega on Medium]]></description>
        <link>https://medium.com/@gcmwega09?source=rss-cac8fdefd5e9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*BdU3VZ28iUV9qPXG</url>
            <title>Stories by Grace Mwega on Medium</title>
            <link>https://medium.com/@gcmwega09?source=rss-cac8fdefd5e9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:41:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gcmwega09/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[DATA VERSION CONTROL]]></title>
            <link>https://medium.com/@gcmwega09/data-version-control-7f13948f3a5d?source=rss-cac8fdefd5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f13948f3a5d</guid>
            <dc:creator><![CDATA[Grace Mwega]]></dc:creator>
            <pubDate>Thu, 30 Mar 2023 11:16:40 GMT</pubDate>
            <atom:updated>2023-03-30T11:16:40.286Z</atom:updated>
            <content:encoded><![CDATA[<p>Data Version Control (DVC) is an open-source tool for managing and versioning machine learning (ML) models and datasets. It seamlessly integrates with Git, a well-known code version control system to provide a comprehensive solution for managing data science projects.</p><p>It is essentially like Git but is used for data. With DVC, you can keep the information about different versions of your data in Git while storing your original data elsewhere. You are probably already familiar with Git’s elegance if you have ever written any code. With Git, we can, among other things, commit changes, make various branches from a source, and merge our branches back into the original. Version control systems have historically been used to manage code.</p><p>Managing data and models is also necessary given the development of ML and data science, though. DVC can help in this situation. Data scientists can collaborate with other team members, easily replicate experiments, and track changes to their data and models thanks to DVC.</p><p>Data and code are separated in DVC to function. It creates a unique directory for storing data that can be versioned using Git. This makes it possible for data scientists to track changes to the data and go back to an earlier version if necessary. Additionally, DVC enables data scientists to share data among various experiments and projects without duplicating data or taking up extra space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*RPfoIb1sUoIB_pOZ" /></figure><p>Start with installing the package with pip</p><pre>pip install dvc</pre><p>or with conda</p><pre>conda install -c conda-forge dvc</pre><p>After DVC is installed, in a Git project, initialize it by running</p><pre>dvc init</pre><p>.dvc/.gitignore and .dvc/config is created. Commit this change with</p><pre>git commit -m &quot;Initialize DVC&quot;</pre><p>To start tracking a file or directory, use dvc add</p><p>To track the data directory, use</p><pre>dvc add data</pre><p>The information of the added file or directory will be stored in .dvc file nameddata.dvc . This is a small text file that stores information on how to access the original data but not the original data itself.</p><p>Since the size of this text file is small, it can be versioned like source code with Git.</p><p>Now simply commit the dvcfile as you would with source code. Make sure to <a href="https://github.com/khuyentran1401/Machine-learning-pipeline/blob/master/.gitignore">add </a><a href="https://github.com/khuyentran1401/Machine-learning-pipeline/blob/master/.gitignore">data to </a><a href="https://github.com/khuyentran1401/Machine-learning-pipeline/blob/master/.gitignore">.gitignore</a> beforehand to avoid committing the data.</p><pre>git add data.dvc<br>git commit -m &quot;add data&quot;</pre><p>Just like how we usegit add remote to store the URL of the remote repository, we also want to use dvc remote add to store the location of the remote storage.</p><p>DVC allows us to store our data on Google Drive, Amazon S3, Azure Blob Storage, Google Cloud Storage, Aliyun OSS, SSH, HDFS, and HTTP. Since I assume everybody has Google Drive, let’s learn how to store our data on Google Drive</p><p>To make changes, use</p><pre>dvc add data<br>git commit data.dvc -m &#39;Data updates&#39;<br>dvc push<br>git push origin &lt;branch&gt;</pre><p>To retrieve the data, simply type</p><pre>dvc pull<br><br></pre><ul><li>dvc add to track the file</li><li>dvc push to push the data to the remote storage</li><li>dvc pull to pull the data from the remote storage</li><li>dvc checkout to download the other versions of your data</li></ul><p>Some Key features of Data Version Control are :</p><p>(i)DVC’s capability to track model changes is yet another crucial feature. DVC keeps track of model modifications and stores the configuration files for those models. This makes it simple for data scientists to replicate experiments and assess the effectiveness of various models. Additionally, DVC integrates with well-liked ML frameworks like TensorFlow, PyTorch, and Scikit-learn, making it simple to version ML models created with these frameworks. <br> <br>(ii) Projects involving data science must have strong team collaboration, which DVC facilitates. DVC enables users to collaborate on the same project at the same time without interfering with one another’s productivity. Additionally, it makes it simple to reuse work and prevent duplication by enabling users to share data and models across various projects and teams.</p><p>(iii)The ability to build data processing pipelines, automate testing, and make model deployment simple are just a few of the additional helpful features that DVC offers. Additionally, it integrates with well-known cloud services like AWS and Google Cloud, which makes it simple to store and manage data in the cloud. <br> <br> Therefore, data version control is a crucial tool for data science projects. It enables team collaboration, straightforward experiment replication, and management and versioning of data and models for data scientists. DVC is a superb free and open-source tool for managing data science projects and offers a comprehensive solution.</p><p>The diagram below describe all the DVC commands and relationships between local cache and cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*VFoUX-c3AoXtCS0h.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/0*zCNXsGU5SLq6F7iX" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f13948f3a5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GETTING STARTED WITH SENTIMENT ANALYSIS]]></title>
            <link>https://medium.com/@gcmwega09/getting-started-with-sentiment-analysis-db96e838b03?source=rss-cac8fdefd5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/db96e838b03</guid>
            <dc:creator><![CDATA[Grace Mwega]]></dc:creator>
            <pubDate>Wed, 22 Mar 2023 13:20:35 GMT</pubDate>
            <atom:updated>2023-03-22T13:20:35.184Z</atom:updated>
            <content:encoded><![CDATA[<p>Sentiment analysis is a method for extracting personal information such as opinions, emotions, attitudes, and feelings from the text. It entails analyzing the language used in a text to determine the writer’s feelings about a specific subject or entity. Sentiment analysis is a tool to identify, quantify, extract, and study personal information from textual data. It is a part of the Natural Language Processing field (NLP).</p><p>Most businesses make decisions from reviews people give eg Netflix when people leave a positive or negative comment, a like or dislike on a movie, they evaluate these reviews and use them to understand why they did or did not like the movie. Sentiment analysis tries to quantify the emotion expressed in textual data. One of the most common applications of sentiment analysis is for brands and businesses to evaluate customer feedback and track their level of happiness. It would be prohibitively expensive to have human staff read customer reviews to determine whether or not the customers are satisfied with the business, service, or products. In these instances, brands and businesses employ machine learning techniques such as sentiment analysis to achieve comparable results at scale.</p><p>To conduct a sentiment analysis :</p><p>a. Select your dataset: To teach your sentiment analysis model, you’ll need a dataset. You can either build your own dataset or use one that already exists. Many datasets are accessible online, eg at Kaggle . You will find various datasets that you may use.</p><p>b. Preprocess your data: After you have obtained your information, you must preprocess it. This entails cleaning and formatting the data so that it can be used for mood analysis. Stop words may need to be removed, all text should be lowercase, and text should be converted to a number format. You also need to import the libraries needed for this analysis eg:</p><p><strong><em>import pandas as pd</em></strong></p><p><strong><em>import numpy as np</em></strong></p><p><strong><em>import nltk</em></strong></p><p>Ntlk is a tool that is used to work with NLP in Python. A variety of tasks can be performed using NLTK such as tokenizing, parse tree visualization, etc…</p><p>(i) Tokenization</p><p>Tokens are smaller pieces of text that have been broken down. Tokens are a minor component of the content. If we have a sentence, the idea is to separate each word and create a vocabulary so that we can individually represent all words in a list. Tokens include numbers, phrases, and so on.</p><p>Eg:</p><p><strong><em># Import the package<br>from nltk import word_tokenize</em></strong></p><p><strong><em># Tokenize the sample<br>sample_tokens = word_tokenize(sample)</em></strong></p><p>(ii)Lowercase conversion</p><p>We don’t want our model to be confused when it sees the same word in various cases, such as one with a capital letter and one without, and interprets them differently. To prevent redundancy in the token list, we convert all words to lowercase.</p><p><strong><em>#make lowercase</em></strong></p><p><strong><em>for a word in tokenized_sent:</em></strong></p><p><strong><em>words. append(word.lower())</em></strong></p><p><strong><em>#print some</em></strong></p><p><strong><em>words[:10]</em></strong></p><p>(iii) Stop Words Removal</p><p>When we use textual features to model, we will face a lot of noise. These are stop words such as the, he, her, and so on that do not assist us and should be removed before processing for cleaner processing inside the model. We can see all of the stop terms in the English language using NLTK.</p><p><strong><em>#remove stopwords</em></strong></p><p><strong><em>import stopwords from nltk.corpus</em></strong></p><p><strong><em>processed_text = [word for word in words if word not in stop.words (‘English’)]</em></strong></p><p><strong><em>processed_text</em></strong></p><p>c. Select a model and train it: For sentiment analysis, there are numerous models and methods available, including rule-based approaches, machine learning, and deep learning. You should select a model that best suits your data and goals. Once you have decided on a model, you must train it with your information. Feeding your dataset into the model and adjusting model parameters to better performance is what this entails.</p><p>d. Put your model to the test and assess it: After you’ve taught your model, you should put it to the test to see how well it works. A test dataset can be used to assess the accuracy of your model and make any required adjustments.</p><p>e. Use the model to categorize new tweets: After training and evaluating the model, it can be used to classify new tweets as positive or negative. The feature extraction method can be applied to new tweets, and the machine learning model can use the features to predict sentiment.</p><p>Overall, sentiment analysis using machine learning can be a useful tool for automatically categorizing tweets as positive or unfavorable. Following these steps will allow you to create a model capable of analyzing new tweets and providing useful insights into people’s attitudes and opinions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db96e838b03" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Essential SQL Commands for Data Science]]></title>
            <link>https://medium.com/@gcmwega09/essential-sql-commands-for-data-science-e23bf598a4ce?source=rss-cac8fdefd5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/e23bf598a4ce</guid>
            <dc:creator><![CDATA[Grace Mwega]]></dc:creator>
            <pubDate>Mon, 13 Mar 2023 15:14:26 GMT</pubDate>
            <atom:updated>2023-03-13T15:14:26.457Z</atom:updated>
            <content:encoded><![CDATA[<p>SQL(Structured Query Language) is an important tool in Data Science. Relational systems are managed and manipulated using it. Filtering, sorting, grouping, and aggregating data are just a few of the many data manipulation operations that can be carried out using SQL.</p><p>Here are some of the important SQL commands:</p><p>(i)SELECT</p><p>Data from a database can be retrieved using the SELECT command. You can define the columns you want to retrieve and filter the rows according to particular criteria.</p><p>Eg :</p><p>SELECT column1, column2</p><p>FROM table_name</p><p>WHERE condition;</p><p>Column 1 and column 2 represent the columns we want to select and table_name represents the table that contains the data.</p><p>(ii)FROM</p><p>The database or tables from which you want to retrieve data are specified in the FROM statement.</p><p>Eg:</p><p>SELECT column 1,</p><p>FROM table_name</p><p>(iii)JOIN</p><p>Based on a shared column between two or more tables, the JOIN clause is used to merge rows from those columns.</p><p>Eg:</p><p>SELECT *</p><p>FROM table1</p><p>JOIN table2</p><p>ON table1.column1 = table2.column2;</p><p>There are examples of JOIN statements:</p><p>a. INNER JOIN</p><p>SELECT column 1, column 2<br>FROM column 1<br>INNER JOIN column 2<br>ON column 1= column 2;</p><p>b. OUTER JOIN</p><p>SELECT column 1, column 2<br>FROM column 1<br>OUTER JOIN column 2<br>ON column 1= column 2;</p><p>c. LEFT JOIN</p><p>SELECT column 1, column 2<br>FROM column 1<br>LEFT JOIN column 2<br>ON column 1= column 2;</p><p>d. RIGHT JOIN</p><p>SELECT column 1, column 2<br>FROM column 1<br>RIGHT JOIN column 2<br>ON column 1= column 2;</p><p>e. RIGHT OUTER JOIN</p><p>SELECT column 1, column 2<br>FROM column 1<br>RIGHT OUTER JOIN column 2<br>ON column 1= column 2;</p><p>(IV)WHERE</p><p>Data can be filtered using the WHERE statement according to given criteria. You should become proficient in using WHERE to only obtain data that satisfies specific requirements. It filters rows based on specific conditions.</p><p>Eg:</p><p>SELECT column1, column2</p><p>FROM table_name</p><p>WHERE column1 = ‘value’;</p><p>(v)GROUP BY</p><p>Used to group rows that have the same values in a specific column. Can be used to calculate summaries of the grouped data.</p><p>Eg:</p><p>SELECT column1, COUNT(column2)</p><p>FROM table_name</p><p>GROUP BY column1;</p><p>(vi)ORDER BY</p><p>Used to sort the result set in ascending or descending order.</p><p>Eg:</p><p>SELECT column1, column2</p><p>FROM table_name</p><p>ORDER BY column1 ASC;</p><p>(vii)UNION</p><p>Used to combine the result sets of two or more SELECT statements into a single result set. The <strong>SELECT </strong>statements must have the same number of columns, and the columns must have compatible data types. Duplicate rows are automatically removed from the result set.</p><p>Eg:</p><p>SELECT column1, column2</p><p>FROM table1</p><p>UNION S</p><p>ELECT column1, column2</p><p>FROM table2;</p><p>(viii) SUM</p><p>Used to calculate the sum of a numeric column.</p><p>Eg:</p><p>SELECT SUM(column1)</p><p>FROM table_name;</p><p>(ix)CREATE</p><p>Used to create new tables, views, and other database objects.</p><p>Eg:</p><p>CREATE TABLE table_name(<br> column 1 data type,<br>column 2 data type,<br> column 3 data type,<br> column 4 data type<br>);</p><p>The data types can be Integers, Characters, Var Characters . We can also specify the maximum length for our data type eg : Id int(50), name varchar (30).</p><p>(x) INSERT</p><p>Used to insert data into a database table.</p><p>Eg:</p><p>INSERT INTO table_name(column_name)<br>VALUES ();</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e23bf598a4ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploratory data analysis ultimate guide]]></title>
            <link>https://medium.com/@gcmwega09/exploratory-data-analysis-ultimate-guide-8be0d679286b?source=rss-cac8fdefd5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8be0d679286b</guid>
            <dc:creator><![CDATA[Grace Mwega]]></dc:creator>
            <pubDate>Sun, 26 Feb 2023 16:57:10 GMT</pubDate>
            <atom:updated>2023-02-26T16:57:10.821Z</atom:updated>
            <content:encoded><![CDATA[<p>EDA is an important step in the data analysis procedure. It is the process of analyzing and visualizing data in order to find trends and relationships that will aid us in understanding the data and making informed decisions. This essay will review the ultimate guide to exploratory data analysis.</p><p>(a)Data Analysis<br>The first step in exploratory data analysis is to fully comprehend the data. Examining the data to establish its quality, completeness, and accuracy is part of this process. You should also become conversant with the layout and format of the data, including the data types, variable names, and variable values.</p><p>(b)Cleaning Data<br>The process of detecting and correcting errors, inconsistencies, and missing numbers in data is known as data cleaning. This is an important step in assuring that the data is correct and usable for analysis. Cleansing data involves multiple steps: identifying missing values, outliers, and duplicates and fixing them appropriately.</p><p>©Descriptive analysis<br>Descriptive analysis is used to give a summary and give explanation of your data. It provides an overview of the central trends, variability, and distribution of your data. Some common descriptive statistics include measures of central tendencies, such as mean, median, mode, and measures of variability. B. Standard deviation and range.</p><p>(d)Data visualization<br>Data visualization is the process of creating visual representations of data to identify patterns and relationships. Data visualization is an important step in exploratory data analysis since it helps you better understand your data and effectively communicate your findings.A crucial phase of the data science method is exploratory data analysis (EDA). To gain insights and make decisions, it includes the process of summarizing, visualizing, and exploring data. Histograms, boxplots, scatterplots, and heatmaps are just a few of the numerous visualizations that are accessible for EDA. You must choose the right visualization type, choose the questions you want to address, and use the right visualizations to explore the data in order to use EDA in reality. Mostly used data visualization techniques include :</p><p>i. Histograms: Are used to show how a piece of information is distributed. They can be applied to analyze distributions, find trends, and find outliers.</p><p>ii. Boxplots: The lowest, maximum, median, and quartiles of a dataset are displayed using boxplots. They can be used to compare various databases and spot outliers.</p><p>iii. Scatter plots: Are used to display the connection between two variables, scatterplots are used. They can be used to spot patterns, outliers, and correlations between different variables.</p><p>iv. Heat maps: To see the connection between two or more factors, use heat maps. They can be used to spot patterns, distinguish outliers, and find correlations.</p><p>We also use tools like Tableau, Power BI, Qlik View, and Google charts to visualize our data to make it easier to understand</p><p>(e)Analysis of Correlation<br>The connection between two variables can be established through correlation analysis. Understanding the relationship between two factors and whether there is a positive or negative correlation is made possible by correlation analysis. The Pearson correlation coefficient and the Spearman rank correlation coefficient are two methods for performing correlation research.</p><p>(f)Testing Hypotheses<br>To find out whether a theory regarding the data is accurate or not, hypothesis testing is used. Formulating a hypothesis, selecting a significance level, gathering data, and running statistical tests are all stages in the hypothesis testing process. A variety of hypotheses, including null and alternative hypotheses, can be tested using hypothesis testing.</p><p>(g)Machine Learning<br>Machine learning is an effective instrument for data analysis that can assist in pattern recognition and prediction. The data is used to teach machine learning algorithms, which can then use the data to make predictions. The methods for clustering, classification, random forests, and regression are frequently used in machine learning.</p><p>Exploratory Data Analysis is very important in the process of data analysis. Using these steps, you can conduct efficient exploratory data analysis can conduct efficient exploratory data analysis using these steps and get insightful information from your data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8be0d679286b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[INTRODUCTION TO SQL FOR DATA SCIENCE]]></title>
            <link>https://medium.com/@gcmwega09/introduction-to-sql-for-data-science-87629f00aaa8?source=rss-cac8fdefd5e9------2</link>
            <guid isPermaLink="false">https://medium.com/p/87629f00aaa8</guid>
            <dc:creator><![CDATA[Grace Mwega]]></dc:creator>
            <pubDate>Sun, 19 Feb 2023 20:04:15 GMT</pubDate>
            <atom:updated>2023-02-19T20:04:15.577Z</atom:updated>
            <content:encoded><![CDATA[<p>INTRODUCTION TO SQL FOR DATA SCIENCE</p><p>SQL which is a programming language means Structured Query Language. It is mostly used in data analysis. It provides an easy way for manipulating and querying databases. We will cover the basics of python, its syntax, structure, and commands that are used in SQL.</p><p>An SQL server executes SQL statements by using one of the following processes: Single SQL statement processing, Batch processing, Stored procedure, and trigger execution, Execution plan caching and reuse, and Parallel Query processing.</p><p>SQL is a programming language used to manage and query relational databases. Relational databases are used to store structured data in tables consisting of rows and columns. SQL allows users to perform various operations on these tables, such as inserting, updating, deleting, and querying data.</p><p>The first step to getting started with SQL is installing a database management system (DBMS) such as MySQL, PostgreSQL, or MongoDB. This will provide a platform for creating and managing the database. After installing a DBMS, the next step is to create a database and populate it with data. This can be done using either SQL statements</p><p>Once the database is set up and populated with data, SQL can be used to analyze the data. SQL makes it easy to query and filter data, aggregate data, and join tables to answer complex questions. This makes it an invaluable tool for data analysis.</p><p>SQL has Data Definition Language which is used to define language and manage all the objects in an SQL. Data Manipulation Language is used to select, insert, update, and delete data. For each object class there are usually CREATE TABLE, ALTER TABLE, and DROP TABLE. The basic syntax of SQL is:</p><p>SELECT [column1, column2, …]</p><p>FROM [table1, table2, …]</p><p>WHERE [condition];</p><p>SQL has a wide variety of commands that can be used to manipulate and query data in relational databases. Some of the more common SQL commands are:</p><p>(a)SELECT: Retrieves data from one or more table.</p><p>Eg SELECT column 1, column 2, column 3</p><p>FROM table_name</p><p>WHERE[condition]</p><p>(b)INSERT: Adds new data to the table.</p><p>Eg INSERT INTO table_name</p><p>values(1,2,3,4)</p><p>©UPDATE: Change existing data in the table.</p><p>Eg UPDATE column 1</p><p>SET column1=’’ ‘’</p><p>WHERE [condition]</p><p>(d) DELETE: Deletes data from a table.</p><p>Eg DELETE table_name</p><p>WHERE [condition]</p><p>(e)CREATE TABLE: Creates a new table.</p><p>Eg CREATE TABLE table_name(</p><p>Column 1 datatype,</p><p>Column 2 datatype,</p><p>column n datatype,</p><p>(f)ALTER TABLE: Change the structure of an existing table.</p><p>Eg ALTER TABLE table_name</p><p>ADD Column 1 datatype,</p><p>(g)DELETE TABLE: Deletes a table from the database.</p><p>Eg DELETE TABLE table_name,</p><p>(h)JOIN: joins data from two or more tables based on a common column.</p><p>(i)GROUP BY: Groups data based on one or more columns.</p><p>(j)SORT BY: sorts data by one or more columns.</p><p>(k)DISTINCT: Gets unique values <strong>​from</strong> a column.</p><p>SQL Data Types:</p><p>SQL supports a lot of data types and this including:</p><p>INT: integer values, FLOAT: floating values, CHAR: fixed-length strings. VARCHAR: strings of variable length, DATE: Dates. TIME: time, TIMESTAMP: Date and time values.</p><p>SQL is a programming language used widely for data analysis. It provides an easy way to manipulate and query relational databases used to store structured data. In this article, we covered the basics of SQL, including syntax, structure, and commands used to analyze SQL <strong>.</strong> With this knowledge, you can begin to explore the many ways SQL can be used to analyze and manipulate data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87629f00aaa8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>