Posts

Showing posts from June, 2025

MLP Support Teacher for Grading

  # Step 1: Import libraries import pandas as pd from sklearn . feature_extraction . text import TfidfVectorizer from sklearn . tree import DecisionTreeClassifier from sklearn . model_selection import train_test_split from sklearn import tree import matplotlib . pyplot as plt # Step 2: Create a simple dataset (Question + Subject + Difficulty) data = { 'question' : [ "Explain photosynthesis" , "Define gravity" , "What is chemical bonding" , "Describe kinetic energy" , "Explain mitosis" , "What is quantum mechanics" , "Describe water cycle" , "Explain Ohm's Law" , "What are atoms made of" , "Explain the nervous system" ], 'subject' : [ "Biology" , "Physics" , "Chemistry" , "Physics" , "Biology...

MLP Personalize Training

  # Step 1: Import Required Libraries import pandas as pd import numpy as np from sklearn . cluster import KMeans from sklearn . neighbors import KNeighborsClassifier from sklearn . preprocessing import StandardScaler import matplotlib . pyplot as plt import seaborn as sns # Step 2: Create Sample Data # Each student: video_time, story_time, exercise_time (in minutes) data = { 'video_time' : [ 30 , 5 , 10 , 50 , 40 , 15 , 5 , 45 , 8 , 60 ], 'story_time' : [ 5 , 30 , 25 , 5 , 10 , 35 , 45 , 10 , 40 , 5 ], 'exercise_time' : [ 10 , 15 , 40 , 5 , 10 , 20 , 30 , 5 , 30 , 10 ], 'preferred_material' : [ 'Video' , 'Story' , 'Exercise' , 'Video' , 'Video' , 'Story' , 'Story' , 'Video' , 'Story' , 'Video' ] } df = pd . DataFrame ( data ) # Step 3: Preprocess Data features = [ 'video_time' ,...

MLP AI for Special Education

  # Step 1: Import necessary libraries import pandas as pd import numpy as np from sklearn . model_selection import train_test_split from sklearn . preprocessing import LabelEncoder , StandardScaler from sklearn . svm import SVC from sklearn . tree import DecisionTreeClassifier , plot_tree from sklearn . metrics import classification_report , confusion_matrix import matplotlib . pyplot as plt import seaborn as sns # Step 2: Create a sample dataset # Features: Attention Span, Response Time, Interaction Level, Comprehension Score data = { 'attention_span' : [ 20 , 50 , 15 , 45 , 10 , 55 , 12 , 48 , 25 , 60 ], # in minutes 'response_time' : [ 5 , 3 , 8 , 2 , 10 , 2 , 9 , 3 , 6 , 2 ], # in seconds 'interaction_level' : [ 1 , 3 , 1 , 4 , 1 , 4 , 2 , 5 , 2 , 5 ], # scale of 1-5 'comprehension_score' : [ 60 , 85 , 55 , 90 , 50 , 88 , 58 , 92 , 65 , 95 ], # out of 100 ...