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 'initially_infected': [value1],
13 'lowest_immunity': [value2],
14 'highest_immunity': [value3],
15 'mask_beta_penalty': [value4],
16 'pollutant_immunity_reduction': [value5]
17})
18
19# Make prediction
20prediction = 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)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 | 2256.11 |
| Validation RMSE | 2369.69 |
| Feature Name | Type | Description | Importance |
|---|---|---|---|
| initially_infected | Numeric | number of initially infected agents | 65.82 |
| lowest_immunity | Numeric | lowest possible immunity in simulation | 8.49 |
| highest_immunity | Numeric | highest possible immunity in simulation | 10.38 |
| mask_beta_penalty | Numeric | beta reduction coefficient for a mask weared at contact | 9.26 |
| pollutant_immunity_reduction | Numeric | immunity reduction coefficient for pollutant | 6.06 |