Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

hayerhans
hayerhans

Posted on

     

Machine Learning for Web devs

When I started my career as a Software Engineer, I felt comfortable in the realm of web development. Whenever I heard about someone working in AI or ML, I couldn't help but admire them. I assumed these people possessed a deep understanding of mathematics and statistics that enabled them to do such impressive work. However, with the rise of ChatGPT and its incredible capabilities, I decided to dig deeper into the topic. What I discovered was eye-opening: you don't need to be a genius to work with ML or AI!

Like any discipline, there are multiple sub-domains within ML and AI that require different skill sets. As an engineer and developer, I approach this field from the perspective of how to integrate it into modern web applications. I recently passed the Azure AI-900 certification, and I realized that my fellow developers could benefit from this knowledge too. So, let's explore what ML is all about!

What is Machine Learning?

At its core, Machine Learning (ML) is a subset of artificial intelligence that focuses on creating algorithms and models that can learn from data. Unlike traditional programming where we explicitly define rules, ML algorithms learn patterns and relationships from data to make predictions or decisions.

To put it in mathematical terms, ML is about learning a function f(x) = y, where:

  • x represents the input data (features)
  • y represents the output (predictions or labels)
  • f is the learned function or model

The key difference from traditional programming is that the function f is not explicitly coded but learned from data during a process called training.

Key Terminology

Before we dive deeper, let's familiarize ourselves with some essential terms:

  1. Features: These are the observed attributes or input data. For example, if we're predicting house prices, features might include the size of the house, its location, and the number of bedrooms.

  2. Labels: These are the outcomes that the model tries to predict. In our house price example, the label would be the actual price of the house.

Image description

Types of Machine Learning

Image description

There are several types of machine learning, but we'll focus on the two main categories:

  1. Supervised Learning

    • Uses training data that includes both feature values and known label values
    • Format: [X1, X2, X3], Y
    • Used when you have historical data with known outcomes
    • Example: Predicting house prices based on features like location, size, etc.
  2. Unsupervised Learning

    • Uses training data that includes only feature values, without labels
    • Format: [X1, X2, X3]
    • Used to find patterns or relationships in data without predefined outcomes
    • Example: Grouping similar customers based on demographics and behavior

Supervised vs Unsupervised Learning

The Training Process

Now that we understand the basics, let's look at how ML models are actually trained

Image description

  1. Data Collection: Gather a large dataset relevant to your problem.

  2. Data Preprocessing: Clean and prepare your data, handling missing values and outliers.

  3. Split the Data: Divide your dataset into:

    • Training set: Used to teach the model (typically 70-80% of the data)
    • Validation set: Used to tune the model and prevent overfitting (typically 10-15%)
    • Test set: Used to evaluate the final model performance (typically 10-15%)
  4. Choose an Algorithm: Select an ML algorithm appropriate for your problem. The beauty is that these algorithms are often interchangeable, allowing you to experiment with different approaches.

  5. Train the Model: Feed the training data into your chosen algorithm, allowing it to learn the patterns in the data.

  6. Validate and Tune: Use the validation set to fine-tune your model's parameters and prevent overfitting.

  7. Test and Evaluate: Finally, use the test set to assess how well your model generalizes to new, unseen data.

Want to Learn More?

I'm excited to announce that I'm creating afree course on Azure AI-900! If you're interested in diving deeper into AI and ML, particularly within the Azure ecosystem, this course is perfect for you.

Sign up here to get notified when the course launches!

Thanks for reading, and stay tuned for the next post where we'll dive into computer vision capabilities. The world of AI and ML is vast and exciting, and I can't wait to explore it further with you!

Top comments(4)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
migduroli profile image
migduroli
  • Joined

I recommend to have a look atflama, an open-source project which is specifically thought for the productionalisation of ML models via ML APIs. To have a look at an actual example of an entire ML pipeline run with flama, you can checkthis post, which I think contains all the relevant information.

CollapseExpand
 
vortico profile image
Vortico
We are AI and technology specialists who are passionate in software development, with focus on helping businesses enhance and expand their AI and technology capabilities.
  • Location
    Malaga, Spain
  • Work
    Gift us a ⭐ @ https://github.com/vortico/flama
  • Joined
• Edited on• Edited

Hey, great post! We really enjoyed it. You might be interested in knowing how to productionalise ML models in ridiculously easy way. If so, please have a look atflama for Python. We introduced some time ago an introductory post hereIntroducing Flama for Robust ML APIs. As you'll see, all the steps you describe in this post can be found in our post, and eventually end up with a model running locally and ready to receive requests to make predictions. If you have any doubts, or you'd like to learn more about it and how it works in more detail, don't hesitate to give us a shout. And if you like it, please gift us a star ⭐here.

CollapseExpand
 
vikasnautiyal profile image
vikas nautiyal
  • Joined
• Edited on• Edited

Clean & descriptive for beginners to get an overview. Hope to see a more such articles.

CollapseExpand
 
capgo profile image
Capgo
Capgo enables real-time updates for Capacitor apps, instantly deploying features and fixes without app store delays.
  • Location
    Tallinn, Estonia
  • Joined

Cool, thanks!

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Certified AWS ☁️ Solution Architect I like to building things and share this experience
  • Location
    Munich 🥨
  • Joined

More fromhayerhans

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp