InĀ [35]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from io import StringIO
csv_text = """Sl. No.,Name,Attendance,Topic,Exploration,Communication,Creativity,Any Additional Comment
1,Ashish Wakley,TRUE,Climate Change,Good,Good,Very Good,very confident but need to explore more.
2,Dorji Tshewang,TRUE,Climate Change,Good,Good,Good,"Limited only to textbook, need to be confident and explore more"
3,Jigme Namgyel,TRUE,Climate Change,Need improvement,Need improvement,Need improvement,"Oral presentation, Most of the time he is silence and hardly speak "
4,Kelden Drukda,TRUE,Climate Change,Need improvement,Need improvement,Very Good,"Didnot see effort on exploration, poor in communication"
5,Kinga Tobgay,TRUE,Climate Change,Good,Good,Need improvement,Well prepared but need to explore more on the given topic.
6,Kinley Dendup,TRUE,Climate Change,Good,Good,Need improvement,Well prepared but need to explore more on the given topic.
7,Kinley Tshering,TRUE,Climate Change,Good,Need improvement,Need improvement,Poor communication skills.
8,Lekden Thujee Drakpa,TRUE,Climate Change,Need improvement,Need improvement,Need improvement,Did not explore for information.Got few points from the sister.Very poor communication.(noding and in words only)
9,Pema Namgay,TRUE,Climate Change,Very Good,Very Good,Very Good,Exploration done well and mentioned the sources . Language very fluent and confident
10,Rinzin Dorji,TRUE,Climate Change,Good,Need improvement,Need improvement,oral presentation/ responding in Dzongkha and lack of fluency.
11,Samten Nima,TRUE,Climate Change,Good,Need improvement,Need improvement,Need to improve communication skills.
12,Sherub Phuntsho,TRUE,Climate Change,Good,Good,Need improvement,"Didnot gather informationwell (fragmented source), Cannot speak fluently"
13,Sherub Wangchuk,TRUE,Climate Change,Good,Good,Need improvement,Need to explore more and improve communication
14,Sonam Rabten,TRUE,Climate Change,Good,Good,Need improvement,Lack of confidence and need to explore more on the given topic.
15,Sonam Tobden,TRUE,Climate Change,Good,Very Good,Need improvement,very confident and fluent
16,Tashi Yoezer,TRUE,Climate Change,Good,Good,Good,confident and fluent while speaking but need to explore moreC
17,Thukten Rigtsel Dorji,TRUE,Climate Change,Good,Very Good,Good,Conident and fluent while speaking but need to explore more on the given topic.
18,Yonten Yoezer,TRUE,Climate Change,Good,Need improvement,Need improvement,Need to be more confident while communicating. He hasn't explored it but discussed it with his friend.
19,Dechen Pem,TRUE,Climate Change,Good,Very Good,Need improvement,Topic Air pollution/very well prepared.fluent with presentation. answered the questions well.
20,Dechen Zangmo,TRUE,Climate Change,Good,Need improvement,Good,"Reading from the text, not confident and need to explore more."
21,Dorji Choden,TRUE,Climate Change,Very Good,Very Good,Good,fluent and well prepared.
22,Jigme Metho,TRUE,Climate Change,Need improvement,Need improvement,Good,"not able anwer based on her presentation, lack of fluency"
23,Kamala Sunar,TRUE,Climate Change,Need improvement,Need improvement,Need improvement,"Not confident at all, lacks basic information on the topic- not explored"
24,Kinzang Lhazin,TRUE,Climate Change,Need improvement,Good,Good,"no internet facilities and phone, prepared the presentation with help of friends."
25,Namgay Choden,TRUE,Climate Change,Good,Very Good,Need improvement,confident while speaking in dzongkha but lacking fluency in English.
26,Pema Dema,TRUE,Climate Change,Good,Need improvement,Need improvement,"reading, lack of fluency need to improve on pronuncation"
27,Pema Wangmo,TRUE,Climate Change,Good,Good,Need improvement,"Not confident at all (reading from the text), numerous grammatical errors "
28,Pema Yangchen,TRUE,Climate Change,Good,Good,Need improvement,need to be more confident and improve communication
29,Sangay Choden,TRUE,Climate Change,Good,Good,Need improvement,Confident and fluent in speaking but need to explore more.
30,Sonam Choki,TRUE,Climate Change,Good,,Good,Presented with the help of chart paper. Poor communication and lack of confidence.
31,Tenzin Chokey,TRUE,Climate Change,Good,Need improvement,Good,lack of fluency
32,Thukten Ngawang Choden,TRUE,Climate Change,Very Good,Very Good,Very Good,"confident,well prepared,"
33,Tshering Choden S,TRUE,Climate Change,Good,Good,Good,Need to explore more and improve communication
34,Tshering Choden Z,TRUE,Climate Change,Good,Good,Good,"Reading done well, Fluency lacks while responding"
35,Tshering Yangzom,TRUE,Climate Change,Good,Good,Good,"presentation is channeled only to Bhutan so need to explore more, improve communication "
36,Ugyen Dema,TRUE,Climate Change,Good,Good,Good,Presented with the help of chart paper. responded in Dzongkha.
37,Ugyen lhaden,TRUE,Climate Change,Good,Need improvement,Need improvement,"lack of confidence, hardly speak and need to explore more."
38,Ugyen Yangzom,TRUE,Climate Change,Good,Very Good,Good,"Oral presentation-confident, need to explore more on the given topic"
39,Yeshi lham,TRUE,Climate Change,Need improvement,Need improvement,Need improvement,"Cannot read from the written text, need exploration, build confidence"
"""
df = pd.read_csv(StringIO(csv_text))
print("CSV loaded successfully!")
display(df.head())
rating_map = {
"Very Good": 3,
"Good": 2,
"Need improvement": 1
}
for col in ["Exploration", "Communication", "Creativity"]:
df[col + "_score"] = df[col].map(rating_map)
print("Converted qualitative ratings into numeric scores:")
display(df.head())
x = np.linspace(-3, 3, 100)
plt.plot(x, 1/(1+np.exp(-x)), label='sigmoid')
plt.plot(x, np.tanh(x), label='tanh')
plt.plot(x, np.where(x < 0, 0, x), label='ReLU')
plt.plot(x, np.where(x < 0, 0.1*x, x), '--', label='leaky ReLU')
plt.legend()
plt.show()
CSV loaded successfully!
| Sl. No. | Name | Attendance | Topic | Exploration | Communication | Creativity | Any Additional Comment | |
|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Ashish Wakley | True | Climate Change | Good | Good | Very Good | very confident but need to explore more. |
| 1 | 2 | Dorji Tshewang | True | Climate Change | Good | Good | Good | Limited only to textbook, need to be confident... |
| 2 | 3 | Jigme Namgyel | True | Climate Change | Need improvement | Need improvement | Need improvement | Oral presentation, Most of the time he is sile... |
| 3 | 4 | Kelden Drukda | True | Climate Change | Need improvement | Need improvement | Very Good | Didnot see effort on exploration, poor in comm... |
| 4 | 5 | Kinga Tobgay | True | Climate Change | Good | Good | Need improvement | Well prepared but need to explore more on the ... |
Converted qualitative ratings into numeric scores:
| Sl. No. | Name | Attendance | Topic | Exploration | Communication | Creativity | Any Additional Comment | Exploration_score | Communication_score | Creativity_score | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1 | Ashish Wakley | True | Climate Change | Good | Good | Very Good | very confident but need to explore more. | 2 | 2.0 | 3 |
| 1 | 2 | Dorji Tshewang | True | Climate Change | Good | Good | Good | Limited only to textbook, need to be confident... | 2 | 2.0 | 2 |
| 2 | 3 | Jigme Namgyel | True | Climate Change | Need improvement | Need improvement | Need improvement | Oral presentation, Most of the time he is sile... | 1 | 1.0 | 1 |
| 3 | 4 | Kelden Drukda | True | Climate Change | Need improvement | Need improvement | Very Good | Didnot see effort on exploration, poor in comm... | 1 | 1.0 | 3 |
| 4 | 5 | Kinga Tobgay | True | Climate Change | Good | Good | Need improvement | Well prepared but need to explore more on the ... | 2 | 2.0 | 1 |
InĀ [36]:
import pandas as pd
df = pd.read_csv("Baselinedata_Grade VIII E..csv", header=1)
df = df.dropna(how='all')
df.columns = [col.strip() for col in df.columns]
print(df.head())
print(df.columns)
Sl. No. Name Attendance Topic Exploration \
1 1.0 Ashish Wakley True Climate Change Good
2 2.0 Dorji Tshewang True Climate Change Good
3 3.0 Jigme Namgyel True Climate Change Need improvement
4 4.0 Kelden Drukda True Climate Change Need improvement
5 5.0 Kinga Tobgay True Climate Change Good
Communication Creativity \
1 Good Very Good
2 Good Good
3 Need improvement Need improvement
4 Need improvement Very Good
5 Good Need improvement
Any Additional Comment
1 very confident but need to explore more.
2 Limited only to textbook, need to be confident...
3 Oral presentation, Most of the time he is sile...
4 Didnot see effort on exploration, poor in comm...
5 Well prepared but need to explore more on the ...
Index(['Sl. No.', 'Name', 'Attendance', 'Topic', 'Exploration',
'Communication', 'Creativity', 'Any Additional Comment'],
dtype='object')
InĀ [37]:
import pandas as pd
import numpy as np
from sklearn.neural_network import MLPClassifier
from sklearn.preprocessing import StandardScaler
df = pd.read_csv("Baselinedata_Grade VIII E..csv", header=1)
df = df.dropna(how='all')
df.columns = [col.strip() for col in df.columns]
rating_map = {
"Very Good": 3,
"Good": 2,
"Need improvement": 1
}
for col in ["Exploration", "Communication", "Creativity"]:
df[col + "_score"] = df[col].map(rating_map)
df = df.dropna(subset=["Exploration_score", "Communication_score", "Creativity_score"])
X = df[["Exploration_score", "Communication_score"]].values
y = df["Creativity_score"].values
scaler = StandardScaler()
X_scaled = scaler.fit_transform(X)
classifier = MLPClassifier(
solver='lbfgs',
hidden_layer_sizes=(4,),
activation='tanh',
random_state=1,
max_iter=1000
)
classifier.fit(X_scaled, y)
print(f"Model accuracy on training data: {classifier.score(X_scaled, y):.2f}\n")
predictions = np.c_[df[["Exploration", "Communication"]].values, df["Creativity"].values, classifier.predict(X_scaled)]
print("Exploration | Communication | Actual Creativity | Predicted Creativity")
for row in predictions:
print(row)
Model accuracy on training data: 0.63 Exploration | Communication | Actual Creativity | Predicted Creativity ['Good' 'Good' 'Very Good' 1] ['Good' 'Good' 'Good' 1] ['Need improvement' 'Need improvement' 'Need improvement' 1] ['Need improvement' 'Need improvement' 'Very Good' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Need improvement' 'Need improvement' 1] ['Need improvement' 'Need improvement' 'Need improvement' 1] ['Very Good' 'Very Good' 'Very Good' 3] ['Good' 'Need improvement' 'Need improvement' 1] ['Good' 'Need improvement' 'Need improvement' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Very Good' 'Need improvement' 1] ['Good' 'Good' 'Good' 1] ['Good' 'Very Good' 'Good' 1] ['Good' 'Need improvement' 'Need improvement' 1] ['Good' 'Very Good' 'Need improvement' 1] ['Good' 'Need improvement' 'Good' 1] ['Very Good' 'Very Good' 'Good' 3] ['Need improvement' 'Need improvement' 'Good' 1] ['Need improvement' 'Need improvement' 'Need improvement' 1] ['Need improvement' 'Good' 'Good' 2] ['Good' 'Very Good' 'Need improvement' 1] ['Good' 'Need improvement' 'Need improvement' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Good' 'Need improvement' 1] ['Good' 'Need improvement' 'Good' 1] ['Very Good' 'Very Good' 'Very Good' 3] ['Good' 'Good' 'Good' 1] ['Good' 'Good' 'Good' 1] ['Good' 'Good' 'Good' 1] ['Good' 'Good' 'Good' 1] ['Good' 'Need improvement' 'Need improvement' 1] ['Good' 'Very Good' 'Good' 1] ['Need improvement' 'Need improvement' 'Need improvement' 1]
InĀ [Ā ]:
InĀ [38]:
import jax
import jax.numpy as jnp
from jax import random, grad, jit
import pandas as pd
df = pd.read_csv("Baselinedata_Grade VIII E..csv", header=1)
df = df.dropna(how='all')
df.columns = [col.strip() for col in df.columns]
rating_map = {"Very Good": 3, "Good": 2, "Need improvement": 1}
for col in ["Exploration", "Communication", "Creativity"]:
df[col + "_score"] = df[col].map(rating_map)
df = df.dropna(subset=["Exploration_score", "Communication_score", "Creativity_score"])
X = jnp.array(df[["Exploration_score","Communication_score"]].values, dtype=jnp.float32)
y = jnp.array(df["Creativity_score"].values, dtype=jnp.float32).reshape(-1,1)
y_scaled = y / 3.0
@jit
def forward(params, layer_0):
Weight1, bias1, Weight2, bias2 = params
layer_1 = jnp.tanh(layer_0 @ Weight1 + bias1)
layer_2 = jax.nn.sigmoid(layer_1 @ Weight2 + bias2)
return layer_2
@jit
def loss(params):
ypred = forward(params, X)
return jnp.mean((ypred - y_scaled)**2)
@jit
def update(params, rate=0.1):
gradient = grad(loss)(params)
return jax.tree.map(lambda p, g: p - rate * g, params, gradient)
def init_params(key, input_size=2, hidden_size=4, output_size=1):
key1, key2 = random.split(key)
Weight1 = 0.5 * random.normal(key1, (input_size, hidden_size))
bias1 = jnp.zeros(hidden_size)
Weight2 = 0.5 * random.normal(key2, (hidden_size, output_size))
bias2 = jnp.zeros(output_size)
return (Weight1, bias1, Weight2, bias2)
key = random.PRNGKey(0)
params = init_params(key)
for step in range(1001):
params = update(params, rate=1.0)
if step % 200 == 0:
print(f"step {step:4d} loss={loss(params):.6f}")
pred = forward(params, X) * 3 # scale back to original 1-3 range
jnp.set_printoptions(precision=2)
print("\nPredictions (Exploration | Communication | Actual | Predicted):")
print(jnp.c_[X, y, pred])
step 0 loss=0.053544 step 200 loss=0.044574 step 400 loss=0.043721 step 600 loss=0.043691 step 800 loss=0.043481 step 1000 loss=0.042715 Predictions (Exploration | Communication | Actual | Predicted): [[2. 2. 3. 1.8 ] [2. 2. 2. 1.8 ] [1. 1. 1. 1.48] [1. 1. 3. 1.48] [2. 2. 1. 1.8 ] [2. 2. 1. 1.8 ] [2. 1. 1. 1.32] [1. 1. 1. 1.48] [3. 3. 3. 2.2 ] [2. 1. 1. 1.32] [2. 1. 1. 1.32] [2. 2. 1. 1.8 ] [2. 2. 1. 1.8 ] [2. 2. 1. 1.8 ] [2. 3. 1. 1.56] [2. 2. 2. 1.8 ] [2. 3. 2. 1.56] [2. 1. 1. 1.32] [2. 3. 1. 1.56] [2. 1. 2. 1.32] [3. 3. 2. 2.2 ] [1. 1. 2. 1.48] [1. 1. 1. 1.48] [1. 2. 2. 1.58] [2. 3. 1. 1.56] [2. 1. 1. 1.32] [2. 2. 1. 1.8 ] [2. 2. 1. 1.8 ] [2. 2. 1. 1.8 ] [2. 1. 2. 1.32] [3. 3. 3. 2.2 ] [2. 2. 2. 1.8 ] [2. 2. 2. 1.8 ] [2. 2. 2. 1.8 ] [2. 2. 2. 1.8 ] [2. 1. 1. 1.32] [2. 3. 2. 1.56] [1. 1. 1. 1.48]]
InĀ [39]:
!pip install tensorflow
/opt/conda/lib/python3.13/pty.py:95: RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock. pid, fd = os.forkpty()
Requirement already satisfied: tensorflow in /opt/conda/lib/python3.13/site-packages (2.20.0) Requirement already satisfied: absl-py>=1.0.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (2.3.1) Requirement already satisfied: astunparse>=1.6.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (1.6.3) Requirement already satisfied: flatbuffers>=24.3.25 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (25.9.23) Requirement already satisfied: gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (0.7.0) Requirement already satisfied: google_pasta>=0.1.1 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (0.2.0) Requirement already satisfied: libclang>=13.0.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (18.1.1) Requirement already satisfied: opt_einsum>=2.3.2 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (3.4.0) Requirement already satisfied: packaging in /opt/conda/lib/python3.13/site-packages (from tensorflow) (25.0) Requirement already satisfied: protobuf>=5.28.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (6.31.1) Requirement already satisfied: requests<3,>=2.21.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (2.32.5) Requirement already satisfied: setuptools in /opt/conda/lib/python3.13/site-packages (from tensorflow) (80.9.0) Requirement already satisfied: six>=1.12.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (1.17.0) Requirement already satisfied: termcolor>=1.1.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (3.2.0) Requirement already satisfied: typing_extensions>=3.6.6 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (4.15.0) Requirement already satisfied: wrapt>=1.11.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (2.0.1) Requirement already satisfied: grpcio<2.0,>=1.24.3 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (1.76.0) Requirement already satisfied: tensorboard~=2.20.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (2.20.0) Requirement already satisfied: keras>=3.10.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (3.12.0) Requirement already satisfied: numpy>=1.26.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (2.3.3) Requirement already satisfied: h5py>=3.11.0 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (3.15.1) Requirement already satisfied: ml_dtypes<1.0.0,>=0.5.1 in /opt/conda/lib/python3.13/site-packages (from tensorflow) (0.5.4) Requirement already satisfied: charset_normalizer<4,>=2 in /opt/conda/lib/python3.13/site-packages (from requests<3,>=2.21.0->tensorflow) (3.4.4) Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.13/site-packages (from requests<3,>=2.21.0->tensorflow) (3.11) Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.13/site-packages (from requests<3,>=2.21.0->tensorflow) (2.5.0) Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.13/site-packages (from requests<3,>=2.21.0->tensorflow) (2025.10.5) Requirement already satisfied: markdown>=2.6.8 in /opt/conda/lib/python3.13/site-packages (from tensorboard~=2.20.0->tensorflow) (3.10) Requirement already satisfied: pillow in /opt/conda/lib/python3.13/site-packages (from tensorboard~=2.20.0->tensorflow) (11.3.0) Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in /opt/conda/lib/python3.13/site-packages (from tensorboard~=2.20.0->tensorflow) (0.7.2) Requirement already satisfied: werkzeug>=1.0.1 in /opt/conda/lib/python3.13/site-packages (from tensorboard~=2.20.0->tensorflow) (3.1.4) Requirement already satisfied: wheel<1.0,>=0.23.0 in /opt/conda/lib/python3.13/site-packages (from astunparse>=1.6.0->tensorflow) (0.45.1) Requirement already satisfied: rich in /opt/conda/lib/python3.13/site-packages (from keras>=3.10.0->tensorflow) (14.2.0) Requirement already satisfied: namex in /opt/conda/lib/python3.13/site-packages (from keras>=3.10.0->tensorflow) (0.1.0) Requirement already satisfied: optree in /opt/conda/lib/python3.13/site-packages (from keras>=3.10.0->tensorflow) (0.18.0) Requirement already satisfied: markupsafe>=2.1.1 in /opt/conda/lib/python3.13/site-packages (from werkzeug>=1.0.1->tensorboard~=2.20.0->tensorflow) (3.0.3) Requirement already satisfied: markdown-it-py>=2.2.0 in /opt/conda/lib/python3.13/site-packages (from rich->keras>=3.10.0->tensorflow) (4.0.0) Requirement already satisfied: pygments<3.0.0,>=2.13.0 in /opt/conda/lib/python3.13/site-packages (from rich->keras>=3.10.0->tensorflow) (2.19.2) Requirement already satisfied: mdurl~=0.1 in /opt/conda/lib/python3.13/site-packages (from markdown-it-py>=2.2.0->rich->keras>=3.10.0->tensorflow) (0.1.2)
InĀ [40]:
import pandas as pd
import numpy as np
from sklearn.neural_network import MLPRegressor # regression since scores are numeric
from sklearn.preprocessing import StandardScaler
# ------------------------------
# 1. LOAD CSV
# ------------------------------
csv_text = """Sl. No.,Name,Attendance,Topic,Exploration,Communication,Creativity,Any Additional Comment
1,Ashish Wakley,TRUE,Climate Change,Good,Good,Very Good,very confident but need to explore more.
2,Dorji Tshewang,TRUE,Climate Change,Good,Good,Good,"Limited only to textbook, need to be confident and explore more"
3,Jigme Namgyel,TRUE,Climate Change,Need improvement,Need improvement,Need improvement,"Oral presentation, Most of the time he is silence and hardly speak "
4,Kelden Drukda,TRUE,Climate Change,Need improvement,Need improvement,Very Good,"Didnot see effort on exploration, poor in communication"
5,Kinga Tobgay,TRUE,Climate Change,Good,Good,Need improvement,Well prepared but need to explore more on the given topic.
6,Kinley Dendup,TRUE,Climate Change,Good,Good,Need improvement,Well prepared but need to explore more on the given topic.
7,Kinley Tshering,TRUE,Climate Change,Good,Need improvement,Need improvement,Poor communication skills.
8,Lekden Thujee Drakpa,TRUE,Climate Change,Need improvement,Need improvement,Need improvement,Did not explore for information.Got few points from the sister.Very poor communication.(noding and in words only)
9,Pema Namgay,TRUE,Climate Change,Very Good,Very Good,Very Good,Exploration done well and mentioned the sources . Language very fluent and confident
10,Rinzin Dorji,TRUE,Climate Change,Good,Need improvement,Need improvement,oral presentation/ responding in Dzongkha and lack of fluency.
""" # truncated for brevity; you can replace with full CSV
from io import StringIO
df = pd.read_csv(StringIO(csv_text))
# ------------------------------
# 2. MAP RATINGS TO NUMERIC
# ------------------------------
rating_map = {"Very Good": 3, "Good": 2, "Need improvement": 1}
for col in ["Exploration", "Communication", "Creativity"]:
df[col + "_score"] = df[col].map(rating_map)
# Drop rows with missing scores (if any)
df = df.dropna(subset=["Exploration_score", "Communication_score", "Creativity_score"])
# ------------------------------
# 3. FEATURES AND TARGET
# ------------------------------
X = df[["Exploration_score", "Communication_score"]].values
y = df["Creativity_score"].values
# Scale features for MLP
scaler = StandardScaler()
X_scaled = scaler.fit_transform(X)
# ------------------------------
# 4. TRAIN MLP REGRESSOR
# ------------------------------
mlp = MLPRegressor(hidden_layer_sizes=(4,), activation='tanh', solver='lbfgs', max_iter=500, random_state=1)
mlp.fit(X_scaled, y)
# ------------------------------
# 5. PREDICTIONS
# ------------------------------
pred = mlp.predict(X_scaled)
print("Actual | Predicted")
for a, p in zip(y, pred):
print(f"{a} | {p:.2f}")
Actual | Predicted 3 | 1.75 2 | 1.75 1 | 1.67 3 | 1.67 1 | 1.75 1 | 1.75 1 | 1.00 1 | 1.67 3 | 3.00 1 | 1.00
InĀ [Ā ]:
InĀ [Ā ]: