New answers tagged

4

Random Forest tends to be not too sensitive to features with low predictive power. The reason is that RF looks for a "best split" given a subset of features (columns) and observations (rows). So "weak" features will likely be ignored in most cases. However, removing the $x$ percent weakest features may increase the model's performance. In ...


1

Load the pickle file and your new data. Fit the loaded model on the data model = pickle.load(open(pickle_file,'rb')) model.fit(x_new, y_new)


0

The purpose of k-fold cross validation is to fit the model multiple times and average out to results to estimate the model's predictive performance. If having done 10-fold CV once and got one result and then repeating it again and getting a significantly different result, probably means the number of folds is too low, and the k-fold process isn't capturing ...


0

Always separate training a model from using the model to make predictions. During training, bootstrap samples are drawn and trees built using those resamples. Voting only occurs when predicting, and all of the trees are used, whether your datapoint is from the original training set or not. There is a bit of a caveat here though, because we may be ...


0

If some leaves are pruned then it means that the model cannot predict the instances which would normally have fallen into these leaves. The logic of a decision tree is to represent every possible instance: like any supervised learning method, it must be able to predict for every possible instance as input. In some cases where all the leaves have low purity, ...


0

These are different for a valid reason The standalone model is overfitting. You can see that with r2score of 84 Vs 22. The reason for that is, the standalone model goes to full depth and hence overfit the train data and badly fit the test data. max_depthint, default=None The maximum depth of the tree. If None, then nodes are expanded until all leaves are ...


2

This would not be possible since the two variables you are trying to predict are of a different type. You are first predicting the default label, which would be yes/no, so this is a classification problem. The second variable you are trying to predict is the prepayment percentage, which is a continuous variable, this is therefore a regression problem. You ...


1

The argument for the number of features gets passed down to the BaseDecisionTree class. Looking at the code, you can see that the value that is used is calculated by first taking log with base two and then converting it to an integer (i.e. rounding it). if self.max_features == "auto": if is_classification: max_features = max(1, int(np....


0

It is possible, actually. The answer is not too different than the one given by @10xAI, but it is not trying to exploit the order of the random seeds implicitly, since it would break for parallel training. So the answer above could maybe only work for trees not trained in parallel. But not sure. The actual working answer is simple, and it resides in using ...


0

Your network is too large for this much data. Reduce the number of units in the layers, go for simple 'relu' in the layers except the last one where you should use softmax. Consider reducing number of layers. I would recommend using decision trees libraries like XGBoost, CatBoost, LightGBM etc. for this problem. You will get the best result.


Top 50 recent answers are included