<?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 Bashir Salisu on Medium]]></title>
        <description><![CDATA[Stories by Bashir Salisu on Medium]]></description>
        <link>https://medium.com/@bsalisu2017?source=rss-d63a62a4bdd3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*NA0fV372LZ0nNFzg</url>
            <title>Stories by Bashir Salisu on Medium</title>
            <link>https://medium.com/@bsalisu2017?source=rss-d63a62a4bdd3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 13:09:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bsalisu2017/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[Unveiling the Power of Binary Logistic Regression: A Practical Guide]]></title>
            <link>https://medium.com/@bsalisu2017/unveiling-the-power-of-binary-logistic-regression-a-practical-guide-6365731a7ecf?source=rss-d63a62a4bdd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6365731a7ecf</guid>
            <dc:creator><![CDATA[Bashir Salisu]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 13:20:53 GMT</pubDate>
            <atom:updated>2024-04-16T13:20:53.896Z</atom:updated>
            <content:encoded><![CDATA[<p>Introduction:</p><p>In the realm of machine learning, binary logistic regression stands out as a fundamental yet powerful technique for classification tasks. In this Medium blog post, we’ll embark on a journey to understand the intricacies of binary logistic regression, its applications, and how to implement it using Python’s scikit-learn library.</p><p>Understanding Binary Logistic Regression:</p><p>Binary logistic regression is a statistical method used for predicting the probability of a binary outcome based on one or more predictor variables. Unlike linear regression, which predicts continuous outcomes, logistic regression predicts the probability of a categorical outcome falling into one of two classes.</p><p>Applications of Binary Logistic Regression:</p><p>Binary logistic regression finds application in various domains, including healthcare, finance, marketing, and more. Some common use cases include:</p><ol><li>Predicting customer churn in telecommunications.</li><li>Diagnosing diseases based on medical test results.</li><li>Assessing the likelihood of loan default in banking.</li></ol><p>Implementing Binary Logistic Regression:</p><p>Let’s dive into a practical implementation of binary logistic regression using Python’s scikit-learn library. We’ll use a hypothetical example of predicting customer churn in a telecom company.</p><pre>import pandas as pd<br>from sklearn.model_selection import train_test_split<br>from sklearn.linear_model import LogisticRegression<br>from sklearn.metrics import accuracy_score, confusion_matrix<br><br># Load the dataset<br>telecom_data = pd.read_csv(&#39;telecom_churn.csv&#39;)<br><br># Prepare the data<br>X = telecom_data.drop(&#39;Churn&#39;, axis=1)<br>y = telecom_data[&#39;Churn&#39;]<br><br># Split the data into training and testing sets<br>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<br><br># Initialize and fit the logistic regression model<br>logistic_model = LogisticRegression()<br>logistic_model.fit(X_train, y_train)<br><br># Predict on the testing set<br>y_pred = logistic_model.predict(X_test)<br><br># Evaluate the model<br>accuracy = accuracy_score(y_test, y_pred)<br>conf_matrix = confusion_matrix(y_test, y_pred)<br><br>print(&quot;Accuracy:&quot;, accuracy)<br>print(&quot;Confusion Matrix:&quot;)<br>print(conf_matrix)</pre><p>Evaluation:</p><p>After fitting our logistic regression model, we evaluate its performance using accuracy and a confusion matrix. The accuracy score measures the proportion of correctly classified instances, while the confusion matrix provides insights into the model’s performance across different classes.</p><p>Conclusion:</p><p>Binary logistic regression is a versatile and widely used technique in machine learning for binary classification tasks. In this blog post, we explored its concepts, applications, and implementation using Python’s scikit-learn library. By mastering binary logistic regression, data scientists can make informed decisions and derive valuable insights from their data in various domains.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6365731a7ecf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Regression Analysis: Predicting Wine Quality with Machine Learning]]></title>
            <link>https://medium.com/@bsalisu2017/exploring-regression-analysis-predicting-wine-quality-with-machine-learning-a342d02e5ba9?source=rss-d63a62a4bdd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a342d02e5ba9</guid>
            <dc:creator><![CDATA[Bashir Salisu]]></dc:creator>
            <pubDate>Tue, 16 Apr 2024 13:14:37 GMT</pubDate>
            <atom:updated>2024-04-16T13:14:37.963Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction:</h4><p>In the world of data science, regression analysis is a powerful tool for understanding the relationship between variables and making predictions. In this blog post, we’ll dive into the fascinating realm of regression by using the popular Python libraries scikit-learn and pandas to predict wine quality based on various factors.</p><p>Dataset:</p><p>We’ll be working with the “winequality” dataset, which contains information about the different qualities of wine. This dataset is readily available and provides an excellent opportunity to explore regression techniques.</p><p>Understanding Regression:</p><p>Regression analysis involves predicting a continuous outcome based on one or more input features. In our case, we’ll use features such as acidity, pH levels, and alcohol content to predict the quality of wine, which is a continuous variable ranging from 1 to 10.</p><p>Code Implementation:</p><p>Let’s start by loading the dataset and preparing our data for regression analysis.</p><pre>import pandas as pd<br>from sklearn.model_selection import train_test_split<br>from sklearn.linear_model import LinearRegression<br>from sklearn.metrics import mean_squared_error, r2_score<br><br># Load the dataset<br>wine_data = pd.read_csv(&#39;winequality.csv&#39;)<br><br># Split the data into features and target variable<br>X = wine_data.drop(&#39;quality&#39;, axis=1)<br>y = wine_data[&#39;quality&#39;]<br><br># Split the data into training and testing sets<br>X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)<br><br># Initialize and fit the regression model<br>regression_model = LinearRegression()<br>regression_model.fit(X_train, y_train)<br><br># Predict on the testing set<br>y_pred = regression_model.predict(X_test)<br><br># Calculate accuracy metrics<br>mse = mean_squared_error(y_test, y_pred)<br>r2 = r2_score(y_test, y_pred)<br><br>print(&quot;Mean Squared Error:&quot;, mse)<br>print(&quot;R-squared:&quot;, r2)<br></pre><p>Evaluation:</p><p>After fitting our regression model, we evaluate its performance using two common metrics: mean squared error (MSE) and R-squared. The MSE measures the average squared difference between the actual and predicted values, while R-squared indicates the proportion of variance in the target variable that is explained by the model.</p><p>Confusion Matrix:</p><p>While confusion matrices are typically used for classification tasks, we can still gain insights by visualizing the distribution of predicted versus actual values in our regression analysis.</p><p>Conclusion:</p><p>In this blog post, we explored regression analysis using the scikit-learn library in Python. By leveraging the winequality dataset, we demonstrated how to predict wine quality based on various input features. Regression analysis opens the door to a wide range of predictive modeling applications, and mastering this technique is essential for any aspiring data scientist.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a342d02e5ba9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with NumPy: A Beginner’s Guide to Numerical Computing in Python]]></title>
            <link>https://medium.com/@bsalisu2017/getting-started-with-numpy-a-beginners-guide-to-numerical-computing-in-python-545a95b495f7?source=rss-d63a62a4bdd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/545a95b495f7</guid>
            <dc:creator><![CDATA[Bashir Salisu]]></dc:creator>
            <pubDate>Mon, 26 Feb 2024 11:48:49 GMT</pubDate>
            <atom:updated>2024-02-26T11:48:49.070Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>NumPy, short for Numerical Python, is a fundamental library for scientific computing in Python. It provides powerful tools for working with arrays and matrices, making it an essential tool for data manipulation, mathematical operations, and much more. In this beginner’s guide, we’ll explore the basics of NumPy and how you can start using it in your Python projects.</p><p><strong>What is NumPy?</strong></p><p>NumPy is an open-source library in Python that provides support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays efficiently. It is the foundation on which many other Python scientific computing libraries are built, such as SciPy, pandas, and scikit-learn.</p><p><strong>Getting Started with NumPy:</strong></p><p>To get started with NumPy, you first need to install it. You can install NumPy using pip, the Python package manager, with the following command:</p><pre>pip install numpy<br></pre><p>Once installed, you can import NumPy into your Python script or interactive session using the following import statement:</p><pre>import numpy as np</pre><p>Now, let’s explore some basic concepts and functionalities of NumPy:</p><ol><li><strong>Creating NumPy Arrays:</strong></li></ol><p>You can create NumPy arrays using various methods, such as from Python lists or using built-in functions like numpy.array(), numpy.zeros(), numpy.ones(), etc. For example:</p><pre># Create a 1D array from a Python list<br>arr1d = np.array([1, 2, 3, 4, 5])<br><br># Create a 2D array filled with zeros<br>arr2d = np.zeros((3, 3))<br><br># Create a 3D array filled with ones<br>arr3d = np.ones((2, 2, 2))<br></pre><p><strong>2. Array Operations:</strong></p><p>NumPy allows you to perform various mathematical operations on arrays, such as addition, subtraction, multiplication, division, exponentiation, etc. These operations can be performed element-wise or using broadcasting. For example:</p><pre># Element-wise addition<br>result = arr1d + 10<br><br># Element-wise multiplication<br>result = arr1d * 2<br><br># Broadcasting<br>result = arr2d + np.array([1, 2, 3])</pre><p><strong>3. Array Indexing and Slicing:</strong></p><p>You can access individual elements or slices of NumPy arrays using indexing and slicing. Indexing in NumPy arrays is zero-based, and slicing follows the same syntax as Python lists. For example:</p><pre># Accessing individual elements<br>print(arr1d[0])  # Prints the first element of arr1d<br><br># Slicing<br>print(arr1d[1:4])  # Prints elements from index 1 to 3 of arr1d</pre><p><strong>Conclusion:</strong></p><p>NumPy is a powerful library for numerical computing in Python, offering efficient array operations, mathematical functions, and tools for data manipulation. In this beginner’s guide, we’ve covered the basics of NumPy, including array creation, operations, indexing, and slicing. By mastering these fundamentals, you’ll be well-equipped to dive deeper into the world of scientific computing with Python.</p><p><strong>References:</strong></p><ul><li>NumPy Documentation: <a href="https://numpy.org/doc/">https://numpy.org/doc/</a></li><li>“Python Data Science Handbook” by Jake VanderPlas: <a href="https://jakevdp.github.io/PythonDataScienceHandbook/">https://jakevdp.github.io/PythonDataScienceHandbook/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=545a95b495f7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Guide to Data Preprocessing with Pandas: Handling Missing Values and More]]></title>
            <link>https://medium.com/@bsalisu2017/a-guide-to-data-preprocessing-with-pandas-handling-missing-values-and-more-6d6a84c8933e?source=rss-d63a62a4bdd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d6a84c8933e</guid>
            <dc:creator><![CDATA[Bashir Salisu]]></dc:creator>
            <pubDate>Sun, 25 Feb 2024 13:36:56 GMT</pubDate>
            <atom:updated>2024-02-25T13:36:56.521Z</atom:updated>
            <content:encoded><![CDATA[<p>Data preprocessing is a crucial step in the data analysis pipeline, ensuring that your data is clean, consistent, and ready for analysis. In this guide, we’ll explore how to leverage the power of the Pandas library to preprocess your data effectively, covering techniques for handling missing values, dealing with “not a number” (NaN) values, and other essential data processing tasks.</p><p><strong>Introduction: The Importance of Data Preprocessing</strong></p><p>Before diving into complex analyses or building machine learning models, it’s essential to preprocess your data. Raw datasets often contain inconsistencies, missing values, and outliers that can adversely affect the accuracy and reliability of your results. Data preprocessing aims to address these issues, making your data suitable for analysis and modeling.</p><p><strong>Getting Started with Pandas</strong></p><p>Pandas is a powerful Python library for data manipulation and analysis. It provides flexible data structures, such as DataFrames and Series, along with a wide range of functions for cleaning, transforming, and analyzing data. Let’s start by importing Pandas and loading our dataset:</p><pre>import pandas as pd<br><br># Load dataset<br>data = pd.read_csv(&#39;birds.csv&#39;) # you need to change the name of the dataset to suit your need<br></pre><p><strong>Handling Missing Values</strong></p><p>Missing values are a common occurrence in real-world datasets and can arise due to various reasons, such as data entry errors or sensor failures. Pandas provides several methods for handling missing values:</p><ol><li><strong>Identifying Missing Values:</strong> Use the isna() method to identify missing values in your dataset.</li></ol><pre>missing_values = data.isna().sum()<br>print(missing_values)</pre><p><strong>2. Removing Missing Values:</strong> Use the dropna() method to remove rows or columns containing missing values.</p><pre>clean_data = data.dropna()</pre><p><strong>3. Imputing Missing Values:</strong> Replace missing values with a specific value or a calculated statistic, such as the mean or median.</p><pre>mean_value = data[&#39;column_name&#39;].mean()<br>data[&#39;column_name&#39;].fillna(mean_value, inplace=True)</pre><p>4. <strong>Removing Duplicates: </strong>Use the drop_duplicates() method to remove duplicate rows from your dataset.</p><pre>unique_data = data.drop_duplicates()</pre><p>5. <strong>Scaling and Normalizing Data:</strong> Scale numerical features to a similar range using techniques like Min-Max scaling or standardization.</p><pre>from sklearn.preprocessing import MinMaxScaler<br><br>scaler = MinMaxScaler()<br>scaled_data = scaler.fit_transform(data)</pre><p><strong>6. Encoding Categorical Variables:</strong> Convert categorical variables into numerical representations using techniques like one-hot encoding.</p><pre>encoded_data = pd.get_dummies(data, columns=[&#39;categorical_column&#39;])</pre><p><strong>Conclusion</strong></p><p>Data preprocessing is a critical step in the data analysis process, ensuring that your data is clean, consistent, and suitable for analysis or modeling. By leveraging the capabilities of the Pandas library, you can efficiently handle missing values, NaN values, and other data processing tasks, setting the stage for more accurate and reliable insights from your data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d6a84c8933e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Seeing is Believing: How Data Visualization Unlocks Hidden Insights]]></title>
            <link>https://medium.com/@bsalisu2017/seeing-is-believing-how-data-visualization-unlocks-hidden-insights-a1d13edffb6b?source=rss-d63a62a4bdd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1d13edffb6b</guid>
            <dc:creator><![CDATA[Bashir Salisu]]></dc:creator>
            <pubDate>Sun, 18 Feb 2024 07:48:06 GMT</pubDate>
            <atom:updated>2024-02-18T07:49:32.737Z</atom:updated>
            <content:encoded><![CDATA[<p>Ever feel overwhelmed by mountains of data? You’re not alone! But fear not, because data visualization is here to save the day.</p><p>Imagine this: Instead of staring blankly at rows and columns of numbers, you’re greeted with vibrant charts, interactive graphs, and colourful maps. Suddenly, those daunting datasets make sense, revealing trends, patterns, and connections you never knew existed.</p><p>That’s the magic of data visualization — turning complex information into visual stories that everyone can understand. It’s like a superpower that empowers us to explore, analyze, and communicate data in once unimaginable ways.</p><p>But it’s not just about making pretty pictures. Data visualization is about clarity, insight, and action. It helps us make better decisions, spot opportunities, and solve problems faster.</p><p>Think about it: Whether you’re tracking sales performance, monitoring social media trends, or studying climate patterns, data visualization brings your data to life, making it easier to spot trends, outliers, and anomalies at a glance.</p><p>And it’s not just for experts! With user-friendly tools and intuitive interfaces, anyone can create compelling visualizations — no coding required! So whether you’re a marketer, a scientist, or a small business owner, data visualization puts the power of data analysis at your fingertips.</p><p>But here’s the best part: Data visualization isn’t just about numbers and charts — it’s about telling stories. Whether you’re presenting to clients, pitching investors, or sharing insights with your team, visualizations help you captivate your audience and drive your message home.</p><p>So why wait? Dive into the world of data visualization today and unlock a new way of seeing and understanding the world around you. Trust me, once you start visualizing your data, you’ll wonder how you ever lived without it!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1d13edffb6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A short Introduction to Panda Library]]></title>
            <link>https://medium.com/@bsalisu2017/a-short-introduction-to-panda-library-084921a3f2ae?source=rss-d63a62a4bdd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/084921a3f2ae</guid>
            <dc:creator><![CDATA[Bashir Salisu]]></dc:creator>
            <pubDate>Sat, 10 Feb 2024 06:46:31 GMT</pubDate>
            <atom:updated>2024-02-10T07:06:52.688Z</atom:updated>
            <content:encoded><![CDATA[<p>The Pandas library is a Python programming language library designed for data manipulation. With the Pandas library, you can perform various data manipulation tasks. In this introduction, I will guide you through the basics of pandas, making it accessible for beginners.</p><pre># check the Python Version<br>python --version<br><br># check if Pandas is install<br>pip show pandas</pre><p>If the Pandas is installed great, you are good to go, else use the command below to install Pandas in your system. Make sure pip is installed in your system. <a href="https://pip.pypa.io/en/stable/installation/">check this for more information on pip</a></p><pre>pip install pandas</pre><p>After installation, use the pip show pandas command to verify. To use the Panda, you will need to import it.</p><pre>import pandas as pd</pre><p><strong>Data source: </strong>for this tutorial, we are going to use a Python dictionary to create the dataset. However, datasets can come in any different form: CSV, text file and many more.</p><pre># CREATING DATAFRAME<br>student_cgpa = {&#39;student_name&#39;:[&#39;Bello&#39;, &#39;Tanimu&#39;, &#39;Jibril&#39;, &#39;Yahaya&#39;, &#39;Fatima&#39;],<br>                &#39;CGPA&#39;:[3.7, 4.3, 3.2, 4.8, 2.4]}<br><br>data = pd.DataFrame(student_cgpa)</pre><p>Some of the basic panda methods are head, tail, describe, info, and many more.</p><pre># check the first five elements in the dataset<br>data.head()<br><br># check the last five elements in the datasets<br>data.tail()<br><br># statistical summary of the dataset<br>data.describe()<br><br># get dataset info<br>data.info()</pre><p><strong>To be Continue</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=084921a3f2ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is Artificial Intelligence a Blessing to Humanity?]]></title>
            <link>https://medium.com/@bsalisu2017/is-artificial-intelligence-a-blessing-to-humanity-e69bcd9ffde0?source=rss-d63a62a4bdd3------2</link>
            <guid isPermaLink="false">https://medium.com/p/e69bcd9ffde0</guid>
            <dc:creator><![CDATA[Bashir Salisu]]></dc:creator>
            <pubDate>Wed, 24 Jan 2024 07:10:28 GMT</pubDate>
            <atom:updated>2024-01-24T07:10:28.270Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Is Artificial Intelligence a Blessing to Humanity?</strong></p><p>Advances in technology and the availability of structured or unstructured data have revolutionized our daily lives. This transformation, propelled by deep learning techniques — a subset of machine learning, and machine learning itself — a subset of artificial intelligence, has impacted fields such as computer vision, natural language processing, autonomous cars, and healthcare. However, this progress has sparked debates among researchers and professionals due to its negative impact on humanity. Issues like fairness, bias, privacy, security, ethics, and job displacement are raised.</p><p>Artificial intelligence aims to replicate human cognitive functions like learning, speaking, and seeing. Examples like Siri and ChatGPT showcase significant achievements. Machine learning, a subset of AI, identifies patterns in data, while deep learning mimics the human brain’s neuron structure.</p><p>An example of bias in AI is Amazon’s employment software, which favoured men, leading to a gender imbalance. This highlights concerns about fairness and bias in AI models.</p><p>In conclusion, while AI has brought transformative changes and simplified tasks, concerns persist. People fear its capabilities, considering issues like bias and job displacement. Whether artificial intelligence is a blessing or curse for mankind, only time will reveal.</p><p>Reference:</p><p>1. <a href="https://www.reuters.com/article/idUSKCN1MK0AG/">https://www.reuters.com/article/idUSKCN1MK0AG/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e69bcd9ffde0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>