Logistic Regression Algorithm 

Logistic regression is a machine learning algorithm used to solve classification problems. It’s particularly well-suited for binary classification (problems where the outcome is either 0 or 1). For example, it’s appropriate for predicting whether an email is spam or not, or if a customer will purchase a product. 1. Basic Idea of Logistic Regression Logistic regression uses a… Read More »

Basic usage of NumPy

1. Importing NumPy To use NumPy, write import numpy as np at the beginning of your program. np is a conventionally used alias. 2. Creating NumPy Arrays The core of NumPy is the ndarray (n-dimensional array). You can create arrays in various ways. From Lists: zeros, ones, empty: arange, linspace random 3. NumPy Array Attributes NumPy arrays have… Read More »

 SymPy basic usage

1. Defining Symbols To work with expressions in SymPy, you need to define variables (symbols). Use the symbols() function. 2. Creating and Displaying Expressions Create expressions using the defined symbols. 3. Evaluating Expressions (Substitution) Use the subs() method to substitute values for symbols and evaluate the expression. 4. Expanding and Factoring Expressions Expanding: Use the expand() function. Factoring:… Read More »

Basic usage of Matplotlib

1. Basic Components The following are commonly used components when creating graphs with matplotlib: 2. Creating a Simple Line Graph Let’s create a simple line graph as the most basic example: 3. Creating Various Types of Graphs Matplotlib can create various types of graphs. Here are some examples: 4. Customizing Graphs Matplotlib allows you to customize various elements… Read More »

Merge Sort (basic algorithm)

Merge sort is an efficient sorting algorithm based on the divide-and-conquer paradigm. It recursively divides a large array into smaller sub-arrays, sorts those sub-arrays, and then merges them back together to create the final sorted array. Features: Algorithm Steps Example Let’s look at the process of sorting the array [8, 3, 1, 7, 0, 10, 2] using merge… Read More »