Views
No views yet
pip install catboost1import pickle
2import pandas as pd
3from catboost import CatBoostRegressor
4
5# Load the model
6with open('catboost_model.pkl', 'rb') as f:
7 model = pickle.load(f)
8
9# Prepare your data (as pandas DataFrame)
10# Ensure features match training data format
11data = pd.DataFrame({
12 'beta': [value0],
13 'initially_infected': [value1],
14 'lowest_immunity': [value2],
15 'highest_immunity': [value3],
16 'mask_beta_penalty': [value4],
17 'pollutant_immunity_reduction': [value5]
18})
19
20# Make prediction
21prediction = model.predict(data)1from catboost import CatBoostRegressor
2
3# Load saved model
4model = CatBoostRegressor()
5model.load_model('catboost_model.cbm')
6
7# Make predictions
8predictions = model.predict(data)beta)1iterations: 10000
2learning_rate: 0.025
3depth: 5
4loss_function: 'RMSE'
5cat_features: None
6verbose: False
7early_stopping_rounds: 500
8random_seed: 42| Metric | Value |
|---|---|
| Train RMSE | 476.41 |
| Validation RMSE | 535.55 |
| Feature Name | Type | Description | Importance |
|---|---|---|---|
| beta | Numeric | infectivity coefficient (beta) | 80.79 |
| initially_infected | Numeric | number of initially infected agents | 17.94 |
| lowest_immunity | Numeric | lowest possible immunity in simulation | 0.17 |
| highest_immunity | Numeric | highest possible immunity in simulation | 0.42 |
| mask_beta_penalty | Numeric | beta reduction coefficient for a mask weared at contact | 0.53 |
| pollutant_immunity_reduction | Numeric | immunity reduction coefficient for pollutant | 0.15 |