More options to ensemble your models
Project description
MoreModels
A python library allowing you to use multiple models using the weight of each model based on their performance
install using
pip install moremodels
Example code:
from moremodels import WeightedModels
model1 = catboost.CatBoostRegressor()
model2 = RandomForestRegressor()
model3 = xgboost.XGBRegressor()
my_data = pd.read('my_data.csv')
test = pd.read('test.csv)
my_models = [model1, model2, model3]
models = WeightedModels( models = my_models, trainSplit = 0.8, randomState = 696969 )
models.fit(my_data, 'self') # 'self' here means that the validation dataset will be used from the internal split in the class
print(models.modelWeights)
myPredictedData = models.predict(test)
print(models.models[0])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
moremodels-1.0.5.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for moremodels-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e67d83362c17bb473272603f5d539ce22ae54f5308f7b03c87a126c7ff5157fd |
|
MD5 | a60a2df93185347df0532bdcb8e41655 |
|
BLAKE2b-256 | 1dcb5141921e6a29d174d327faf2fec348e7bb56738b375cfc6a59483e346545 |