Closed singsinghai closed 1 year ago
i think it was just to work well with unbalanced datasets. Of course you can rebalance the dataset beforehand, without relying on sample weights, or train directly using unbalanced data. You can definitively skip this part of the code, if you don't need it.
and, just to be clear, the train_model() function is just for convenience. You can train your models as you like, since the LEAF class takes in input an arbitrary trained model (that does not need to be trained with leaf.train_model()).
Hi Amparore, I wonder why you retrain the model with your own function as follow. As far as I can understand,
means that you want to give weight to class in this classifier. Why should this be important? Is it ok if I proceed to use the LEAF class with the original model?