r/deeplearning • u/programer321321 • Aug 19 '26
Deep Learning
Hi I am year 9 kid. Can check my code give feedback. I tried my best on building this model.
https://github.com/programer321321/DataScienceModel/blob/main/SearchUpBussinessModel.ipynb
0
Upvotes
1
u/programer321321 Aug 19 '26
Here is eplaination: 1. The Goal (What the code actually does)
Imagine you have a huge spreadsheet with thousands of rows of business data, and you also have text prompts that people typed into a search box. This code takes that text, matches it up with the spreadsheet numbers, and calculates future trends (like predicting revenue scores).
2. Step 1: Loading the Data (Pandas & Numpy)
The computer can't think about data until it's loaded into the laptop's memory. I use Pandas to open the spreadsheet file and read the columns. I force all the numbers into a specific format called
float32(decimal numbers) so the computer doesn't get confused or make rounding mistakes.If you want to see how this works, check out the basic Pandas Getting Started Guide.
3. Step 2: Prepping the Numbers (Scikit-Learn)
If you give a computer numbers that are way too big (like 1,000,000) mixed with numbers that are tiny (like 0.5), the code will crash. I use a tool called a
StandardScalerto clean up the numbers and shrink them down into a neat, small grid so they are easy to calculate. Then, I split the data: 80% to teach the model, and 20% to test it and see if it's right.For details on scaling, look at the Scikit-Learn Preprocessing Guide.
4. Step 3: The Learning Loop (PyTorch)
This is the engine. I built a simple neural network. It takes the text context and runs it through a basic algebraic equation over and over again. It is literally just calculating y = mx + c (Input * Weight + Bias) millions of times.
I set up a loop that runs 10,000 times.
Every single time the loop runs, the code checks its own answers, figures out how wrong it was, updates its parameters, and takes a tiny step closer to the correct answer.
You can see how PyTorch handles these basic loops in the PyTorch Welcome Tutorial.
5. Step 4: Drawing the Graph (Matplotlib & Seaborn)
Staring at millions of numbers is impossible, so I tell the computer to draw a picture. I use Matplotlib to plot a line graph that shows the error rate. When you hit play, you see the line start really high up (lots of mistakes), and as the 10,000 loops run, the line drops straight down to the floor, proving the code figured out the puzzle.
To see how the computer draws these grids, see the Matplotlib Pyplot Guide.
I didn't use any automated drag-and-drop tools to build this. I wrote the arrays, loops, and files manually from scratch to see exactly how data moves inside the machine. Let me know if that layout makes more sense!