Model Zoo and Leaderboard
Model Zoo and Leaderboard
The ModelZoo in Modeva serves as a centralized repository for managing multiple predictive models, either built-in interpretable models (to be introduced later) or wrapped external models. It is designed to simplify the process of model addition, training, and performance leaderboard.
Model Management
from modeva import ModelZoo
from modeva.models import (
MoElasticNet, MoDecisionTreeRegressor,
MoXGBRegressor, MoRandomForestRegressor,
)
mz = ModelZoo(name="CaliforniaHousing", dataset=ds)
mz.add_model(model=MoElasticNet(name="ElasticNet", l1_ratio=0.5))
mz.add_model(model=MoDecisionTreeRegressor(name="DecisionTree"))
mz.add_model(model=MoXGBRegressor(name="XGB-Depth2", max_depth=2))
mz.add_model(model=MoRandomForestRegressor(name="RF-Depth5", max_depth=5))
Above is an example of adding four built-in models to the ModelZoo for the California Housing dataset. We can continue adding other candidate models. The ModelZoo.get_model method can be used to retrieve each individual model by its name.
Training and Leaderboard
mz.train_all()
mz.leaderboard(order_by="test MSE", ascending=True)
Above showcases the batch training of all models in the ModelZoo, with outpupt of a performance leaderboard of all the models based on the test MSE.
Examples
Example 1:
ModelZoo