This repository contains Python implementations of fundamental machine learning algorithms: Linear Regression, Logistic Regression, and Binary Classification. These algorithms serve as building blocks for more complex machine learning models and are essential to understand for anyone diving into the field of data science and machine learning.
Python implementation of linear regression using random numbers. The code generates random input data, performs linear regression, and plots the true values along with the predicted values on a linear line.
Python code to demonstrate logistic regression using the famous Iris dataset. Logistic regression is a statistical method for analyzing datasets where the outcome variable is binary, in this case, whether a flower is Iris-Virginica (1) or not (0) based on its petal width. This generates a plot showing the logistic regression model's probabilities for being Iris-Virginica and not being Iris-Virginica based on petal width. Additionally, the script predicts the class labels for specific petal widths.
Python code for binary classification, specifically aimed at detecting breast cancer using logistic regression. The code uses the Breast Cancer dataset from scikit-learn to train a model that classifies tumors as either malignant or benign based on various features.
The Breast Cancer dataset used in this project is sourced from scikit-learn's datasets module. It consists of features such as mean radius, mean texture, and mean smoothness, which are used to predict whether a tumor is malignant (1) or benign (0).
The model's performance is evaluated using a confusion matrix, which provides metrics like True Positive, False Positive, True Negative, False Negative, and Accuracy.
The accuracy of the binary classifier, indicating the model's ability to correctly classify malignant and benign tumors based on the provided features.