# How to make your first Machine Learning project (as an absolute beginner)

> Source: <https://dev.to/shriya_upadhyay_1304/how-to-make-your-first-machine-learning-project-as-an-absolute-beginner-3ie5>
> Published: 2026-06-03 14:33:48+00:00

Making your first Machine Learning project as beginner can be daunting. To be honest, I was daunted. There are a *ton* of resources online with different approaches on how to make your first project. But youtube tutorial hell is a real thing. I kept watching tutorials after tutorials, never really finishing any video properly and getting burned out. I never really got close to making my first project or understanding why use decision trees instead of logistic regression.

In this write up I am going to dismistify machine learning for you, make the process a little easier.

If you don't agree with my approach that is totally fine. I think there are a lot of ways to do the same things. People learn, absorb and understand information using different methods and approaches. Some learn better from youtube tutorials, other from bootcamps, documentation or if you are anything like me, you learn by doing.

If you chose to go by this method, you will

build an aptitudefor machine learning by doing everything on your own.Note - This write up will help beginners to make their first machine learning project. The only prerequisite that I ask of you is a basic knowledge of coding and python.

I used ChatGPT to make my first machine learning project. A very humble "Salary Prediction Project" using Linear Regression.

This project is very simple to begin with. It will help us to atleast dip our toes in the water. We can't really begin making advanced machine learning projects right away. We need to make sure and understand how basic projects are made to move on to the bigger projects.

For the sake of learning use an online tool such as **Google Colab**. By using this you don't to download any dependencies.

Generate the full code using ChatGPT - This step might sound a little weird but hear me out. We are **NOT** going to blindly paste this generated code in Google Colab and call it a day.

``` python
# Import libraries
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_absolute_error, r2_score
import matplotlib.pyplot as plt

# Create a simple dataset
data = {
    'YearsExperience': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    'Salary': [30000, 35000, 45000, 50000, 60000,
               65000, 75000, 80000, 90000, 100000]
}

df = pd.DataFrame(data)

# Features (X) and Target (y)
X = df[['YearsExperience']]
y = df['Salary']

# Split dataset into training and testing data
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42
)

# Create the model
model = LinearRegression()

# Train the model
model.fit(X_train, y_train)

# Make predictions
predictions = model.predict(X_test)

# Compare actual vs predicted values
results = pd.DataFrame({
    'Actual Salary': y_test,
    'Predicted Salary': predictions
})

print("Predictions:")
print(results)

# Evaluate the model
mae = mean_absolute_error(y_test, predictions)
r2 = r2_score(y_test, predictions)

print("\nMean Absolute Error:", mae)
print("R² Score:", r2)

# Predict salary for a new employee
years = np.array([[5.5]])
predicted_salary = model.predict(years)

print(f"\nPredicted Salary for 5.5 years of experience: ₹{predicted_salary[0]:.2f}")

# Visualize the regression line
plt.scatter(X, y)
plt.plot(X, model.predict(X), linewidth=2)
plt.xlabel("Years of Experience")
plt.ylabel("Salary")
plt.title("Salary Prediction using Linear Regression")
plt.show()
```

We are going to read the entire code first, slowly from top to bottom. If you are a complete beginner you might just want to give up here. Because nothing will make sense. I didn't make sense to me either.

I didn't know what pandas was. I didn't know about Scikit learn. I didn't know anything apart from basic python. And as a beginner that's natural. You will be overwhelmed with a lot of information at once. But we are going to break each and every part of the code down and understand the meaning behind it.

You are going to give ChatGPT a prompt - "Explain this code to me line by line in detail explaining what every line of code does, the functions that are used and why it will help us". By doing this we will dimistify each and every line of code.

Start from the top.

Breakdown the entire code into sections and don't move on before understanding each section.

For example if we look at the first section where we are importing all the libraries, we begin by understanding the role of each and every library. Why is it being used? How do these libraries connect with one another like the pieces of a puzzle.

Again you might not understand everything or become an expert but you will have a basic understanding and moving forward you won't be surprised when the terms show up.

Pandas is very commonly used when dealing with data. Ask ChatGPT to "Explain how pandas is used in machine learning and the basic and most frequently used functions relevant to this and other beginner projects."

Do the same with Numpy, Scikit learn, Matplotlib

Just the basics and how they are used in this project. You don't have to watch a 1 hour pandas tutorial to understand it. After 45 minutes you will forget what you learned in the first 10 minutes of the video - like that actually happens with me. And sitting through a 1 hour pandas tutorial to make a salary prediction project that uses atmost 5 functions which you can read through in ChatGPT is a massive waste of time (for me atleast)

In this step we are going to understand why "Linear Regression" is used for this particular project. Ask ChatGPT "What is Linear Regression and why it is used for this project."

This part is really important because machine learning boils down to using the right kind of model to train your data on. Depending on the dataset you are using and your requirements and the result that you want different machine learning models are used.

While you are at it, ask ChatGPT "Tell me about the most basic and frequently used machine learning models. Tell me what kind of result do they produce and when to use them"

Also, if you ever think ChatGPT is being a little technical and you need to understand things in a more basic manner tell it to explain it to you like an absolute beginner using examples.

This is very important to understand. Evaluation tells you how your model is doing. Ask ChatGPT to "Explain how a model is evaulated. What are the different way to evaluate the model. How to know how well a model is working."

A very amazing resource that I would suggest for beginners or even with people with some machine learning understanding to use is a crash course by Google on machine learning.

[Google Machine Learning Crash Course]

By doing this I firmly believe that you would atleast have some understand of machine learning. Machine learning is all about data, using the right models, tweaking the code and the data to make the model better. When you move on to more complex projects the kind of data that you work with and the model that you use become very important. Use ChatGPT and make more simple and beginner friendly machine learning projects. By doing this you will build an aptitude for machine learning which is a very important thing to have.
