Learning AI as a Programmer - Week 1

Learning AI as a Programmer - Week 1

So as most people know at this point, AI is becoming more and more important in today's world, especially for us developers. As your everyday engineer, I love to learn and start projects that I never finish. So, I have decided to embark on a small quest to learn about the field of AI and machine learning over the next couple of months. Besides just learning about new and exciting technology, there are numerous other benefits to learning AI. But why would I write those out myself when I could get Chat GPT3 to do it for me?

The following paragraph has been created by Chat GPT3 using this prompt: "Please write a paragraph about the advantages of learning how to create AI models using machine learning for a programmer, as bullet points"

  • Machine learning algorithms enable AI systems to learn from data and improve their performance over time, making them powerful tools for solving complex problems.

  • By mastering machine learning techniques, programmers can create intelligent systems that automate tasks, optimize processes, and make predictions or recommendations based on data.

  • This can lead to increased efficiency and productivity in a wide range of industries.

  • Machine learning skills can be highly sought after by employers, as the demand for AI technologies continues to grow.

  • With the ability to create AI models using machine learning, programmers can develop innovative solutions to a variety of challenges, from predicting consumer behavior to detecting fraud in financial transactions.

  • Overall, the advantages of learning how to create AI models using machine learning are numerous, making it a valuable and rewarding skill for programmers to acquire.

Honestly, every one of those reasons is a banger. I do not think I need any more reasons to start learning Machine Learning. Which I did, about a week ago. So here is what I have learned so far.

The first thing I got familiar with is some vocabulary, because saying that I am going to learn AI is akin to saying "I searched it on the Google". While not technically incorrect, it shows a lack of knowledge of the area. So here is some vocabulary to get started.

  • AI - Artificial Intelligence, which is the overall field of creating software that can learn information without being explicitly told by a human.

  • Machine Learning (ML) - A sub-field of AI that focuses on methods to create software with the capability to "Learn".

  • Neural Network (NN) - A computing system that can train a model using different techniques which results in a trained model; based on neurons in a brain. Neural networks have an input layer that takes in data, one or more hidden layers which manipulate the input data, and an output layer that provides the results.

  • Deep Learning (DL) - A sub-field of Machine Learning where neural networks that have multiple hidden layers are used.

  • Model - A function that has been trained to recognize certain patterns in data and manipulate it in some way to produce a desired output.

    That is just some of the vocabulary, to get started, there will be more later in this article.

Now that the basics are out of the way I can tell you what else I learned. I started by trying to find good resources for learning Machine Learning. I found a GitHub repo that has a roadmap laid out for people starting to learn. Here is a link to that:

Machine Learning Roadmap

Here it suggests starting out by learning foundational math and Python. Luckily for me, I am already an engineer and am confident in skipping these steps, so I moved right to the Coursera specialization. People give Coursera and Udemy a bad wrap in my opinion, they are really good places to get started learning new tech. For instance, the Coursera specialization I started is taught by a Professor from Stanford, who worked at Google's HiveMind.

The course is not the only resource I am using right now, I am also following a 25-hour video produced by Free Code Camp on YouTube about using PyTorch, which is the most used library for writing Machine Learning models. Here is a link to that if you are interested:

Long PyTorch Video

For now, those are my main two resources, but I do have a few others as prospects.

So far in the Coursera specialization, I have learned a ton about how linear regression works; which is the simplest model to work with. I can see why the GitHub repo recommends re-learning some math before doing the course. The course does not shy away from math but is not focused on it, which is nice. The concepts are what is important to learn. Here are the topics I learned from the course so far:

  • Supervised machine learning is where you provide data with answers to a model to train it to eventually take in data without answers provided and output the answer. A good example would be a model that classifies if a picture is that of a dog or a cat.

  • Unsupervised machine learning is when you provide a dataset to the model and it finds patterns in the data by itself. A good example would be giving a model a lot of articles and the models groups them based on a similar topic.

  • Regression problems are problems that take in numbers as input and output numbers, the most simple being a linear regression.

  • A linear regression works by finding the best-fit line to a set of data. This is done by creating a function that takes in the inputs of data and multiplies this by a parameter. As the model is trained the parameters are tuned till they produce the correct results.

  • Parameters are tuned by starting with random numbers as parameters and then calculating how wrong they are against the known data, this is called the cost.

  • During the training phase, an algorithm called gradient descent is used to slowly change the parameters so that they produce a lower and lower cost, which means they get closer and closer to the correct answer.

  • After that, I learned how to do the same process using multiple inputs instead of just one, and how to pick good parameters, as well as scaling inputs so that gradient descent runs faster.

That sums up the majority of what I learned in week one of the course, be happy, I spared you all the math! So far, I feel like I am learning a lot from the course, which makes me excited for the rest of it. From the long video, I have only learned the most basic commands in PyTorch. I have been more focused on the course as I see it as building strong foundations

Hopefully, I will write one of these blogs every week, however, my last blog project ended abruptly, so this one might as well. Are you an engineer if you do not have a laundry list of half way finished projects?