{"slug": "how-to-make-your-first-machine-learning-project-as-an-absolute-beginner", "title": "How to make your first Machine Learning project (as an absolute beginner)", "summary": "A developer created a beginner-friendly machine learning project using ChatGPT to generate a salary prediction model with linear regression. The project, built on Google Colab, uses a simple dataset mapping years of experience to salary and walks through the entire code line by line to help absolute beginners understand the fundamentals. The developer emphasizes learning by doing rather than passively watching tutorials, breaking down each component from importing libraries to evaluating model performance.", "body_md": "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.\n\nIn this write up I am going to dismistify machine learning for you, make the process a little easier.\n\nIf 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.\n\nIf you chose to go by this method, you will\n\nbuild 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.\n\nI used ChatGPT to make my first machine learning project. A very humble \"Salary Prediction Project\" using Linear Regression.\n\nThis 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.\n\nFor the sake of learning use an online tool such as **Google Colab**. By using this you don't to download any dependencies.\n\nGenerate 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.\n\n``` python\n# Import libraries\nimport pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LinearRegression\nfrom sklearn.metrics import mean_absolute_error, r2_score\nimport matplotlib.pyplot as plt\n\n# Create a simple dataset\ndata = {\n    'YearsExperience': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],\n    'Salary': [30000, 35000, 45000, 50000, 60000,\n               65000, 75000, 80000, 90000, 100000]\n}\n\ndf = pd.DataFrame(data)\n\n# Features (X) and Target (y)\nX = df[['YearsExperience']]\ny = df['Salary']\n\n# Split dataset into training and testing data\nX_train, X_test, y_train, y_test = train_test_split(\n    X, y, test_size=0.2, random_state=42\n)\n\n# Create the model\nmodel = LinearRegression()\n\n# Train the model\nmodel.fit(X_train, y_train)\n\n# Make predictions\npredictions = model.predict(X_test)\n\n# Compare actual vs predicted values\nresults = pd.DataFrame({\n    'Actual Salary': y_test,\n    'Predicted Salary': predictions\n})\n\nprint(\"Predictions:\")\nprint(results)\n\n# Evaluate the model\nmae = mean_absolute_error(y_test, predictions)\nr2 = r2_score(y_test, predictions)\n\nprint(\"\\nMean Absolute Error:\", mae)\nprint(\"R² Score:\", r2)\n\n# Predict salary for a new employee\nyears = np.array([[5.5]])\npredicted_salary = model.predict(years)\n\nprint(f\"\\nPredicted Salary for 5.5 years of experience: ₹{predicted_salary[0]:.2f}\")\n\n# Visualize the regression line\nplt.scatter(X, y)\nplt.plot(X, model.predict(X), linewidth=2)\nplt.xlabel(\"Years of Experience\")\nplt.ylabel(\"Salary\")\nplt.title(\"Salary Prediction using Linear Regression\")\nplt.show()\n```\n\nWe 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.\n\nI 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.\n\nYou 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.\n\nStart from the top.\n\nBreakdown the entire code into sections and don't move on before understanding each section.\n\nFor 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.\n\nAgain 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.\n\nPandas 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.\"\n\nDo the same with Numpy, Scikit learn, Matplotlib\n\nJust 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)\n\nIn 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.\"\n\nThis 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.\n\nWhile 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\"\n\nAlso, 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.\n\nThis 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.\"\n\nA 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.\n\n[Google Machine Learning Crash Course]\n\nBy 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.", "url": "https://wpnews.pro/news/how-to-make-your-first-machine-learning-project-as-an-absolute-beginner", "canonical_source": "https://dev.to/shriya_upadhyay_1304/how-to-make-your-first-machine-learning-project-as-an-absolute-beginner-3ie5", "published_at": "2026-06-03 14:33:48+00:00", "updated_at": "2026-06-03 14:42:51.428947+00:00", "lang": "en", "topics": ["machine-learning", "artificial-intelligence"], "entities": ["ChatGPT"], "alternates": {"html": "https://wpnews.pro/news/how-to-make-your-first-machine-learning-project-as-an-absolute-beginner", "markdown": "https://wpnews.pro/news/how-to-make-your-first-machine-learning-project-as-an-absolute-beginner.md", "text": "https://wpnews.pro/news/how-to-make-your-first-machine-learning-project-as-an-absolute-beginner.txt", "jsonld": "https://wpnews.pro/news/how-to-make-your-first-machine-learning-project-as-an-absolute-beginner.jsonld"}}