YiSu Grain
Author

YiSu Grain

A fleeting mayfly in the world, a single grain in the boundless sea.

68
Articles
0
Likes
32
Views
0
Comments
Recent Articles

Latest from YiSu Grain

68 recent articles
YiSu Grain
YiSu Grain
Oct 17, 2024 · Fundamentals

Exploring Shortest Path: A Dijkstra Adventure

This article walks through the problem of finding the shortest route in a smart‑traffic graph, explains Dijkstra's greedy algorithm step by step, illustrates the process with a narrative example, and provides complete Python code using heapq for priority‑queue management.

DijkstraGraph AlgorithmsHeapq
0 likes · 30 min read
Exploring Shortest Path: A Dijkstra Adventure
YiSu Grain
YiSu Grain
Oct 16, 2024 · Fundamentals

How to Build a Greenhouse Auto‑Control System in Python

This article walks through implementing a greenhouse automatic control system in Python, using a deque to store temperature‑humidity readings, defining a GreenhouseControlSystem class with methods for adding data, checking thresholds, and simulating the process, and explains the design choices.

OOPPythondeque
0 likes · 5 min read
How to Build a Greenhouse Auto‑Control System in Python
YiSu Grain
YiSu Grain
Oct 16, 2024 · Fundamentals

Understanding BFS Without Any Coding Experience

This article explains the breadth‑first search algorithm step by step, modeling a 0/1 grid as a graph, showing how a queue and a visited set work, and providing a complete Python implementation that finds the shortest path in a maze.

BFSBreadth-First SearchPathfinding
0 likes · 12 min read
Understanding BFS Without Any Coding Experience
YiSu Grain
YiSu Grain
Oct 15, 2024 · Fundamentals

Master Python Data Structures One by One: Lists, Stacks, Queues, Linked Lists, Trees, Heaps, and Graphs

This comprehensive guide walks you through Python's core data structures—including lists, stacks, queues, linked lists, trees, heaps, and graphs—explaining their characteristics, common operations, and step‑by‑step code examples, while also covering related algorithms such as recursion, depth‑first and breadth‑first search, cycle detection, and Dijkstra's shortest‑path algorithm.

AlgorithmsData StructuresGraph
0 likes · 77 min read
Master Python Data Structures One by One: Lists, Stacks, Queues, Linked Lists, Trees, Heaps, and Graphs
YiSu Grain
YiSu Grain
Oct 11, 2024 · Artificial Intelligence

How to Build and Visualize Polynomial Regression in Python

This article walks through loading CSV data, fitting both linear and degree‑6 polynomial regression models with scikit‑learn, and visualizing the original points, fitted lines, and predictions on test data using matplotlib.

Data VisualizationLinear RegressionPolynomial Regression
0 likes · 5 min read
How to Build and Visualize Polynomial Regression in Python
YiSu Grain
YiSu Grain
Oct 9, 2024 · Artificial Intelligence

Implementing Linear Regression with scikit-learn and Comparing to Gradient Descent

This article demonstrates how to build a multivariate linear regression model using scikit-learn's LinearRegression class, visualizes the results, and then compares the implementation, parameter optimization, prediction accuracy, and visualization with a manually coded gradient descent approach.

LinearRegressionPythongradient descent
0 likes · 7 min read
Implementing Linear Regression with scikit-learn and Comparing to Gradient Descent
YiSu Grain
YiSu Grain
Sep 29, 2024 · Artificial Intelligence

Finding the ‘Heavenly Path’ of Data Points: A Linear Regression Walkthrough

This article walks through linear regression by visualizing scattered data points, defining the line y = ax + b, deriving the mean‑squared‑error cost function, computing its gradients with the chain rule, and implementing gradient descent in Python to find the optimal parameters.

Linear RegressionPythoncost function
0 likes · 11 min read
Finding the ‘Heavenly Path’ of Data Points: A Linear Regression Walkthrough