Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
160955 stories
·
33 followers

App Store submissions now open for the latest OS releases

1 Share

iOS 27, iPadOS 27, macOS 27, tvOS 27, visionOS 27, and watchOS 27 will soon be available to customers worldwide, which means you can now submit apps and games that take advantage of the latest Apple technologies and innovations like Apple Intelligence, the Foundation Models framework, design updates, new App Store features, and more.

Download the Xcode 27 Release Candidate. Build your apps and games using the latest SDKs, test with TestFlight, and submit for review to the App Store.

Optimize your app for macOS 27. macOS 26 is the final release supporting Intel Mac computers and Rosetta — macOS 27 will be Apple silicon only. To limit your app to Macs with Apple silicon, set your Xcode build architecture to arm64 only, then rebuild and resubmit. Removing support for Intel-based apps lets you further simplify your development and optimize your app for Apple silicon.

Answer age rating questions. New Time Allowances give parents more flexible ways to manage the time their kids spend in apps across categories, including Entertainment, Games, and Social Media. If your app or game includes social media capabilities, you’ll need to indicate them in App Store Connect.

Prepare your App Store assets. Make a strong impression using new product page headers and search result assets on the App Store. Explore design guidance and templates to create captivating product page headers, search results, screenshots, app previews, and In-App Events. Before you publish, use the new product page preview tool in App Store Connect to see exactly how your page will look on the App Store. Coming soon.

Starting April 2027, apps and games uploaded to App Store Connect need to meet the following minimum requirements:

  • iOS and iPadOS apps must be built with the iOS 27 & iPadOS 27 SDK or later
  • tvOS apps must be built with the tvOS 27 SDK or later
  • visionOS apps must be built with the visionOS 27 SDK or later
  • watchOS apps must be built with the watchOS 27 SDK or later

Learn more about submitting

Read the whole story
alvinashcraft
just a second ago
reply
Pennsylvania, USA
Share this story
Delete

Get ready for iPhone Duo

1 Share
iPhone Duo partially folded showing the Home Screen and widgets across both displays.

Start getting ready for iPhone Duo today. Watch new videos, sign up for Group Labs, and take part in Q&As on the Apple Developer Forums.

Explore now

Read the whole story
alvinashcraft
just a second ago
reply
Pennsylvania, USA
Share this story
Delete

Introducing Fast and Reliable Wireless Debugging with Android Debug Bridge (ADB) Wi-Fi 2.0

1 Share
Posted by Steven Jenkins, Product Manager, Sherif Eid, Senior Software Engineer, and Fabien Sanglard, Staff Software Engineer, Android Studio



Wireless debugging on Android is now faster, more reliable, and easier to set up than ever. With ADB Wi-Fi 2.0, we’ve introduced a new server stack and smarter network handling to directly address developer feedback around usability gaps.

How ADB Wi-Fi 2.0 Improves Wireless Debugging

To ensure ADB Wi-Fi 2.0 is even more reliable, we reworked all three core components of the stack: the adb server, the adbd daemon, and Android Studio.

Here are the new features:

  • A new server stack (adb): Previously, wireless device connections would sever when network configurations changed or devices were turned off. This meant that connections would drop for common occurrences. With our new mDNS stack, we’ve replaced both Bonjour and legacy mDNS so that your wireless devices more reliably stay connected as you go about your day.
  • Smarter network handling (adbd): Previously, the workstation's mDNS client would sporadically drop services. Now, the daemon automatically turns off ADB Wi-Fi when it detects an untrusted network and re-enables itself once running on a user-allowed network.
  • Improved discoverability in Android Studio: Previously, Wi-Fi pairing was difficult to find. Now, you simply enable wireless debugging on your phone and it will show in Android Studio’s Device Manager.

With ADB Wi-Fi 2.0, auto-connection success rates improved by 32% and connection speeds increased by 66% for 90% of connections.

Getting Started

You can use ADB Wi-Fi 2.0 on your phone, tablet, Wear OS, and TV. Here’s how to get started:

  1. Update to Android 17, Android SDK Platform-Tools 37.0.0, and Android Studio Quail 3 or later.
  2. Ensure your workstation and your Android device are connected to the same Wi-Fi network.
  3. On your device, navigate to Developer Options and enable Wireless debugging.
  4. Open the Android Studio Device Manager and click the pair over Wi-Fi icon.
  5. Scan the QR code with your device or use a pairing code, and you're all set!

For more information, see the documentation or watch the presentation at Android Makers by droidcon 2026.

As always, we appreciate any feedback. If you find a bug or issue, please report it. Also, you can be part of our vibrant Android developer community on LinkedIn, YouTube, or X.

Read the whole story
alvinashcraft
18 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

5 ways to use Gemini text-to-speech (TTS) in your apps with Firebase AI Logic

1 Share
Read the whole story
alvinashcraft
26 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

What a Machine Learning Model is and How to Make One

1 Share

Machine learning can sound much more complicated than it actually is. You hear words like models, training, features, datasets, predictions, and algorithms, and it can feel like you need a PhD in mathematics before you're allowed to write your first machine learning program.

But at its core, machine learning is about getting a computer to learn patterns from examples and then use those patterns to make predictions about new examples. If you've ever learned to recognize a cat after seeing lots of cats, you already understand the basic idea.

In this tutorial, we're going to build a real machine learning model in Python. We'll start with a tiny dataset, train a model to predict whether a student might pass an exam based on the number of hours they studied, and then use the trained model to make predictions about new students.

Prerequisites

You don't need any previous machine learning experience to follow this tutorial. We'll introduce each machine learning concept as we go.

But having a basic understanding of Python will make the tutorial easier to follow. You should be comfortable with:

  • Creating and using variables

  • Working with Python lists

  • Writing basic if/else statements

  • Calling functions

  • Reading and running a Python program

  • Using a terminal or command prompt to run commands

You should also have:

  • Python installed on your computer

  • A text editor or code editor, such as VS Code

  • A terminal or command prompt

  • An internet connection to install the required Python library

You do not need prior knowledge of machine learning, scikit-learn, statistics, or advanced mathematics. I'll explain the machine learning concepts and code step by step.

What You Will Learn

The goal isn't just to get the code working. We're going to understand what each important line does, why we need it, and what's actually happening behind the scenes.

By the end, you'll have a much clearer mental model of what machine learning actually is and how you can start building models yourself.

What Is a Machine Learning Model?

A machine learning model is a program that has learned a pattern from data.

That definition is intentionally simple.

Suppose you show a child several animals and tell them which ones are cats. After seeing enough examples, the child might notice that cats usually have certain characteristics: whiskers, four legs, fur, a particular face shape, and so on. When they see a new animal, they can use what they learned to make a guess about whether it is a cat.

A machine learning model works in a similar way, except instead of looking at animals, it works with numbers and data.

For example, suppose we give a model information about students:

Hours Studied Exam Result
1 Fail
2 Fail
3 Fail
4 Pass
5 Pass
6 Pass

The model can look at these examples and discover a relationship between studying time and exam results. It might learn that students who study more tend to have a higher chance of passing.

We aren't explicitly writing that rule into the program. The model learns the relationship from the examples.

That's the key idea behind machine learning.

Machine Learning vs Traditional Programming

This becomes much clearer when you compare machine learning with traditional programming.

In traditional programming, you give the computer rules and data, and it produces an answer.

For example:

Data + Rules → Answer

You might write:

hours = 5

if hours >= 4:
    print("Likely to pass")
else:
    print("Likely to fail")

Here, you explicitly created the rule:

hours >= 4

The computer isn't learning anything. You told it exactly what to do.

Machine learning flips this around. Instead of manually writing the rule, you give the computer examples:

Examples + Correct Answers → Machine Learning Model

The model figures out a useful pattern from those examples.

Then you can give the trained model new data:

New Data + Trained Model → Prediction

That difference is one of the most important concepts to understand.

What Does "Training" Mean?

Training is simply the process of teaching a machine learning model using examples.

Imagine that you're teaching someone to recognize whether a student is likely to pass an exam.

You give them examples:

1 hour → Fail
2 hours → Fail
3 hours → Fail
5 hours → Pass
6 hours → Pass

After looking at enough examples, they start noticing a pattern.

Machine learning training works similarly.

We give the algorithm data, and the algorithm adjusts the model so that its predictions become better at matching the examples it's been given.

The word training sounds fancy, but the basic idea is just to give the model examples and let it learn a useful pattern.

What Is a Dataset?

A dataset is simply a collection of data.

For our project, we can represent our dataset using Python lists.

Suppose we have:

hours = [1, 2, 3, 4, 5, 6, 7, 8]

and:

results = [0, 0, 0, 1, 1, 1, 1, 1]

Here, we're using numbers to represent the exam results.

We'll use:

0 = Fail
1 = Pass

So our data means:

1 hour → Fail
2 hours → Fail
3 hours → Fail
4 hours → Pass
5 hours → Pass
6 hours → Pass
7 hours → Pass
8 hours → Pass

The first list contains our input information. The second list contains the answers we want the model to learn from.

What Are Features and Labels?

Machine learning uses a few words that sound more complicated than they really are.

A feature is information that we use to make a prediction.

A label is the answer we want the model to predict.

In our example:

Hours studied → Feature
Pass/fail → Label

If we had more information about each student, we could have multiple features, such as:

Hours studied
Previous exam score
Homework completion rate
Attendance

Then the model could use all of those features to predict:

Pass or fail

So you can think of it like this: Features are the clues. The label is the answer.

What Kind of Machine Learning Are We Using?

Our example uses supervised learning. Supervised learning means we train the model using examples where we already know the correct answer.

For example:

Hours studied: 2
Correct answer: Fail

and:

Hours studied: 6
Correct answer: Pass

The model sees both the input and the correct output during training.

This is different from unsupervised learning, where the model receives data without being given the correct answers and tries to find patterns or groups on its own.

There are other types of machine learning too, including reinforcement learning, but supervised learning is a great place to start because the basic workflow is easy to understand.

What Are We Actually Going to Build?

We're going to create a Python program that:

  1. Creates a small dataset.

  2. Separates the inputs from the answers.

  3. Splits the data into training and testing data.

  4. Creates a machine learning model.

  5. Trains the model.

  6. Tests how well it performs.

  7. Gives the model new information.

  8. Uses the model to make a prediction.

Our final program will use a decision tree classifier from the scikit-learn library.

A decision tree is a machine learning algorithm that makes decisions by asking a series of questions about the data.

For our simple example, the model might learn a pattern similar to:

Did the student study enough hours?
        ↓
      Yes → Pass
      No  → Fail

Real decision trees can become much more complicated, but this gives you the basic idea.

Now let's get started building!

Step 1: Install Python

To follow along here, you'll need Python installed on your computer.

You can check whether Python is already installed by running:

python --version

You should see something similar to:

Python 3.12.0

The exact version doesn't have to match that example.

Step 2: Create a Project Folder

Create a folder called:

machine-learning-model

Inside that folder, create a file called:

model.py

Our project will eventually look like:

machine-learning-model/
└── model.py

Step 3: Install scikit-learn

We're going to use a Python library called scikit-learn.

scikit-learn provides many machine learning algorithms and tools, so we don't have to implement everything from mathematical equations ourselves.

Install it with:

pip install scikit-learn

We could technically build a simple machine learning algorithm ourselves, and doing that can be useful for learning the mathematics later. For our first practical model, however, using a machine learning library lets us focus on understanding the workflow.

Step 4: Import the Model

Open model.py and write:

from sklearn.tree import DecisionTreeClassifier

This line imports the DecisionTreeClassifier class from scikit-learn.

This structure:

from sklearn.tree

means we're getting something from scikit-learn's tree module.

Then:

import DecisionTreeClassifier

means we want to use the decision tree classifier.

After importing it, we can create a machine learning model with:

model = DecisionTreeClassifier()

The variable:

model

will represent our machine learning model.

At this point, the model hasn't learned anything. It's basically an empty model waiting for training data.

Step 5: Create Our Dataset

Now let's create the examples our model will learn from.

Add:

hours = [1, 2, 3, 4, 5, 6, 7, 8]

This list represents how many hours each student studied.

Then:

results = [0, 0, 0, 1, 1, 1, 1, 1]

This list represents whether each student passed.

Remember:

0 = Fail
1 = Pass

So the first student studied for one hour and failed.

The fourth student studied for four hours and passed.

The eighth student studied for eight hours and passed.

We now have examples that the model can learn from.

Step 6: Understand Why the Data Structure Matters

There's an important detail here. Machine learning libraries usually expect the input data to be structured in a particular way.

Our hours list looks like this:

[1, 2, 3, 4, 5, 6, 7, 8]

But scikit-learn expects features to be represented as a two-dimensional structure.

Why?

Because a machine learning dataset can contain multiple features.

Imagine this dataset:

Hours Studied | Attendance | Previous Score
2             | 80%        | 65
5             | 95%        | 82
7             | 98%        | 91

Each row represents one example.

Each column represents one feature.

So even though our current model only has one feature, we still need to represent it as a two-dimensional dataset.

We can do this using nested lists:

X = [
    [1],
    [2],
    [3],
    [4],
    [5],
    [6],
    [7],
    [8]
]

Each inner list represents one student.

The first student has:

[1]

meaning they studied one hour.

The second has:

[2]

and so on.

The uppercase X is a common convention for the feature data.

Now create the labels:

y = [0, 0, 0, 1, 1, 1, 1, 1]

The lowercase y is commonly used for the target or label values.

So we now have:

X = [
    [1],
    [2],
    [3],
    [4],
    [5],
    [6],
    [7],
    [8]
]

y = [0, 0, 0, 1, 1, 1, 1, 1]

You can think of X as:

Here are the clues.

And y as:

Here are the correct answers.

Step 7: Split the Data

We don't want to train and test the model using exactly the same examples.

That would be a bit like giving a student the exact questions they'll see on an exam and then saying:

“Wow, you got 100%. Great job.”

We haven't really tested whether they learned anything.

Instead, we'll separate our dataset into:

  • Training data

  • Testing data

The training data teaches the model, while the testing data checks whether the model can make predictions on examples it wasn't trained on.

Import the splitting function:

from sklearn.model_selection import train_test_split

Now we can write:

X_train, X_test, y_train, y_test = train_test_split(
    X,
    y,
    test_size=0.25,
    random_state=42
)

There is a lot happening in this one line, so let's unpack it.

train_test_split()

This function randomly divides our data into training and testing portions.

We pass it:

X

which contains our features.

Then:

y

which contains our labels.

The argument:

test_size=0.25

means we want approximately 25% of our data for testing.

The remaining 75% is used for training.

random_state=42

The data is randomly split.

If you run the program multiple times without controlling the randomness, you might get a different split each time.

Setting:

random_state=42

makes the random split reproducible.

The number 42 isn't magical. You could use another integer.

For example:

random_state=10

would also work.

We use 42 simply because it's a common example value.

The Four Variables

The function returns four pieces of data:

X_train
X_test
y_train
y_test

X_train contains the features used to train the model.

y_train contains the correct answers for those training examples.

X_test contains the features used to test the model.

y_test contains the correct answers so we can compare them with the model's predictions.

Step 8: Create the Model

Now create our decision tree:

model = DecisionTreeClassifier()

This creates the model object.

Again, nothing has been learned yet. Think of it like buying a blank notebook: the notebook exists, but it doesn't contain your notes yet.

Step 9: Train the Model

Now we get to the line that actually teaches the model:

model.fit(X_train, y_train)

This is one of the most important lines in machine learning.

The .fit() method trains the model using the data we provide.

We give it:

X_train

which contains the examples.

Then:

y_train

which contains the correct answers.

The model looks for patterns connecting the features to the labels.

In our case, it's trying to discover a relationship between:

Hours studied

and:

Pass/fail

The exact internal process depends on the algorithm. A decision tree learns decision rules that split the training data into groups that become increasingly useful for predicting the target.

The important thing to understand right now is:

model.fit(X_train, y_train)

means:

Learn from these examples and their correct answers.

Step 10: Make Predictions

After training, we can give the model new data.

Suppose a student studied for five hours.

We can write:

prediction = model.predict([[5]])

Notice that we used:

[[5]]

instead of:

[5]

The outer list represents the collection of examples. The inner list represents the features for one example.

Since our model has one feature, that example contains one value:

[5]

So:

[[5]]

means:

Predict the result for one student whose feature value is five hours.

The model returns a prediction.

We can print it:

print(prediction)

You might see:

[1]

Remember:

1 = Pass
0 = Fail

So the model predicted that the student would pass.

Step 11: Convert the Prediction Into Human-Friendly Text

A prediction of:

1

isn't particularly friendly.

We can write:

if prediction[0] == 1:
    print("The model predicts: Pass")
else:
    print("The model predicts: Fail")

Let's look at:

prediction[0]

The model returns a list containing the prediction:

[1]

The [0] gets the first item.

Python starts counting list positions at zero.

So:

prediction[0]

means:

Give me the first prediction.

Then:

if prediction[0] == 1:

checks whether the model predicted 1.

If it did, we print:

The model predicts: Pass

Otherwise, we print:

The model predicts: Fail

Step 12: Test the Model

We shouldn't just make one prediction and assume the model is good.

We need to evaluate it.

First, make predictions for the test dataset:

predictions = model.predict(X_test)

Now:

predictions

contains the model's predictions for the examples it didn't see during training.

We can compare these predictions with:

y_test

which contains the actual answers.

scikit-learn provides an accuracy function:

from sklearn.metrics import accuracy_score

Then:

accuracy = accuracy_score(y_test, predictions)

The function compares the correct answers with the model's predictions.

If the model gets:

8 out of 10

correct, the accuracy would be:

0.8

We can turn that into a percentage:

print(f"Model accuracy: {accuracy * 100:.2f}%")

The * 100 converts:

0.8

into:

80

The:

:.2f

means we want two decimal places.

So the output could look like:

Model accuracy: 80.00%

A Very Important Warning About Accuracy

Accuracy is useful, but it doesn't tell you everything about a model.

Imagine you're trying to detect a rare disease.

Suppose:

99 people are healthy
1 person is sick

A terrible model could simply predict:

Everyone is healthy.

It would be 99% accurate.

But it completely failed at the thing we actually care about: identifying the sick person.

This is why machine learning developers use other evaluation metrics depending on the problem, including precision, recall, F1 score, mean squared error, and others.

For our beginner example, accuracy is enough to understand the basic workflow.

Step 13: Put Everything Together

Our complete beginner machine learning program looks like this:

from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score


# Dataset
X = [
    [1],
    [2],
    [3],
    [4],
    [5],
    [6],
    [7],
    [8]
]

y = [
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1
]


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


# Create the machine learning model
model = DecisionTreeClassifier()


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


# Make predictions on the test data
predictions = model.predict(X_test)


# Calculate accuracy
accuracy = accuracy_score(y_test, predictions)


print(f"Model accuracy: {accuracy * 100:.2f}%")


# Make a prediction for a new student
hours_studied = [[5]]

prediction = model.predict(hours_studied)


# Display the prediction
if prediction[0] == 1:
    print("The model predicts: Pass")
else:
    print("The model predicts: Fail")

Reading the Complete Code From Top to Bottom

The first three lines:

from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score

import the tools we need.

Then:

X = [
    [1],
    [2],
    [3],
    [4],
    [5],
    [6],
    [7],
    [8]
]

creates the feature data.

Then:

y = [
    0,
    0,
    0,
    1,
    1,
    1,
    1,
    1
]

creates the labels.

Next:

X_train, X_test, y_train, y_test = train_test_split(...)

divides the dataset into training and testing data.

Then:

model = DecisionTreeClassifier()

creates the model.

Next:

model.fit(X_train, y_train)

trains it.

Then:

predictions = model.predict(X_test)

asks the trained model to make predictions about the testing examples.

Next:

accuracy = accuracy_score(y_test, predictions)

measures how many of those predictions were correct.

Finally:

prediction = model.predict([[5]])

asks the model to predict the result for a new student who studied for five hours.

That's the entire machine learning workflow.

What Is Actually Happening Inside the Model?

This is where machine learning gets more interesting.

When we run:

model.fit(X_train, y_train)

the decision tree doesn't simply memorize the phrase:

4 hours = Pass

It analyzes the training examples and looks for useful ways to split them.

For example, it might discover a rule similar to:

Is hours studied <= 3.5?

If yes:

Predict Fail

If no:

Predict Pass

The exact tree depends on the training data and algorithm settings.

If we added more features, the tree could make decisions using several pieces of information.

For example:

Is study time <= 3.5?

       Yes
        ↓
    Predict Fail

       No
        ↓
Is attendance <= 80%?

       Yes
        ↓
    Predict Fail

       No
        ↓
    Predict Pass

Again, our actual code doesn't manually create these rules.

The algorithm learns them from the training data.

What Does "Learning" Actually Mean?

This is one of the most misunderstood parts of machine learning.

The computer isn't learning in exactly the same way a human does. A machine learning algorithm uses mathematical procedures to adjust a model based on data.

Different algorithms learn in different ways. A decision tree searches for useful splits. A linear regression model learns numerical parameters that describe a relationship. A neural network adjusts many parameters using optimization algorithms. And da clustering algorithm groups similar examples together.

So "learning" is a convenient word for:

Using an algorithm to adjust a model so that it captures useful patterns in data.

What Is a Parameter?

A parameter is a value inside a machine learning model that is learned from data.

For example, in a simple linear model:

y = mx + b

the model might learn values for:

m
b

Those values determine the relationship between the input and output.

Neural networks can have millions or billions of learned parameters.

The important idea is that the model's behavior is controlled by values that are learned or adjusted during training.

Parameters vs Hyperparameters

These two terms are easy to confuse.

A parameter is generally learned from the training data, while a hyperparameter is something you configure before or during training.

For our decision tree, we could specify:

model = DecisionTreeClassifier(
    max_depth=3
)

Here:

max_depth=3

is a hyperparameter.

We're telling the algorithm:

Don't allow the decision tree to grow beyond a depth of three.

The model learns its internal decision rules from the data, while we choose the hyperparameter.

This distinction becomes increasingly important as you build more advanced models.

Why Do We Need Training and Testing Data?

Imagine you're studying for a math exam.

Your teacher gives you ten practice questions, and you memorize all ten answers.

Then the exam contains those exact ten questions, so you get everything correct.

Does that prove you understand mathematics? Not really. You might simply have memorized the examples.

Machine learning has a similar problem called overfitting. A model can become extremely good at the training data without becoming good at handling new data.

That's why we keep some examples separate. The model doesn't see the test examples during training. Then we can ask:

Can the model generalize what it learned to examples it hasn't seen before?

That ability to work on new data is one of the most important goals of machine learning.

What Is Overfitting?

Overfitting happens when a model learns the training data too specifically.

Imagine we give the model a very small dataset. Instead of learning the general pattern:

More studying tends to increase the chance of passing.

it might effectively memorize the specific examples.

That can make training performance look excellent while performance on new data is poor.

A model that performs well on training data but poorly on unseen data is often overfitting.

What Is Underfitting?

Underfitting is basically the opposite. The model is too simple to capture the important patterns in the data.

Imagine trying to predict someone's exam result using only one or two results.

That doesn't give the model enough useful information, and it might perform poorly on both training and testing data.

Good machine learning involves finding a model that's complex enough to learn useful patterns but not so complex that it simply memorizes the training examples.

Why Our Dataset Is Not a Real Machine Learning Dataset

Our eight examples are intentionally tiny.

A real machine learning project would usually use much more data.

For example, you might collect:

10,000 students

with features such as:

Hours studied
Attendance
Homework completion
Previous scores
Sleep duration

and a label such as:

Passed

Then the model could learn from thousands of examples.

Our tiny dataset is useful because we can understand every part of the process.

Step 14: Add More Features

Let's make our example slightly more realistic.

Instead of only using hours studied, suppose we have:

Hours studied
Attendance

We can represent each student like this:

X = [
    [2, 70],
    [3, 75],
    [4, 80],
    [5, 85],
    [6, 90],
    [7, 95]
]

Now each row contains two features.

For example:

[5, 85]

means:

5 hours studied
85% attendance

Our labels could still be:

y = [0, 0, 1, 1, 1, 1]

Now the model has more information to work with.

We could train it exactly the same way:

model.fit(X_train, y_train)

The difference is that the model now has two features instead of one.

Step 15: Make a Prediction With Multiple Features

Suppose we want to predict the result of a student who:

Studied for 5 hours
Had 90% attendance

We represent that as:

new_student = [[5, 90]]

Then:

prediction = model.predict(new_student)

The model uses both features to make the prediction.

This is how machine learning scales from simple examples to datasets with many columns.

What Happens When You Have Hundreds of Features?

The exact same basic concept applies.

Imagine predicting house prices using:

Number of bedrooms
Square footage
Number of bathrooms
Location
Age of house
Garage size
Lot size
Distance to school

Each one can become a feature. Then the model uses those features to predict a target:

House price

The basic structure remains:

Features → Model → Prediction

The difficult part becomes choosing useful data, selecting an appropriate algorithm, cleaning the data, evaluating the model, and making sure the model works well outside the training dataset.

What Is Regression?

So far, our model predicts categories:

Pass
Fail

This is a classification problem. Classification means predicting a category.

Examples include:

Spam / Not Spam
Cat / Dog
Fraud / Not Fraud
Pass / Fail

Regression is different. It predicts a numerical value.

For example:

House price = $425,000

or:

Temperature = 82.4°F

or:

Sales = $17,500

So a useful distinction is:

Classification → Predict a category

Regression → Predict a number

A Simple Regression Example

scikit-learn provides a model called LinearRegression.

Import it:

from sklearn.linear_model import LinearRegression

Create the model:

model = LinearRegression()

Then train it:

model.fit(X_train, y_train)

And make a prediction:

prediction = model.predict([[5]])

The workflow is almost identical.

That's one reason machine learning libraries are useful: once you understand the general workflow, learning new algorithms becomes much easier.

The General Machine Learning Workflow

Most beginner machine learning projects can be thought about using this sequence:

1. Collect Data

Get examples related to the problem you want to solve.

2. Clean the Data

Fix missing, incorrect, duplicated, or inconsistent information.

3. Select Features

Choose the information you want the model to use.

4. Choose a Model

Select an algorithm appropriate for the problem.

5. Split the Data

Separate training and testing examples.

6. Train

Use the training data to fit the model.

7. Evaluate

Measure how well the model performs.

8. Improve

Change the data, features, model, or hyperparameters.

9. Make Predictions

Use the trained model on new data.

10. Deploy

If the model is useful, integrate it into an application.

This workflow is much more important than memorizing the name of a particular algorithm.

How Machine Learning Fits Into Real Applications

A trained model is usually not the entire application.

Imagine you build a model that predicts whether an email is spam. You might eventually create:

Email
 ↓
Backend
 ↓
Machine Learning Model
 ↓
Prediction
 ↓
User Interface

The model is one component inside a larger software system.

The same idea applies to:

Recommendation systems
Fraud detection
Search engines
AI assistants
Image classification
Demand forecasting
Customer analytics

This is important for developers because machine learning engineering isn't only about training models. You also need to know how to build software around those models.

What Should You Learn After This?

Once you understand this basic project, there are several useful directions to explore.

Learn NumPy

NumPy is one of the fundamental Python libraries for numerical computing. You'll encounter arrays everywhere in machine learning.

Learn pandas

pandas is extremely useful for working with datasets.

For example:

import pandas as pd

You can load a CSV file:

data = pd.read_csv("students.csv")

and inspect it:

print(data.head())

This becomes much more useful once you start working with real datasets.

Learn Data Visualization

Libraries such as Matplotlib can help you visualize your data. For example, you might want to see whether exam scores increase as study hours increase.

Visualizing data can help you understand patterns before you even train a model.

Learn More Algorithms

Once decision trees make sense, explore:

Linear Regression
Logistic Regression
Random Forests
K-Nearest Neighbors
Support Vector Machines
Gradient Boosting
Neural Networks

You don't need to memorize all of them.

Focus on understanding what kind of problem each algorithm is designed to solve and what assumptions or tradeoffs come with it.

Learn the Mathematics

You can build useful machine learning applications without deriving every equation from scratch.

But if you want to understand machine learning deeply, mathematics becomes increasingly valuable.

Start with:

Algebra
Functions
Probability
Statistics
Linear Algebra
Calculus

Concepts such as derivatives and gradients become especially important when you start learning how neural networks train.

Here's a calculus course and a statistics handbook as well to get you started.

The Mental Model to Keep

When you're learning machine learning, don't let the terminology make everything feel more complicated than it is.

At the simplest level, think about machine learning like this:

You have examples, and each example contains information called features. Some examples also have known answers called labels.

You give those examples to a learning algorithm. The algorithm creates a model that captures patterns in the examples.

Then you give the trained model new information. The model uses the patterns it learned to make a prediction.

In code, the basic workflow looks like:

model = SomeMachineLearningModel()

model.fit(X_train, y_train)

predictions = model.predict(X_test)

That three-part structure is worth remembering.

model = ...

creates the model.

model.fit(...)

trains the model.

model.predict(...)

uses the trained model.

Everything else you learn about machine learning builds on this foundation.

Final Thoughts

A machine learning model isn't a magical brain sitting inside your computer. It's a mathematical model created by an algorithm that has learned patterns from data.

The most important shift in thinking is understanding that you don't always need to program every rule yourself.

With traditional programming, you might explicitly write:

if hours >= 4:
    result = "Pass"

With machine learning, you provide examples:

1 hour → Fail
2 hours → Fail
3 hours → Fail
4 hours → Pass
5 hours → Pass

and let the learning algorithm find a useful pattern.

Our project was intentionally small, but the same basic ideas appear in much larger systems. A recommendation engine, fraud detector, image classifier, and many other machine learning applications still have to deal with data, features, training, evaluation, and predictions.

Once you understand those fundamentals, terms like training, features, labels, classification, regression, overfitting, and models stop sounding like a collection of random AI vocabulary and start fitting into one connected idea.

You don't need to start by building the next giant AI system. Start with a tiny dataset, train one model, inspect its predictions, change something, and see what happens. That hands-on process is where machine learning starts becoming much easier to understand.

Happy coding!



Read the whole story
alvinashcraft
38 seconds ago
reply
Pennsylvania, USA
Share this story
Delete

MSVC Build Tools Preview updates – September 2026

1 Share

The MSVC Build Tools Preview is updated regularly with the latest features and fixes from the MSVC development team. This post covers updates from the past month, currently targeting the v14.52 release. This encompasses changes across the compiler frontend, backend, linker, standard library, and related tools.

Although you can acquire the MSVC Build Tools Preview through either the Visual Studio 2026 Stable Channel or Insiders Channel, Insiders gets MSVC Preview updates more quickly (roughly weekly).

To check whether it is installed, make sure one or both of these components are selected in the Visual Studio Installer:

  1. MSVC Build Tools for x64/x86 (Preview)
  2. MSVC Build Tools for ARM64/ARM64EC (Preview)

Follow the instructions at https://aka.ms/msvc/preview to configure your IDE and command prompts to use the MSVC Build Tools Preview.

The version number printed by cl.exe and link.exe will be at least 19.52.36725 / 14.52.36725.

We appreciate your feedback. Please report issues through Visual Studio Developer Community so we can address them before the toolset moves out of preview.

C++ Conformance and Frontend

  • Brought the C4815 and C4816 warnings (zero-sized arrays and by-value parameters that are copied) to the C compiler.
  • Improved diagnostics for preprocessor constant expressions, including better reporting of malformed and nested conditions.
  • Improved the source text shown in several diagnostics so the reported expression better matches what you wrote.
  • Fixed rejection of valid constexpr void* variables.
  • Unified the behavior of type traits when their preconditions are not satisfied.
  • Added validation of the symbols entered into function parameter scopes, catching malformed declarations earlier.
  • Fixed a compiler crash when computing the size of a dependent type in some Qt code patterns.
  • Fixed an internal compiler error triggered by a name lookup on an imported using-declaration that names an overload set.
  • Fixed an internal compiler error involving constraint failures in tuple-like structured bindings.
  • Fixed a missing access check when taking the address of a static member.
  • Fixed overload resolution failures (C2672) when passing certain reference wrappers.
  • Fixed a rare race condition in cl.exe when releasing intermediate buffers.
  • Fixed a spurious C4739 warning reported against compiler-generated temporaries.

C++ Modules

  • Fixed argument-dependent lookup of an unresolved template-id across a module boundary.
  • Fixed instantiation of a defaulted function when the instantiation crosses module units.
  • Preserved macro whitespace when building and consuming header units, so stringized macros round-trip correctly.
  • Improved handling of types first defined in the global module fragment.

Code Generation and Optimization

ARM64 improvements:

  • Added support for the FEAT_CSSC common short sequence compression instructions.
  • Added intrinsics for FEAT_FAMINMAX (floating-point absolute minimum/maximum).
  • Implemented the FEAT_LUT LUTI4 lookup-table instructions, and added bf16 support for the LUTI2 and LUTI4 intrinsics.
  • Recognized copysign as an inline intrinsic.
  • Hoisted loop-invariant SVE all-true predicates out of loop bodies.
  • Modeled condition flags for SVE compares and the MATCH/NMATCH and WHILE instruction families, enabling more flag reuse.
  • Fused a NEON-to-SVE bridge of an undefined vector into a single instruction, and improved register allocation preferences for bridge moves.
  • Added support for __preserve_none and [[msvc::musttail]].
  • Improved extraction of a 32-bit float from the upper half of a two-element vector.
  • Added more NEON by-element multiply patterns and better indirect-addressing support in the instruction selector.
  • Fixed ARM64X coroutine tail calls when Control Flow Guard is enabled.
  • Fixed an internal compiler error when emitting debug information for an unused constant parameter.
  • Fixed lowering of guest-reference imports for ARM64EC under LTCG.

x64 and x86 improvements:

  • Broad APX improvements: additional NDD (new data destination) instruction patterns and tuning for memory operand forms, conversion of NDD INC/DEC and SUB sequences into shorter LEA forms, extended shift, compare, and conditional-move optimizations, APX awareness in the constant-propagation lattice, and APX-aware loop unrolling and strength-reduction cost models.
  • Added conditional-compare (CFCMOV) optimizations.
  • Preferred the shorter LEA encoding over ADD where it is profitable.
  • Added AVX2 and AVX-512 memchr implementations and updated the memcpy selection for AMD processors.
  • Removed a redundant register copy before broadcasting a scalar double to a vector.
  • Fixed selection of horizontal add for 128-bit 32-bit-float reductions.
  • Improved the accuracy of shift-result range tracking by modeling the hardware shift-count mask.
  • Improved combining of adjacent vector stores for two-element double vectors.
  • Fixed vector register zeroing after block initialization sequences.
  • Fixed AVX-512 upper-register usage to follow the enclosing function’s architecture rather than the module’s.
  • Fixed non-deterministic code generation for floating-point and vector zero constants.
  • Removed the deprecated AMX TMMULTF32PS instruction.
  • Added fixed-register constraints for RDPRU.
  • Stopped re-aligning EVEX-encoded instructions in a way that could change encodings.
  • Improved code size when compiling with /O1 and /Os by running additional pre-allocation optimizations and adjusting instruction costs for size.

Optimizer improvements:

  • Enabled a new aliased copy-propagation pass, which also recognizes memset and memcpy and hoists loop-invariant aliased loads.
  • Improved the pre-vectorizer’s loop unswitching to handle nested loops, unblocking vectorization in more cases.
  • Recognized sub-accumulate reduction patterns in the vectorizer.
  • Improved vectorization of phi nodes in the superword-level parallelism pass.
  • Improved inlining heuristics: penalized inlining cold code into hot code.
  • Extended min/max canonicalization through single-use address copies.
  • Folded mixed-signedness compare-branch diamonds into a single compare.
  • Enabled common-subexpression elimination for vector element extraction.
  • Enabled tail-call optimization for indirect calls to noexcept functions.
  • Restored elision of static constant arrays.
  • Improved conditional-expression optimization when the compared value comes from a phi, and allowed more conditional-expression forms on x64.
  • Added an overflow check to predicate reasoning, and avoided merging conditional expressions whose comparisons differ in signedness.
  • Extended copy propagation with extended-basic-block analysis.
  • Improved compile time by avoiding repeated exception-handling region scans and by bounding dead-use searches that could hang x86 LTCG links.
  • Fixed a shrink-wrapping bug where register restores were chained to the wrong block.
  • Fixed a stack overflow caused by unbounded recursion while processing structured exception handling.
  • Fixed an internal compiler error involving non-COMDAT segments.
  • Fixed a use-after-free and a use-before-def in the SSA optimizer.
  • Fixed scalar replacement of aggregates for certain multi-byte types.
  • Prevented cross-module Just My Code marker collisions under LTCG.
  • Preserved loop-invariant dominance in the loop unroller, and fixed range inference for mutable symbols.
  • Fixed an incorrect simplification of unsigned shift-right of a multiplication.

Debug Information

  • Continued work to support debug-information streams up to 4 GB, including a refactoring of the underlying buffer layer and a new public stream API.
  • Added debug-record support for alternate object names, so tools can report the originating object file more accurately.
  • Fixed the mapping from declarations to definitions in emitted debug information.
  • Reported debug thread-pool startup failures as a diagnostic instead of terminating.
  • Reduced allocations in type-record processing, improving throughput on large programs.
  • Fixed a DIA stack overflow on cyclic type-index references when reading corrupt PDBs.
  • Fixed cross-PDB type-index cache contamination in the PDB server (mspdbsrv.exe).
  • Fixed object counting while reading a library in the object reader.
  • Added a switch to emit type aliases into debug records for improved debugging.
  • Rejected an unsupported DIA write-back API parameter value.
  • Retired writing of the obsolete minimal/fastlink PDB format.

Linker and Assembler

  • Named the metadata item responsible for LNK2022 and LNK4227, making mismatched metadata far easier to diagnose.
  • Improved error reporting from the assembler.
  • Disabled early-exit epilog sharing for the newer unwind format, correcting unwind behavior.
  • Fixed a crash when incrementally relinking a resource-only DLL.
  • Fixed incremental relink tracking of weak external symbols.
  • Fixed an access violation while emitting symbols for a discarded duplicate COMDAT.
  • Fixed a null-dereference (previously reported as LNK1000) when linking a COMDAT section with no symbols; it now produces the diagnostic LNK1143.
  • Fixed a link.exe /dump crash on a malformed debug directory, and a dumpilk /symbols crash on valid incremental-link files.
  • Fixed an access violation in dumpbin /UNWINDINFO on an out-of-range register value.
  • Hardened parsing of malformed object files, libraries, and C++ module metadata across the linker and its dump tools.

Static Analysis

  • Replaced several ad-hoc groupings of analysis warnings with a tag-based system, making rule sets easier to author.
  • Added names and descriptions to code-analysis warnings so SARIF viewers can display them.
  • Fixed ATL and MFC headers to build cleanly under stricter conformance settings, including replacing throw() with noexcept in atlcom.h and removing an ill-formed cast.
  • Removed an invalid typename before an unqualified template-id in the concurrency headers.

AddressSanitizer

  • Fixed an ARM64 correctness issue involving page writes and instruction handling.
  • Improved runtime performance by removing duplicated quarantine work.

Standard Library

Tickets Fixed

The following tickets reported through Developer Community have been fixed in this update:

Try Out the MSVC Build Tools Preview!

Please try out the MSVC Build Tools Preview and let us know what you think! Installation instructions:

  1. Download Visual Studio 2026 Insiders for frequent updates, or download Visual Studio 2026 for less frequent updates.
  2. Install the Desktop development with C++ workload and make sure one or both of these MSVC components are checked (depending on your target build architecture):
    • MSVC Build Tools for x64/x86 (Preview)
    • MSVC Build Tools for ARM64/ARM64EC (Preview)
  3. Follow the instructions on https://aka.ms/msvc/preview on configuring your IDE & command prompts to use the MSVC Build Tools Preview.
  4. Share your feedback with us on Visual Studio Developer Community.

The post MSVC Build Tools Preview updates – September 2026 appeared first on C++ Team Blog.

Read the whole story
alvinashcraft
1 minute ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories