top of page
Writer's pictureMichelle Ruas

Personalised Education with Machine Learning Project

In developing countries, where educational resources are often limited, personalised learning has the potential to be a huge game-changer. Traditional, one-size-fits-all approaches often leave many students behind, particularly those struggling with specific concepts or lacking access to materials in their native language, particularly in Guinea-Bissau. Here's how machine learning can revolutionise education in these contexts:


  • Language Barriers Eliminated: My proof of concept is a geography quiz (can be applied to any subject field) that adapts to a student's native language, dynamically translating questions and providing feedback. Machine learning algorithms can analyse existing translated materials and student interactions, continuously improving their ability to deliver content in the local tongue. This removes language as a barrier, allowing students to grasp concepts without the struggle of deciphering a foreign language.


  • Targeted Support: Traditional methods often rely on generic assessments that miss individual learning needs. Machine learning, however, can analyse a student's performance data (including correct and incorrect answers, time spent on questions, etc.) to identify areas of weakness. With this information, the program can offer targeted support. For example, if a student consistently struggles with recognising African countries on a map, the machine learning program can adjust the difficulty of subsequent map questions and provide additional visual aids or interactive exercises focused on African geography.


  • Individualised Learning Styles:  Machine learning can go beyond basic knowledge gaps and cater to different learning styles. By observing how a student interacts with the program (text-based explanations, interactive elements, audio recordings), the program can identify if they're a visual, auditory, or kinaesthetic learner. Based on this, it can personalise the learning experience, presenting information in the format that resonates best with the student.



The combination of native language support, targeted assistance, and individualisation based on learning styles has the potential to unlock a new level of educational equity in developing countries. Machine learning can empower students to learn at their own pace, understand concepts more effectively, and ultimately achieve their full potential.



Proof of Concept: Machine Learning Assistance with Python


After visiting Guinea-Bissau and touring many of the schools, a huge barrier is the lack of physical technology access as well as cost to access internet. However, access to smart phones is increasing which opens up many opportunities for Action Guinea Bissau to fund projects for students to access the internet. This makes it essential that their internet time is used as efficiently as possible.


Creating engaging quizzes can be a fun and educational challenge. But how do you ensure the difficulty is just right, keeping learners challenged without getting discouraged? This project explores two approaches to building a dynamic school curriculum based quiz in Python, starting with a basic method and then incorporating machine learning for a more personalised experience.


For example in this proof of concept, I have used questions about world geography in Guinean Creole but could be extended easily to all subjects:

guinea_bissau_facts = {
    "Sin city capital di Frantsa?": "Paris", 
    "Sin grandu riu na mundo?": "Rio Nile", 
    "Sin pais ki ta na continente Americano di Sul?": "Brasil",
    "Sin montanha mas altu na mundo?": "Monte Everest", 
    "Sin pais ki ta na continente Africano?": "Guiné-Bissau",
    "Sin oceanu ki ta bai na costa leste di USA?": "Oceano Atlantico", 
}

question_difficulty = {
    "Sin city capital di Frantsa?": "Easy",
    "Sin grandu riu na mundo?": "Medium",
    "Sin pais ki ta na continente Americano di Sul?": "Medium",
    "Sin montanha mas altu na mundo?": "Hard",
    "Sin pais ki ta na continente Africano?": "Easy",
    "Sin oceanu ki ta bai na costa leste di USA?": "Medium",
}

The Fixed Difficulty Approach (v1):


The first version utilises a straightforward approach to adjust quiz difficulty based on the user's performance. The program maintains two variables: correct_count and incorrect_count. After each question, the user's answer is checked:


  • Correct answer: Increment correct_count. If correct_count reaches a specific threshold (e.g., 3 correct answers in a row), the difficulty level is increased (from "Easy" to "Medium").

  • Incorrect answer: Increment incorrect_count. If incorrect_count reaches another threshold (e.g., 2 incorrect answers in a row), the difficulty is lowered (from "Medium" to "Easy").



Code Snippet (v1):

def track_answers(is_correct):
  global correct_count, incorrect_count
  if is_correct:
    correct_count += 1
  else:
    incorrect_count += 1
  if correct_count >= 3 and current_difficulty != "Hard":
    current_difficulty = "Medium"
  elif incorrect_count >= 2 and current_difficulty != "Easy":
    current_difficulty = "Easy"

This method is easy to implement and provides a basic level of dynamic difficulty adjustment. However, it has limitations:

  • Fixed thresholds: The difficulty adjustments rely on fixed thresholds, which may not be ideal for all learners.

  • Limited adaptability: The system doesn't consider the overall performance history or the specific question difficulty levels. It simply reacts to recent results.




Introducing Machine Learning (v2):

Version 2 leverages the power of machine learning to create a more sophisticated quiz experience. In the scikit-learn library, a machine learning algorithm called Logistic Regression is used. 

  1. Data Collection: Data is collected on the user's performance, including correct_count and incorrect_count after each question. This data serves as the training material for the machine learning model.

  2. Logistic Regression: This algorithm analyses the collected data (features like correct and incorrect counts) and learns the relationship between these features and the desired outcome (difficulty level).

  3. Prediction: After each answer, the model takes the current correct_count and incorrect_count as input and predicts the most suitable difficulty level ("Easy," "Medium," or "Hard") based on the learned patterns.


This approach offers several advantages:

  • Personalised learning: The model considers the user's overall performance history, not just recent results. This leads to a more personalised learning experience that adapts to individual strengths and weaknesses.

  • Continuous improvement: As the user progresses through the quiz, the model gathers more data and continuously refines its predictions, making the difficulty adjustments more accurate.


The Algorithm Behind It:

Logistic Regression is a probabilistic classification algorithm. It analyses the input data (correct and incorrect counts) and calculates the probability of belonging to a specific difficulty class ("Easy," "Medium," or "Hard"). Based on this probability, it predicts the most likely difficulty level for the next question.


Code Snippet (v2):

from sklearn.linear_model import LogisticRegression

def track_answers(is_correct):
  global correct_count, incorrect_count, X_train, y_train
  if is_correct:
    correct_count += 1
    X_train.append([correct_count, incorrect_count])  # Update training data (correct)
    y_train.append(1)  # Update label (correct)
  else:
    incorrect_count += 1
    X_train.append([correct_count, incorrect_count])  # Update training data (incorrect)
    y_train.append(0)  # Update label (incorrect)
  train_model()  # Train the model after each answer

def train_model():
  global model, X_train, y_train
  model = LogisticRegression()  # Initialise model
  model.fit(X_train, y_train)  # Train the model with features and labels

def predict_difficulty():
  global current_difficulty, model, X_train, y_train
  if len(X_train) > 0:  # Check if there's enough data for prediction
    predicted_difficulty = model.predict([[correct_count, incorrect_count]])[0]
    if predicted_difficulty > 0.5 and current_difficulty != "Hard":
      current_difficulty = "Medium"  
    elif predicted_difficulty <= 0.5 and current_difficulty != "Easy":
      current_difficulty = "Medium" 

Conclusion:

The fixed difficulty method offers a simple solution, while the machine learning approach provides a more personalized and adaptable experience. Here are the bases of research into developing education assistance algorithms that can improve the quality of education in Guinea-Bissau.

Comentários


bottom of page