🔎 Find
Search this page
Previous
Next
IN‑V‑BAT‑AI — $1/day
K‑12 Math Exam AI Tutor


Search this page
Tap then use microphone

Python Lesson 2 Collected Knowledge
by Apolinario "Sam" Ortega

Why I need to learn how to use
!pip show pandas and !pip list --verbose

You must have a Jupyter notebook installed in your laptop or desktop to follow this tutorial.

!pip show pandas runs a shell command to display pandas installation in my laptop or desktop environment.

Name: pandas
Version: 2.3.3
Summary: Powerful data structures for
data analysis, time series, and statistics Home-page: https://pandas.pydata.org Author: Author-email: The Pandas Development Team License: BSD 3-Clause License Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages Requires: numpy, python-dateutil, pytz,
tzdata Required-by: catboost, plotly-express,
seaborn, statsmodels

Why I need to learn how to use

!pip show numpy runs a shell command to display numpy installation in my laptop or desktop environment.

Name: numpy
Version: 2.2.6
Summary: Fundamental package for array
computing in Python Home-page: https://numpy.org Author: Travis E. Oliphant et al. Author-email: License: Copyright (c) 2005-2024,
NumPy Developers. Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages Requires: Required-by: catboost, contourpy, h5py, ipympl, keras, lightgbm, matplotlib,
ml_dtypes, pandas, patsy, plotly-express, scikit-learn,
scipy, seaborn, statsmodels, tensorflow, xgboost

Why I need to learn how to use

!pip show python-dateutil runs a shell command to display python-dateutil installation in my laptop or desktop environment.

Name: python-dateutil
Version: 2.9.0.post0
Summary: Extensions to the standard Python
datetime module
Home-page: https://github.com/dateutil
/dateutil
Author: Gustavo Niemeyer
Author-email: gustavo@niemeyer.net
 
Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages Requires: six Required-by: arrow, jupyter_client, matplotlib, pandas

Why I need to learn how to use

!pip show pytz runs a shell command to display pytz installation in my laptop or desktop environment.

Name: pytz
Version: 2026.2
Summary: World timezone definitions,
modern and historical
Home-page: http://pythonhosted.org/pytz
Author: Stuart Bishop
Author-email: stuart@stuartbishop.net
License: MIT 
 
Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages Requires: Required-by: pandas

Why I need to learn how to use

!pip show tzdata runs a shell command to display tzdata installation in my laptop or desktop environment.

Name: tzdata
Version: 2026.2
Summary: Provider of IANA time zone
data
Home-page: https://github.com/python
/tzdata
Author: Python Software Foundation
Author-email: datetime-sig@python.org
License: Apache-2.0 
 
Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages
Requires: Required-by: arrow, pandas

Why I need to learn how to use

!pip show catboost runs a shell command to display catboost installation in my laptop or desktop environment.

Name: catboost
Version: 1.2.10
Summary: CatBoost Python Package
Home-page: https://catboost.ai
Author: CatBoost Developers
Author-email: 
License: Apache License, Version 2.0 
 
Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages
Requires: graphviz, matplotlib, numpy, pandas, plotly, scipy, six Required-by:

Why I need to learn how to use

!pip show plotly-express runs a shell command to display plotly-express installation in my laptop or desktop environment.

Name: plotly-express
Version: 0.4.1
Summary: Plotly Express - a high level
wrapper for Plotly.py
Home-page: https://plotly.express/
Author: Nicolas Kruchten
Author-email: nicolas@plot.ly
License: MIT
Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages
Requires: numpy, pandas, patsy, plotly,
scipy, statsmodels
Required-by: 

Why I need to learn how to use

!pip show seaborn runs a shell command to display seaborn installation in my laptop or desktop environment.

Name: seaborn
Version: 0.13.2
Summary: Statistical data visualization
Home-page: 
Author: 
Author-email: Michael Waskom 
License: 
Location: c:\users\xxxxx\anaconda3\envs
\py310\lib\site-packages
Requires: matplotlib, numpy, pandas
Required-by: 

Why I need to learn how to use

!pip show statsmodels runs a shell command to display statsmodels installation in my laptop or desktop environment.

Name: statsmodels
Version: 0.14.6
Summary: Statistical computations and
models for Python
Home-page: https://www.statsmodels.org/
Author: 
Author-email: 
License: BSD License
Location: c:\users\xxxxx\anaconda3\
envs\py310\lib\site-packages
Requires: numpy, packaging, pandas,
patsy, scipy
Required-by: plotly-express 
!pip list pandas

!pip list pandas runs a shell command to display a full list of installed packages in my laptop or desktop environment.

Package                   Version
------------------------- -----------
absl-py                   2.4.0
anyio                     4.13.0
argon2-cffi               25.1.0
argon2-cffi-bindings      25.1.0
arrow                     1.4.0
asttokens                 3.0.1
astunparse                1.6.3
async-lru                 2.3.0
attrs                     26.1.0
babel                     2.18.0
beautifulsoup4            4.14.3
bleach                    6.3.0
blinker                   1.9.0
catboost                  1.2.10
certifi                   2026.4.22
cffi                      2.0.0
charset-normalizer        3.4.7
click                     8.3.3
colorama                  0.4.6
comm                      0.2.3
contourpy                 1.3.2
cycler                    0.12.1
dash                      4.1.0
debugpy                   1.8.20
decorator                 5.2.1
defusedxml                0.7.1
et_xmlfile                2.0.0
exceptiongroup            1.3.1
executing                 2.2.1
fastjsonschema            2.21.2
Flask                     3.1.3
flatbuffers               25.12.19
fonttools                 4.63.0
fqdn                      1.5.1
gast                      0.7.0
google-pasta              0.2.0
graphviz                  0.21
greenlet                  3.5.0
grpcio                    1.80.0
h11                       0.16.0
h5py                      3.14.0
httpcore                  1.0.9
httpx                     0.28.1
idna                      3.15
importlib_metadata        9.0.0
ipykernel                 7.2.0
ipympl                    0.10.0
ipython                   8.39.0
ipywidgets                8.1.8
isoduration               20.11.0
itsdangerous              2.2.0
jedi                      0.20.0
Jinja2                    3.1.6
joblib                    1.5.3
json5                     0.14.0
jsonpointer               3.1.1
jsonschema                4.26.0
jsonschema-specifications 2025.9.1
jupyter                   1.1.1
jupyter_client            8.8.0
jupyter-console           6.6.3
jupyter_core              5.9.1
jupyter-events            0.12.1
jupyter-lsp               2.3.1
jupyter_server            2.18.2
jupyter_server_terminals  0.5.4
jupyterlab                4.5.7
jupyterlab_pygments       0.3.0
jupyterlab_server         2.28.0
jupyterlab_widgets        3.0.16
keras                     3.12.2
kiwisolver                1.5.0
lark                      1.3.1
libclang                  18.1.1
lightgbm                  4.6.0
lxml                      6.1.0
markdown-it-py            4.2.0
MarkupSafe                3.0.3
matplotlib                3.10.9
matplotlib-inline         0.2.2
mdurl                     0.1.2
mistune                   3.2.1
ml_dtypes                 0.5.4
namex                     0.1.0
narwhals                  2.21.0
nbclient                  0.10.4
nbconvert                 7.17.1
nbformat                  5.10.4
nest-asyncio              1.6.0
notebook                  7.5.6
notebook_shim             0.2.4
numpy                     2.2.6
openpyxl                  3.1.5
opt_einsum                3.4.0
optree                    0.19.1
overrides                 7.7.0
packaging                 26.0
pandas                    2.3.3
pandocfilters             1.5.1
parso                     0.8.7
patsy                     1.0.2
pillow                    12.2.0
pip                       26.0.1
platformdirs              4.9.6
plotly                    6.7.0
plotly-express            0.4.1
prometheus_client         0.25.0
prompt_toolkit            3.0.52
protobuf                  7.34.1
psutil                    7.2.2
pure_eval                 0.2.3
pycparser                 3.0
Pygments                  2.20.0
pyparsing                 3.3.2
python-dateutil           2.9.0.post0
python-json-logger        4.1.0
pytz                      2026.2
pywinpty                  3.0.3
PyYAML                    6.0.3
pyzmq                     27.1.0
referencing               0.37.0
requests                  2.34.2
retrying                  1.4.2
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rfc3987-syntax            1.1.0
rich                      15.0.0
rpds-py                   0.30.0
scikit-learn              1.7.2
scipy                     1.15.3
seaborn                   0.13.2
Send2Trash                2.1.0
setuptools                82.0.1
six                       1.17.0
soupsieve                 2.8.3
SQLAlchemy                2.0.49
stack-data                0.6.3
statsmodels               0.14.6
tensorflow                2.21.0
termcolor                 3.3.0
terminado                 0.18.1
threadpoolctl             3.6.0
tinycss2                  1.4.0
tomli                     2.4.1
tornado                   6.5.5
traitlets                 5.15.0
typing_extensions         4.15.0
tzdata                    2026.2
uri-template              1.3.0
urllib3                   2.7.0
wcwidth                   0.7.0
webcolors                 25.10.0
webencodings              0.5.1
websocket-client          1.9.0
Werkzeug                  3.1.8
wheel                     0.46.3
widgetsnbextension        4.0.15
wrapt                     2.1.2
xgboost                   3.2.0
zipp                      3.23.1

!pip list --outdated runs a shell command to display a full list of outdated and the new version of installed packages in my laptop or desktop environment.

Package   Version Latest Type
--------- ------- ------ -----
click     8.3.3   8.4.0  wheel
decorator 5.2.1   5.3.0  wheel
h5py      3.14.0  3.16.0 wheel
narwhals  2.21.0  2.21.2 wheel
packaging 26.0    26.2   wheel
pip       26.0.1  26.1.1 wheel
tinycss2  1.4.0   1.5.1  wheel
wheel     0.46.3  0.47.0 wheel

!pip list --format=json runs a shell command to display a full list of packages in json format of installed packages in my laptop or desktop environment.

    
[{"name": "absl-py", "version": "2.4.0"}, {"name": "anyio", "version": "4.13.0"}, {"name": "argon2-cffi",
"version": "25.1.0"}, {"name": "argon2-cffi-bindings", "version": "25.1.0"}, {"name": "arrow", "version":
"1.4.0"}, {"name": "asttokens", "version": "3.0.1"}, {"name": "astunparse", "version": "1.6.3"}, {"name":
"async-lru", "version": "2.3.0"}, {"name": "attrs", "version": "26.1.0"}, {"name": "babel", "version":
"2.18.0"}, {"name": "beautifulsoup4", "version": "4.14.3"}, {"name": "bleach", "version": "6.3.0"}, {"name":
"blinker", "version": "1.9.0"}, {"name": "catboost", "version": "1.2.10"}, {"name": "certifi", "version":
"2026.4.22"}, {"name": "cffi", "version": "2.0.0"}, {"name": "charset-normalizer", "version": "3.4.7"}, {"name":
"click", "version": "8.3.3"}, {"name": "colorama", "version": "0.4.6"}, {"name": "comm", "version":
"0.2.3"}, {"name": "contourpy", "version": "1.3.2"}, {"name": "cycler", "version": "0.12.1"}, {"name":
"dash", "version": "4.1.0"}, {"name": "debugpy", "version": "1.8.20"}, {"name": "decorator", "version":
"5.2.1"}, {"name": "defusedxml", "version": "0.7.1"}, {"name": "et_xmlfile", "version": "2.0.0"}, {"name":
"exceptiongroup", "version": "1.3.1"}, {"name": "executing", "version": "2.2.1"}, {"name": 
"fastjsonschema", "version": "2.21.2"}, {"name": "Flask", "version": "3.1.3"}, {"name": "flatbuffers", "version":
"25.12.19"}, {"name": "fonttools", "version": "4.63.0"}, {"name": "fqdn", "version": "1.5.1"}, {"name":
"gast", "version": "0.7.0"}, {"name": "google-pasta", "version": "0.2.0"}, {"name": "graphviz", "version":
"0.21"}, {"name": "greenlet", "version": "3.5.0"}, {"name": "grpcio", "version": "1.80.0"}, {"name":
"h11", "version": "0.16.0"}, {"name": "h5py", "version": "3.14.0"}, {"name": "httpcore", "version":
"1.0.9"}, {"name": "httpx", "version": "0.28.1"}, {"name": "idna", "version": "3.15"}, {"name":
"importlib_metadata", "version": "9.0.0"}, {"name": "ipykernel", "version": "7.2.0"}, {"name":
"ipympl", "version": "0.10.0"}, {"name": "ipython", "version": "8.39.0"}, {"name": "ipywidgets", "version":
"8.1.8"}, {"name": "isoduration", "version": "20.11.0"}, {"name": "itsdangerous", "version":
"2.2.0"}, {"name": "jedi", "version": "0.20.0"}, {"name": "Jinja2", "version": "3.1.6"}, {"name":
"joblib", "version": "1.5.3"}, {"name": "json5", "version": "0.14.0"}, {"name": "jsonpointer", "version":
"3.1.1"}, {"name": "jsonschema", "version": "4.26.0"}, {"name": "jsonschema-specifications", "version":
"2025.9.1"}, {"name": "jupyter", "version": "1.1.1"}, {"name": "jupyter_client", "version": "8.8.0"}, {"name":
"jupyter-console", "version": "6.6.3"}, {"name": "jupyter_core", "version": "5.9.1"}, {"name": 
"jupyter-events", "version": "0.12.1"}, {"name": "jupyter-lsp", "version": "2.3.1"}, {"name":
"jupyter_server", "version": "2.18.2"}, {"name": "jupyter_server_terminals", "version": "0.5.4"}, {"name":
"jupyterlab", "version": "4.5.7"}, {"name": "jupyterlab_pygments", "version": "0.3.0"}, {"name": 
"jupyterlab_server", "version": "2.28.0"}, {"name": "jupyterlab_widgets", "version": "3.0.16"}, {"name": 
"keras", "version": "3.12.2"}, {"name": "kiwisolver", "version": "1.5.0"}, {"name": "lark", "version":
"1.3.1"}, {"name": "libclang", "version": "18.1.1"}, {"name": "lightgbm", "version": "4.6.0"}, {"name":
"lxml", "version": "6.1.0"}, {"name": "markdown-it-py", "version": "4.2.0"}, {"name": "MarkupSafe", "version":
"3.0.3"}, {"name": "matplotlib", "version": "3.10.9"}, {"name": "matplotlib-inline", "version": 
"0.2.2"}, {"name": "mdurl", "version": "0.1.2"}, {"name": "mistune", "version": "3.2.1"}, {"name":
"ml_dtypes", "version": "0.5.4"}, {"name": "namex", "version": "0.1.0"}, {"name": "narwhals", "version": 
"2.21.0"}, {"name": "nbclient", "version": "0.10.4"}, {"name": "nbconvert", "version": "7.17.1"}, {"name": 
"nbformat", "version": "5.10.4"}, {"name": "nest-asyncio", "version": "1.6.0"}, {"name": "notebook", "version":
"7.5.6"}, {"name": "notebook_shim", "version": "0.2.4"}, {"name": "numpy", "version": "2.2.6"}, {"name":
"openpyxl", "version": "3.1.5"}, {"name": "opt_einsum", "version": "3.4.0"}, {"name": "optree", "version": 
"0.19.1"}, {"name": "overrides", "version": "7.7.0"}, {"name": "packaging", "version": "26.0"}, {"name":
"pandas", "version": "2.3.3"}, {"name": "pandocfilters", "version": "1.5.1"}, {"name": "parso", "version":
"0.8.7"}, {"name": "patsy", "version": "1.0.2"}, {"name": "pillow", "version": "12.2.0"}, {"name":
"pip", "version": "26.0.1"}, {"name": "platformdirs", "version": "4.9.6"}, {"name": "plotly", "version":
"6.7.0"}, {"name": "plotly-express", "version": "0.4.1"}, {"name": "prometheus_client", "version":
"0.25.0"}, {"name": "prompt_toolkit", "version": "3.0.52"}, {"name": "protobuf", "version": "7.34.1"}, {"name":
"psutil", "version": "7.2.2"}, {"name": "pure_eval", "version": "0.2.3"}, {"name": "pycparser", "version":
"3.0"}, {"name": "Pygments", "version": "2.20.0"}, {"name": "pyparsing", "version": "3.3.2"}, {"name": 
"python-dateutil", "version": "2.9.0.post0"}, {"name": "python-json-logger", "version": "4.1.0"}, {"name": 
"pytz", "version": "2026.2"}, {"name": "pywinpty", "version": "3.0.3"}, {"name": "PyYAML", "version":
"6.0.3"}, {"name": "pyzmq", "version": "27.1.0"}, {"name": "referencing", "version": "0.37.0"}, {"name": 
"requests", "version": "2.34.2"}, {"name": "retrying", "version": "1.4.2"}, {"name": "rfc3339-validator",
"version": "0.1.4"}, {"name": "rfc3986-validator", "version": "0.1.1"}, {"name": "rfc3987-syntax", "version":
"1.1.0"}, {"name": "rich", "version": "15.0.0"}, {"name": "rpds-py", "version": "0.30.0"}, {"name": 
"scikit-learn", "version": "1.7.2"}, {"name": "scipy", "version": "1.15.3"}, {"name": "seaborn", "version":
"0.13.2"}, {"name": "Send2Trash", "version": "2.1.0"}, {"name": "setuptools", "version": "82.0.1"}, {"name":
"six", "version": "1.17.0"}, {"name": "soupsieve", "version": "2.8.3"}, {"name": "SQLAlchemy", "version":
"2.0.49"}, {"name": "stack-data", "version": "0.6.3"}, {"name": "statsmodels", "version": "0.14.6"}, {"name":
"tensorflow", "version": "2.21.0"}, {"name": "termcolor", "version": "3.3.0"}, {"name": "terminado", "version":
"0.18.1"}, {"name": "threadpoolctl", "version": "3.6.0"}, {"name": "tinycss2", "version": "1.4.0"}, {"name":
"tomli", "version": "2.4.1"}, {"name": "tornado", "version": "6.5.5"}, {"name": "traitlets", "version": 
"5.15.0"}, {"name": "typing_extensions", "version": "4.15.0"}, {"name": "tzdata", "version": "2026.2"}, {"name":
"uri-template", "version": "1.3.0"}, {"name": "urllib3", "version": "2.7.0"}, {"name": "wcwidth", "version":
"0.7.0"}, {"name": "webcolors", "version": "25.10.0"}, {"name": "webencodings", "version": "0.5.1"}, {"name": 
"websocket-client", "version": "1.9.0"}, {"name": "Werkzeug", "version": "3.1.8"}, {"name": "wheel", "version":
"0.46.3"}, {"name": "widgetsnbextension", "version": "4.0.15"}, {"name": "wrapt", "version": "2.1.2"}, {"name":
"xgboost", "version": "3.2.0"}, {"name": "zipp", "version": "3.23.1"}]

!pip list --verbose runs a shell command to display the file path of installed packages in my laptop or desktop environment.

Package                   Version     Location                                              Installer
------------------------- ----------- ----------------------------------------------------- ---------
absl-py                   2.4.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
anyio                     4.13.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
argon2-cffi               25.1.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
argon2-cffi-bindings      25.1.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
arrow                     1.4.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
asttokens                 3.0.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
astunparse                1.6.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
async-lru                 2.3.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
attrs                     26.1.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
babel                     2.18.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
beautifulsoup4            4.14.3      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
bleach                    6.3.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
blinker                   1.9.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
catboost                  1.2.10      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
certifi                   2026.4.22   c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
cffi                      2.0.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
charset-normalizer        3.4.7       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
click                     8.3.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
colorama                  0.4.6       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
comm                      0.2.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
contourpy                 1.3.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
cycler                    0.12.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
dash                      4.1.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
debugpy                   1.8.20      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
decorator                 5.2.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
defusedxml                0.7.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
et_xmlfile                2.0.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
exceptiongroup            1.3.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
executing                 2.2.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
fastjsonschema            2.21.2      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
Flask                     3.1.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
flatbuffers               25.12.19    c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
fonttools                 4.63.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
fqdn                      1.5.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
gast                      0.7.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
google-pasta              0.2.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
graphviz                  0.21        c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
greenlet                  3.5.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
grpcio                    1.80.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
h11                       0.16.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
h5py                      3.14.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
httpcore                  1.0.9       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
httpx                     0.28.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
idna                      3.15        c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
importlib_metadata        9.0.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
ipykernel                 7.2.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
ipympl                    0.10.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
ipython                   8.39.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
ipywidgets                8.1.8       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
isoduration               20.11.0     c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
itsdangerous              2.2.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jedi                      0.20.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
Jinja2                    3.1.6       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
joblib                    1.5.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
json5                     0.14.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jsonpointer               3.1.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jsonschema                4.26.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jsonschema-specifications 2025.9.1    c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter                   1.1.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter_client            8.8.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter-console           6.6.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter_core              5.9.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter-events            0.12.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter-lsp               2.3.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter_server            2.18.2      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyter_server_terminals  0.5.4       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyterlab                4.5.7       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyterlab_pygments       0.3.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyterlab_server         2.28.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
jupyterlab_widgets        3.0.16      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
keras                     3.12.2      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
kiwisolver                1.5.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
lark                      1.3.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
libclang                  18.1.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
lightgbm                  4.6.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
lxml                      6.1.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
markdown-it-py            4.2.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
MarkupSafe                3.0.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
matplotlib                3.10.9      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
matplotlib-inline         0.2.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
mdurl                     0.1.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
mistune                   3.2.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
ml_dtypes                 0.5.4       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
namex                     0.1.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
narwhals                  2.21.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
nbclient                  0.10.4      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
nbconvert                 7.17.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
nbformat                  5.10.4      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
nest-asyncio              1.6.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
notebook                  7.5.6       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
notebook_shim             0.2.4       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
numpy                     2.2.6       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
openpyxl                  3.1.5       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
opt_einsum                3.4.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
optree                    0.19.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
overrides                 7.7.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
packaging                 26.0        c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages
pandas                    2.3.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pandocfilters             1.5.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
parso                     0.8.7       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
patsy                     1.0.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pillow                    12.2.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pip                       26.0.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages conda
platformdirs              4.9.6       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
plotly                    6.7.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
plotly-express            0.4.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
prometheus_client         0.25.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
prompt_toolkit            3.0.52      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
protobuf                  7.34.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
psutil                    7.2.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pure_eval                 0.2.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pycparser                 3.0         c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
Pygments                  2.20.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pyparsing                 3.3.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
python-dateutil           2.9.0.post0 c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
python-json-logger        4.1.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pytz                      2026.2      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pywinpty                  3.0.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
PyYAML                    6.0.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
pyzmq                     27.1.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
referencing               0.37.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
requests                  2.34.2      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
retrying                  1.4.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
rfc3339-validator         0.1.4       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
rfc3986-validator         0.1.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
rfc3987-syntax            1.1.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
rich                      15.0.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
rpds-py                   0.30.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
scikit-learn              1.7.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
scipy                     1.15.3      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
seaborn                   0.13.2      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
Send2Trash                2.1.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
setuptools                82.0.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages
six                       1.17.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
soupsieve                 2.8.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
SQLAlchemy                2.0.49      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
stack-data                0.6.3       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
statsmodels               0.14.6      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
tensorflow                2.21.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
termcolor                 3.3.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
terminado                 0.18.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
threadpoolctl             3.6.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
tinycss2                  1.4.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
tomli                     2.4.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
tornado                   6.5.5       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
traitlets                 5.15.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
typing_extensions         4.15.0      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
tzdata                    2026.2      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
uri-template              1.3.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
urllib3                   2.7.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
wcwidth                   0.7.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
webcolors                 25.10.0     c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
webencodings              0.5.1       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
websocket-client          1.9.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
Werkzeug                  3.1.8       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
wheel                     0.46.3      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages
widgetsnbextension        4.0.15      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
wrapt                     2.1.2       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
xgboost                   3.2.0       c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip
zipp                      3.23.1      c:\users\xxxxx\anaconda3\envs\py310\lib\site-packages pip



⭐ What CatBoost Is — Clear, Practical Explanation

CatBoost is a machine‑learning algorithm created by Yandex. It is an open‑source library available to everyone. It belongs to the family of gradient boosting decision tree (GBDT) models — the same family as XGBoost and LightGBM — but with one huge advantage:

⭐ CatBoost handles categorical features automatically That’s where the name comes from:

Categorical Boosting

Most ML algorithms require you to manually convert categories into numbers (one‑hot encoding, label encoding, etc.). CatBoost does this internally, using a technique called ordered target statistics, which avoids data leakage and overfitting.

⭐ Why CatBoost is popular

1. No need for manual preprocessing
No one‑hot encoding
No label encoding
No normalization
No missing‑value imputation

CatBoost handles all of it.

2. Very strong performance Often beats:

Random Forest
Logistic Regression
XGBoost
LightGBM

Especially when your dataset has many categorical columns.

3. Fast and efficient GPU acceleration
Symmetric trees (balanced trees)
Great default hyperparameters

4. Works well on small and medium datasets Unlike deep learning, CatBoost doesn’t need millions of rows.

⭐ Where CatBoost is used

Fraud detection
Recommendation systems
Customer churn prediction
Tabular data modeling
Credit scoring
Medical risk prediction
Marketing analytics

Basically: if your data is in a table, CatBoost is one of the best algorithms you can use.
⭐ CatBoost vs XGBoost vs LightGBM

CatBoost, XGBoost, and LightGBM are the three most powerful gradient boosting algorithms used for tabular machine‑learning tasks. They all belong to the Gradient Boosted Decision Tree (GBDT) family, but each one is optimized for a different purpose.

⭐ CatBoost — Best for Categorical Features and No‑Prep Data

CatBoost is designed to handle categorical features automatically. It uses ordered target statistics to avoid data leakage and symmetric trees for stability and explainability.

Best when your dataset has many categorical columns or when you want minimal preprocessing.

⭐ XGBoost — Most Stable and Most Mature

XGBoost is the most battle‑tested boosting library. It offers maximum control, excellent reliability, and strong performance across many data types.

Best when you want robustness, fine‑grained tuning, and predictable behavior in production.

⭐ LightGBM — Fastest and Best for Very Large Datasets

LightGBM uses histogram‑based training and leaf‑wise tree growth, making it extremely fast and memory‑efficient. It scales to millions of rows with ease.

Best when your dataset is huge and training speed matters.

⭐ Practical Comparison

CatBoost = Highest accuracy on categorical/tabular data
XGBoost = Most stable and reliable across all conditions
LightGBM = Fastest training and best for massive datasets

⭐ Summary

If your data has categories → CatBoost wins
If your data is huge → LightGBM wins
If you want reliability → XGBoost wins

CatBoost is often the best choice for classroom‑grade, explainable, deterministic systems because it requires almost no preprocessing and produces stable, symmetric trees.

⭐ How to Use CatBoost in Your Test Generator

CatBoost can turn your test generator into an adaptive learning system. It predicts the next best question for each student based on their performance, speed, accuracy, and topic mastery.

⭐ Step 1 — Prepare Your Training Data

Create a table where each row represents a student answering a question:
• student_id
• question_id
• topic
• difficulty
• correct (1 or 0)
• time_sec
• next_question (the label CatBoost learns to predict)

CatBoost works perfectly with categorical features like topic and difficulty.

⭐ Step 2 — Train the CatBoost Model

Use CatBoostClassifier to learn which question should come next:

Python Example:
Train a model with ordered boosting and symmetric trees for stable predictions.

⭐ Step 3 — Save the Model

After training, save the model as:
catboost_next_question.cbm

This file becomes the “brain” of your adaptive test generator.

⭐ Step 4 — Load CatBoost in Your Backend

When a student answers a question, send their performance data to your backend. Your backend loads the CatBoost model and predicts the next question ID.

Example student state:
• topic: algebra
• difficulty: medium
• correct: 1
• time_sec: 12

CatBoost returns something like:
next_question_id = 42

Your test generator then loads question 42.

⭐ Step 5 — Connect to Your HTML Test Page

Your JavaScript sends the student’s answer data to your backend:

The backend responds with:
{ "next_question_id": 42 }

Your page loads the next question automatically, creating a smooth adaptive experience.

⭐ Step 6 — Add Explainability (Optional but Powerful)

CatBoost supports SHAP values, allowing you to show:
• why a question was chosen
• which features influenced the decision
• how difficulty was adjusted

This aligns perfectly with INV‑BAT‑AI’s transparent, classroom‑grade philosophy.

⭐ Summary

CatBoost transforms your test generator into an intelligent tutor by:
• analyzing student performance
• predicting the next best question
• adapting difficulty in real time
• providing explainable decisions

It requires almost no preprocessing and works beautifully with your existing HTML test pages.

⭐ CatBoost Training Code (Full HTML Version)

Below is a complete, clean, production‑ready CatBoost training script. It prepares your data, trains the model, handles categorical features, and saves the model for use in your adaptive test generator.

⭐ Step 1 — Import Libraries

from catboost import CatBoostClassifier
import pandas as pd

⭐ Step 2 — Load and Prepare Your Training Data

Your dataset should include:
• student_id
• question_id
• topic
• difficulty
• correct
• time_sec
• next_question (label)

df = pd.read_csv("training_data.csv")

X = df.drop("next_question", axis=1)
y = df["next_question"]

categorical_features = ["topic",
"difficulty"]

⭐ Step 3 — Train the CatBoost Model

CatBoost automatically handles categorical features and avoids target leakage using ordered boosting.

model = CatBoostClassifier(
iterations=500,
learning_rate=0.05,
depth=6,
loss_function="MultiClass",
random_seed=42,
verbose=True
)

model.fit(
X,
y,
cat_features=categorical_features
)

⭐ Step 4 — Save the Model

This file becomes the “brain” of your adaptive test generator.

model.save_model("catboost_next_
question.cbm")

⭐ Step 5 — Use the Model in Your Test Generator

Your backend loads the model once and predicts the next question based on student performance.

from catboost import CatBoostClassifier
import pandas as pd

model = CatBoostClassifier()
model.load_model("catboost_next_
question.cbm") def predict_next_question(student
_features: dict): df = pd.DataFrame([student_features]) next_q = model.predict(df)[0] return int(next_q)

⭐ Summary

This CatBoost training pipeline gives your test generator:
• adaptive question selection
• automatic handling of categorical features
• deterministic, explainable predictions
• a clean model file ready for deployment

CatBoost is the perfect engine for INV‑BAT‑AI’s classroom‑grade adaptive learning system.

⭐ CatBoost Inference Backend (Full HTML Version)

This section shows how to build a simple, clean CatBoost inference backend. It loads the trained model, receives student data, and returns the next question ID for your test generator.

⭐ Step 1 — Load the Trained CatBoost Model

from catboost import CatBoostClassifier
import pandas as pd

Load the trained model once at startup
model = CatBoostClassifier()
model.load_model("catboost_next_
question.cbm")

⭐ Step 2 — Define a Prediction Function

This function takes a dictionary of student features and returns the next question ID.

def predict_next_question(student
_features: dict) -> int: # student_features example: # { # "topic": "algebra", # "difficulty": "medium", # "correct": 1, # "time_sec": 12 # } df = pd.DataFrame([student_features]) prediction = model.predict(df)[0] return int(prediction)

⭐ Step 3 — Expose an HTTP Endpoint (Example with Flask)

Your test page sends student data to this endpoint. The backend responds with the next question ID as JSON.

from flask import Flask, request, jsonify

app = Flask(name)

@app.route("/next-question", methods=
["POST"]) def next_question(): data = request.get_json() Expecting keys like: topic, difficulty,
correct, time_sec next_q_id = predict_next_question(data) return jsonify({"next_question_id":
next_q_id}) if name == "main": app.run(host="0.0.0.0", port=5000)

⭐ Step 4 — Front-End Integration (Conceptual)

Your HTML/JavaScript test page sends the student’s answer data to /next-question. The backend returns:

{ "next_question_id": 42 }

Your page then loads question 42, creating an adaptive test flow.

⭐ Summary

This CatBoost inference backend:
• loads the trained model once
• accepts student performance data
• predicts the next best question
• returns a simple JSON response for your test generator

It is deterministic, explainable, and fits perfectly into your INV‑BAT‑AI classroom‑grade architecture.

⭐ JavaScript Integration for CatBoost Inference

This JavaScript code connects your HTML test page to your CatBoost inference backend. When a student answers a question, the browser sends their performance data to the backend, receives the predicted next question ID, and loads the next question automatically.

⭐ Step 1 — Capture Student Answer Data

You collect the student’s performance after each question:
• topic
• difficulty
• correct (1 or 0)
• time_sec

Example JavaScript object:
const studentState = {
topic: currentTopic,
difficulty: currentDifficulty,
correct: isCorrect ? 1 : 0,
time_sec: timeSpent
};

⭐ Step 2 — Send Data to the Backend

Your backend endpoint is:
/next-question

Send the student data using fetch():
fetch("/next-question", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(studentState)
})
.then(response => response.json())
.then(data => {
const nextId = data.next_question_id;
loadNextQuestion(nextId);
})
.catch(err => {
console.error("Error getting next 
question:", err); });

⭐ Step 3 — Load the Next Question

Your test generator already has a function that loads a question by ID. You simply call it with the predicted ID:
function loadNextQuestion(id) {
// Replace this with your existing question
loader console.log("Loading question:", id); displayQuestion(id); }

⭐ Step 4 — Full Integration Flow

Student answers a question JavaScript builds a studentState object JavaScript sends it to /next-question Backend runs CatBoost inference Backend returns:
{ "next_question_id": 42 } JavaScript loads question 42

This creates a smooth, adaptive learning experience powered by CatBoost.

⭐ Summary

This JavaScript integration:
• sends student performance data to your backend
• receives the CatBoost prediction
• loads the next question automatically
• enables adaptive, personalized testing on invbat.com

It is clean, deterministic, and fully compatible with your existing HTML structure.

⭐ SHAP Explainability for CatBoost

SHAP (SHapley Additive exPlanations) shows why CatBoost chose a specific next question for a student. It reveals which features — topic, difficulty, correctness, or time spent — influenced the model’s decision.

SHAP values make your adaptive test generator transparent, fair, and classroom‑grade, aligning perfectly with INV‑BAT‑AI’s philosophy.

⭐ Step 1 — Load the SHAP Explainer

CatBoost integrates directly with SHAP, so you can generate explanations with just a few lines of code.

import shap

explainer = shap.TreeExplainer(model)

⭐ Step 2 — Compute SHAP Values for a Student

You pass the student’s feature row into the explainer. SHAP returns the contribution of each feature to the predicted next question.

shap_values = explainer.shap_values(df)

⭐ Step 3 — Visualize the Explanation

SHAP provides multiple visualization tools:
• force plot
• bar plot
• waterfall plot
• summary plot

Example:
shap.force_plot(
explainer.expected_value,
shap_values[0],
df.iloc[0]
)

⭐ What SHAP Tells You

SHAP explains:
• why CatBoost selected a specific next question
• which features increased difficulty
• which features decreased difficulty
• how time spent influenced the prediction
• how correctness shaped the next step

This gives students and teachers a transparent view of the adaptive logic.

⭐ Example Interpretation

A SHAP explanation might show:
• “correct = 1” pushed the model toward a harder question
• “time_sec = 22” pushed the model toward an easier question
• “topic = algebra” guided the model to stay within the same topic

This creates a clear, human‑readable justification for every adaptive decision.

⭐ Step 4 — Optional: Display SHAP in Your UI

You can export SHAP plots as images and show them on your website:
• after each question
• in a teacher dashboard
• in a student progress report

This makes your system not just adaptive — but explainable.

⭐ Summary

SHAP gives your CatBoost‑powered test generator:
• transparency
• fairness
• interpretability
• trustworthiness

It shows exactly why the model chose the next question, making INV‑BAT‑AI a fully explainable, classroom‑grade adaptive learning system.

⭐ Adaptive Test Flow Diagram

This diagram shows how your CatBoost‑powered adaptive test generator works from start to finish. It illustrates the full loop: student answers → backend prediction → next question → explanation → repeat.

⭐ Step 1 — Student Receives a Question

The system displays a question based on the student’s current skill level, topic, and progress.

Flow:
Display Question → Student Reads → Student Answers

⭐ Step 2 — Capture Student Performance

After the student answers, the system records:
• topic
• difficulty
• correct (1 or 0)
• time_sec
• question_id

This becomes the feature vector for CatBoost.

⭐ Step 3 — Send Data to Backend

The browser sends the student’s performance data to:
/next-question

The backend receives a JSON object representing the student’s state.

⭐ Step 4 — CatBoost Predicts the Next Question

The backend loads the CatBoost model and computes:
next_question_id = model.predict(student_features)

CatBoost uses ordered boosting and symmetric trees to ensure:
• deterministic behavior
• no data leakage
• stable predictions

⭐ Step 5 — Backend Returns the Prediction

The backend responds with:
{ "next_question_id": 42 }

This tells the front‑end which question to load next.

⭐ Step 6 — Front-End Loads the Next Question

JavaScript receives the prediction and calls:
loadNextQuestion(42)

The student immediately sees the next question, creating a smooth adaptive experience.

⭐ Step 7 — Optional: SHAP Explainability

The backend can also compute SHAP values to explain:
• why the next question was chosen
• which features influenced the decision
• how difficulty was adjusted

These explanations can be shown to teachers or students.

⭐ Full Adaptive Loop

1. Show Question
2. Student Answers
3. Collect Performance Data
4. Send Data to Backend
5. CatBoost Predicts Next Question
6. Backend Returns next_question_id
7. Load Next Question
8. (Optional) Show SHAP Explanation
9. Repeat

This loop continues until the test ends, creating a fully adaptive, personalized learning experience powered by CatBoost.

⭐ Summary

Your adaptive test system:
• reacts to student performance in real time
• adjusts difficulty automatically
• selects the best next question
• provides explainable decisions
• delivers a classroom‑grade, deterministic learning experience

This is the core of INV‑BAT‑AI’s intelligent test generator.

⭐ CatBoost Model Deployment Guide

This guide shows how to deploy your trained CatBoost model so it can power your adaptive test generator on invbat.com. You will go from a local training script to a live backend endpoint that your JavaScript can call.

⭐ Step 1 — Train and Save the Model

Train your CatBoost model locally and save it as a file:
from catboost import CatBoostClassifier
import pandas as pd

df = pd.read_csv("training_data.csv")

X = df.drop("next_question", axis=1)
y = df["next_question"]

categorical_features = ["topic",
"difficulty"] model = CatBoostClassifier( iterations=500, learning_rate=0.05, depth=6, loss_function="MultiClass", random_seed=42, verbose=True ) model.fit( X, y, cat_features=categorical_features ) model.save_model("catboost_next_question.
cbm")

⭐ Step 2 — Upload the Model to Your Server

Use your hosting file manager or SFTP to upload:
catboost_next_question.cbm

Place it in a secure backend directory (for example: /var/www/invbat/models/).

⭐ Step 3 — Create a Backend Inference Service

Use a lightweight web framework (such as Flask) to expose an HTTP endpoint that loads the model and serves predictions.
from catboost import CatBoostClassifier
import pandas as pd
from flask import Flask, request, jsonify

MODEL_PATH = "catboost_next_question.cbm"

model = CatBoostClassifier()
model.load_model(MODEL_PATH)

app = Flask(name)

def predict_next_question(student_features:
dict) -> int: df = pd.DataFrame([student_features]) prediction = model.predict(df)[0] return int(prediction) @app.route("/next-question", methods=
["POST"]) def next_question(): data = request.get_json() next_q_id = predict_next_question(data) return jsonify({"next_question_id":
next_q_id}) if name == "main": app.run(host="0.0.0.0", port=5000)

⭐ Step 4 — Configure Your Web Server

Use a production server (such as gunicorn + nginx or your hosting’s Python app manager) to:
• run the Flask app as a persistent service
• route requests from https://invbat.com/next-question to the Flask app

This makes the endpoint available to your front‑end pages.

⭐ Step 5 — Connect Your HTML/JS Front-End

Your test page (for example, pd_2.html) sends student performance data to the deployed endpoint:
const studentState = {
topic: currentTopic,
difficulty: currentDifficulty,
correct: isCorrect ? 1 : 0,
time_sec: timeSpent
};

fetch("/next-question", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(studentState)
})
.then(response => response.json())
.then(data => {
const nextId = data.next_question_id;
loadNextQuestion(nextId);
})
.catch(err => {
console.error("Error getting next question:"
, err); });

⭐ Step 6 — Test the Deployed System

Verify that:
• the endpoint /next-question responds correctly
• the model returns valid question IDs
• your page loads the predicted next question
• latency is acceptable for classroom use

⭐ Step 7 — Maintain and Update the Model

Over time, you can:
• retrain the model with new student data
• save a new .cbm file
• replace the old model file on the server
• reload or restart the backend service

This lets your adaptive system improve continuously without changing your front‑end code.

⭐ Summary

This deployment pipeline:
• trains and saves a CatBoost model
• uploads it to your server
• exposes a clean JSON API endpoint
• connects directly to your invbat.com test pages

It gives you a deterministic, explainable, classroom‑grade adaptive engine fully aligned with INV‑BAT‑AI’s design.

⭐ Student Progress Dashboard

The Student Progress Dashboard shows how each learner is performing over time in your CatBoost‑powered adaptive test system. It combines scores, difficulty levels, topics, and model decisions into a clear, classroom‑friendly view.

⭐ What the Dashboard Shows

For each student, you can display:
• total questions answered
• accuracy (percentage correct)
• average time per question
• current difficulty level
• topics mastered
• topics needing review

You can also show how the system is adapting:
• when difficulty increased
• when difficulty decreased
• which topics are being emphasized

⭐ Example Dashboard Layout

You can structure the dashboard as a simple table or card layout:

Per Student:
• Name: Alice
• Accuracy: 82%
• Average Time: 14.2 seconds
• Current Difficulty: Medium → Hard
• Strong Topics: Algebra, Fractions
• Weak Topics: Word Problems, Geometry

Per Topic:
• Algebra: 90% correct
• Fractions: 85% correct
• Geometry: 62% correct
• Word Problems: 55% correct

⭐ Backend Data for the Dashboard

Your backend can aggregate student results into a summary structure like:

{
"student_id": 1,
"name": "Alice",
"accuracy": 0.82,
"avg_time_sec": 14.2,
"current_difficulty": "medium",
"topics": {
"algebra": 0.90,
"fractions": 0.85,
"geometry": 0.62,
"word_problems": 0.55
}
}

Your HTML/JavaScript can then render this data into cards, tables, or charts.

⭐ Optional: Show Model‑Driven Insights

You can add insights powered by CatBoost and SHAP:
• “System is increasing difficulty in Algebra because accuracy is high.”
• “System is giving more practice in Geometry due to low accuracy.”
• “Time spent is high on Word Problems, so difficulty is staying stable.”

These insights help teachers understand how the adaptive engine behaves.

⭐ Example UI Elements

You can include:
• progress bars for each topic
• color‑coded difficulty (easy = green, medium = yellow, hard = red)
• trend arrows (↑ improving, ↓ declining, → stable)
• a timeline of recent questions and outcomes

⭐ Summary

The Student Progress Dashboard:
• visualizes performance over time
• highlights strengths and weaknesses
• reveals how CatBoost adapts difficulty
• supports teachers with clear, actionable insights

It turns your adaptive test generator into a transparent, data‑driven learning system that fits perfectly with INV‑BAT‑AI’s classroom‑grade vision.

⭐ Adaptive Difficulty Algorithm Explanation

The adaptive difficulty algorithm controls how your test gets easier or harder based on each student’s performance. CatBoost learns patterns from past student data and decides whether to increase, decrease, or maintain difficulty for the next question.

⭐ Core Idea

After every question, the system looks at:
• whether the student was correct
• how long they took (time_sec)
• the current topic
• the current difficulty
• recent performance history

CatBoost uses these features to predict the best next question and its difficulty level.

⭐ Inputs to the Algorithm

For each answered question, the feature vector might include:
• topic (e.g., "algebra")
• difficulty (e.g., "easy", "medium", "hard")
• correct (1 or 0)
• time_sec (how long they took)
• question_id
• recent_accuracy (rolling average)

These features are passed into the CatBoost model.

⭐ Decision Logic (Conceptual)

The algorithm behaves like this:
• If the student is consistently correct and fast → increase difficulty
• If the student is struggling or slow → decrease or maintain difficulty
• If the student is strong in a topic → introduce harder questions in that topic
• If the student is weak in a topic → give more practice at easier levels

CatBoost learns these patterns from data instead of using fixed rules.

⭐ How CatBoost Implements It

CatBoost is trained on historical data where:
• input = student performance + context
• label = next_question (including its difficulty)

During deployment:
1. Student answers a question
2. System builds a feature vector
3. CatBoost predicts next_question_id
4. The next question’s difficulty reflects the model’s decision

The difficulty is therefore an emergent property of the model’s learned behavior.

⭐ Example Behavior

If a student:
• answers 4 algebra questions correctly in a row
• with low time_sec

The model tends to:
• choose a harder algebra question next

If a student:
• misses several geometry questions
• with high time_sec

The model tends to:
• choose an easier geometry question
• or stay at the same level for more practice

⭐ Optional: Transparent Rules + Model

You can combine:
• simple guardrails (e.g., “never jump more than one difficulty level at a time”)
• CatBoost predictions (which question within that difficulty to choose)

This keeps the system both intelligent and predictable for classroom use.

⭐ Summary

The adaptive difficulty algorithm:
• reads student performance after each question
• uses CatBoost to predict the best next question
• naturally increases or decreases difficulty over time
• personalizes the learning path for each student

It turns your test generator into a smart, data‑driven tutor that adjusts challenge level in real time while remaining explainable and classroom‑grade.

Training on how to search pandas available components.

!pip search pandas

PREVIOUS NEXT


🔗 Privacy 🔗 Disclaimer

Copyright 2026
Never Forget Again with IN-V-BAT-AI
INVenting Brain Assistant Tools using Artificial Intelligence
(IN-V-BAT-AI)

Since
April 27, 2009