Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

In the case of this project commits must be made with certain specifications and things in mind please read Commits for more information.

Training and Testing Machine Learning Models

...

Machine Learning Basics Relevant to This Course

Note: We do not expect you to master all aspects of machine learning. Instead, focus on the following fundamental concepts that are directly related to this course.

What is Machine Learning?

Machine learning (ML)is a crucial step toward achieving artificial intelligence type of Artificial Intelligence (AI) . It involves creating programs that analyze data and learn to predict outcomes. In ML, models are developed to forecast specific events, such as predicting a user’s intent based on their input.

To evaluate the effectiveness of a model, a method called Train/Test is commonly used. This approach involves splitting the dataset into two parts: a training set and a testing set.

  • Training the model means building it by learning patterns and parameters from the training dataset.

  • Testing the model involves assessing its performance (e.g., accuracy) using the test dataset.

This process helps determine if the model is reliable enough for real-world application.

https://www.w3schools.com/python/python_ml_train_test.asp.that allows computers to learn and make decisions without being explicitly programmed. It involves feeding data into algorithms that can then identify patterns and make predictions on new data. In short, machines observe a pattern from data and attempt to imitate it in some way that can be either direct or indirect.

...

Machine learning can be categorized into three main types: supervised learning, unsupervised learning, and reinforcement learning. Supervised learning is the most commonly used type of machine learning, and it is also the focus of this course. In supervised learning, the model is trained on labeled data, meaning each input (feature) has a corresponding output (label). The objective is for the model to learn the relationship between the input variables and their associated labels. Once trained, the model can make accurate predictions or inferences on new, unseen data by applying the patterns it has learned from the labeled dataset.

Here are some examples of ML problems (input in bold and output in italic):

  • Using the pixels of an image to detect the presence or absence of a cat (image pixelscat or no cat)

  • Using the movies you've liked to predict other movies you may enjoy (liked moviesrecommended movies)

  • Using someone's words to predict whether they're happy or sad (text inputhappy or sad)

  • Using a raw audio file to predict a transcript of the audio (audio filetranscribed text)

Why do we need Machine Learning?

Machine learning is able to learn, train from data, and solve/predict complex solutions which cannot be done with traditional programming. It enables us with better decision making and solve complex business problems in optimized time. Recent advancements in AI have been propelled by machine learning, particularly its subset, deep learning. Additionally, compared to black-box agents like Dialogflow, developing our own machine learning models provides greater control, enabling continuous improvement over time.

...

Learning Book: Grokking Deep Learning

https://www.geeksforgeeks.org/introduction-machine-learning/

How do we train and evaluate a model?

When developing a machine learning model, one of the fundamental steps is to split the data into different subsets: training, testing, and validation datasets.

  • Training dataset: This subset is used to train the model. During training, the model learns patterns, relationships, and features from the data. The algorithm adjusts its parameters based on this dataset to minimize error and improve its predictions.

  • Test dataset: This subset is used to evaluate the performance (e.g., accuracy) of the trained model. After the model has been trained, the test dataset provides an unbiased assessment of how well the model generalizes to new, unseen data. The test data should NOT be involved in any way during training or validation.

  • Validation dataset (optional): This subset is used to fine-tune the model’s hyperparameters and provide an unbiased evaluation during the tuning process. Hyperparameters are settings of the model that are not learned during training, but are predefined before training starts (e.g., learning rate, number of layers in a neural network). The validation dataset helps ensure the model is tuned for optimal performance before final evaluation on the test data.

Therefore, there are several stages during the development of a model:

  • Training means building the model by learning patterns and parameters from the training dataset.

  • Testing involves assessing the model’s performance using the test dataset.

  • Hyperparameter tuning involves adjusting the model's hyperparameters to optimize its performance.

  • Model inference refers to using the trained model to make predictions or draw conclusions from new, unseen data. This step leverages the model’s learned patterns to apply it to real-world situations or new inputs.

https://medium.com/@jainvidip/understanding-train-test-and-validation-data-in-machine-learning-f8276165619c

https://www.w3schools.com/python/python_ml_train_test.asp.

What is Classification in Machine Learning?

Classification is a supervised machine learning method where the model aims to predict the correct label or category for a given input. In classification, the model is trained using labeled training data, learns to identify patterns, and is then evaluated on test data to assess its performance. Once trained and evaluated, the model can be used to make predictions on new, unseen data.

For example, a classification algorithm (classifier) might learn to predict whether a given email is spam or not, as illustrated below. This is a binary classification task, where the goal is to categorize the input data into two mutually exclusive classes. In this case, the training data is labeled with binary categories, such as "spam" and "not spam," "true" and "false," or "positive" and "negative." These labels guide the model in learning the differences between the two categories, allowing it to make accurate predictions when exposed to new data.

...

https://www.datacamp.com/blog/classification-machine-learning

A General Pipeline of Task-Oriented Spoken Dialogue Systems

Spoken dialogue systems (SDSs) have been the most prominent component in today’s virtual personal assistants, such as Microsoft’s Cortana, Apple’s Siri, Amazon Alexa, Google Assistant, and Facebook’s M. Unlike chitchat, task-oriented SDSs aim to assist users with a specific goal, for example, recommend a recipe or booking a hotel.
A classical pipeline architecture of a task-oriented spoken dialogue system includes key components:

  • Automatic Speech Recognition (ASR) - Converts spoken language into textual transcript.

  • Natural Language Understanding (NLU) - Interprets and extracts meaning from the transcript.

  • Dialogue Management (DM) - Manages the flow of conversation and determines the system’s response.

  • Natural Language Generation (NLG) - Constructs responses in natural language.

  • Text to Speech (TTS) - Converts the generated text into spoken output.

...

This hands-on approach will provide insight into developing and refining key elements of a dialogue system.

ASR with WHISPER

Automatic Speech Recognition (ASR) is a key component in the pipeline architecture, which converts spoken language into text. It enables machines to interpret and transcribe human speech, allowing for seamless interaction between users and applications through voice commands.

...