Creating personalised learning paths with AI
How teachers can create learning experiences that use AI to adapt to students' unique needs and preferences.
2024-11-13
In this tutorial, we'll walk through the process of using AI to create personalised learning paths for students. By following these steps, you'll be able to generate tailored learning experiences that adapt to each student's unique needs and preferences.
This is an advanced tutorial that uses code. To complete all steps, you’ll need:
- To be able to survey your students using a form, e.g. Google Forms or SurveyMonkey, to identify their preferred learning style
- An LMS
- Access to Google Analytics, and the ability to connect it to your LMS
- Knowledge of Google Sheets
- Knowledge of Python
Steps we’ll walk through in this tutorial:
- Gather your student data
- Prepare (clean, transform and split) your data
- Train a decision tree classifier
- Generate personalised learning experiences for students
Step 1: Collecting student data
To create personalised learning paths, you first need to gather relevant information about your students. This data will serve as the foundation for training your AI model.
Develop surveys and assessments
- Create a learning style survey using the VARK (Visual, Auditory, Reading/Writing, Kinesthetic) model to identify each student's preferred learning style. You can use a tool like Google Forms or SurveyMonkey to create and distribute the survey. The survey should ask students to answer questions that help determine their preferred learning style.
- Design a multiple-choice assessment to evaluate students' knowledge and skills in a specific subject area (e.g., mathematics). You can create this assessment using a tool like Google Forms or a built-in assessment feature in your LMS. Make sure to include questions that cover the key topics and skills you want to assess.
Implement learning analytics
- Sign up for a Google Analytics account at analytics.google.com if you don't already have one.
- Follow the instructions provided by Google Analytics to set up tracking for your LMS. This typically involves adding a tracking code to your LMS's pages.
- Configure Google Analytics to track relevant student engagement and performance metrics, such as time spent on tasks, completion rates, and quiz scores.
Organise and store data
- Export the data from your learning style survey, assessment, and Google Analytics into separate CSV files. A CSV (Comma-Separated Values) file is a plain text file that stores data in a table format, with each column separated by a comma.
- Create a new CSV file that combines the data from the separate files. Use a spreadsheet tool like Google Sheets to create a table with columns for student ID, learning style, assessment scores, engagement metrics, and performance metrics.
- Save the combined data as a new CSV file (e.g., "student_data.csv").
.webp)
Step 2: Preprocessing data
Before training your AI model, you need to clean and prepare the collected student data to ensure optimal performance.
Clean the data
- In your "student_data.csv" spreadsheet, remove any rows that have missing values or incomplete data. This ensures that your dataset is consistent and complete.
- Save the cleaned data as a new CSV file (e.g., "cleaned_student_data.csv").
.webp)
Transform the data
- In your "cleaned_student_data.csv" file - for the learning style column, create four new columns: Visual, Auditory, Reading/Writing, and Kinesthetic. Fill these columns with binary values (1 or 0) based on the student's learning style. For example, if a student's learning style is Visual, put a 1 in the Visual column and 0s in the other three columns. This process is called one-hot encoding and helps the AI model understand categorical data.
- For the assessment scores and engagement metrics columns, normalise the values to a scale of 0 to 1. To do this, find the maximum value in each column, then divide each value in the column by the maximum. This step ensures that all features have a similar scale, which improves the AI model's performance.
- Save the transformed data as a new CSV file (e.g., "transformed_student_data.csv").
.webp)
Split the data
- The next steps involve using Python and scikit-learn library. If you don't have Python installed, download and install it from python.org. Then, install the scikit-learn library by opening a command prompt or terminal and running the command: pip install scikit-learn.
- Open a new Python file in a text editor or an integrated development environment (IDE) like PyCharm or Visual Studio Code.
- First, import the necessary libraries:
Load the "transformed_student_data.csv" file into a pandas DataFrame:
Separate the features (learning style, assessment scores, and engagement metrics) and the target variable (performance metrics):
Use the train_test_split function to split the data into training and testing sets:
This code splits the data into training and testing sets, with 80% of the data used for training and 20% for testing. The random_state parameter ensures that the split is reproducible.
Step 3: Training the AI model
With the preprocessed data ready, you can now train a decision tree classifier to identify patterns and insights in student learning.
Import necessary libraries
In the same Python file, import the DecisionTreeClassifier:
Train the model
Create an instance of the DecisionTreeClassifier with a max_depth of 5:
Setting max_depth to 5 helps prevent overfitting by limiting the depth of the decision tree.
Fit the classifier to the training data:
This step trains the decision tree classifier using the training features and target variable.
Evaluate the model
Use the trained classifier to predict the performance metrics for the testing set:
Calculate the accuracy score:
This code calculates the accuracy score by comparing the predicted performance metrics with the actual values from the testing set. The accuracy score represents the proportion of correct predictions made by the model.
Step 4: Generating personalised learning paths
With the trained decision tree classifier, you can now generate personalised learning paths for each student.
Define learning path templates
Create a dictionary of learning path templates for each combination of learning style and performance level. For example:
Customise the learning path templates based on your subject area and the types of content, activities, and assessments that align with each learning style and performance level.
Generate recommendations
Use the trained classifier to predict the performance level for each student in the testing set:
Create a function to retrieve the corresponding learning path template based on a student's learning style and predicted performance level:
Present learning paths
Generate personalised learning path reports for each student in the testing set:
This code iterates through each student in the testing set, identifies their dominant learning style and predicted performance level, retrieves the corresponding learning path template, and prints a personalised report.
You can modify this code to display the reports on a web page or export them as PDF files, depending on your preferred method of sharing the results with students.
Step 5: Implementing and monitoring
After generating the personalised learning paths, it's crucial to implement them effectively and monitor student progress.
- Integrate with LMS: Manually assign the recommended content, activities, and assessments to each student within your LMS based on their personalised learning path report. This process will vary depending on the specific LMS you are using.
- Monitor student progress: Use Google Analytics to continuously track student engagement and performance as they follow their personalised learning paths. Regularly review the data to identify trends and areas for improvement.
- Gather feedback: Create a feedback survey using Google Forms or a similar tool to collect input from students and teachers on the effectiveness and usability of the personalised learning paths. Include questions that assess the relevance of the recommended content, activities, and assessments, as well as the overall impact on learning outcomes and engagement.
- Iterate and improve: Annually update the decision tree classifier with new student data and feedback. Repeat the steps in this tutorial to preprocess the updated data, retrain the model, and generate revised personalised learning paths. Continuously refine the learning path templates based on student performance and feedback. Adjust the recommended content types, activities, and assessments to ensure they remain effective and relevant.
By following these detailed steps and explanations, you should be able to create personalised learning paths using AI, even as a beginner. Remember to customise the specific tools, templates, and recommendations based on your subject area and teaching context. With time and practice, you'll become more comfortable with the process and can explore more advanced techniques to further enhance the personalised learning experiences for your students.