New answers tagged

0

You correctly mentioned the definition of impurity which is $$I_G(P) = 1 - \sum _{i=1}^k p_i^2$$ This can be written as $$I_G(P) = \sum _{i=1}^k p_i*(1 - p_i)$$ At any split, for any branch $T_i$, you calculate the probability using the classical definition i.e., $$p_i = \frac{|T_i|}{|T|}$$ Using this, you can derive the impurity definition $I(T_i)$ given in ...


0

(note: this answer is mid-edit) There are a number of Machine Learner explainers and diagnostics. Disclaimers: (these should increase over time) I'm not making it exactly reproducible because it would be 2x as long, and its working on being book-like anyway. This is more about showing the method than going into crazy details. If you want a deep dive into ...


0

I can´t give you an perfect answer because there is no code, dataset and the target what you want to achieve. Because the feature importances from random forest, is calculated based on the training data given to the model, not on predictions on a test dataset. That means, that is not the true prediction power. You should check, if there are difference on ...


0

Random Model Classifier It feels like there's a word missing here, you probably mean "Random Forest [model] classifier" or "Random Fields classifier"? the confusion matrix This is an important piece of information, because if you have a new (annotated) sample this allows you to compare a few things: compare the distribution of the ...


1

You are on the right path. It appears you might have analysis paralysis. You should start building, then see what works and what does not work. Here is code to get you started: from sklearn.ensemble import RandomForestRegressor from sklearn.feature_selection import VarianceThreshold from sklearn.model_selection import GridSearchCV from ...


1

To me those are separate things since both models have a different cost function to be optimized. On the other hand you could combine those models by constructing embeddings based on random forest splits and then using those embeddings as inputs for a neural network. Toy example shows that there is a non-trivial configuration of a neural net that can get as ...


0

Orange3 doesn't calculate the OOB. This must be implemented a separate code. More information about how to calculate the OOB error in scikit-learn.


0

Assuming that you have a column called „target“ and „predicted“: FN = df[(df[„predicted“]==0) & (df[„target“] == 1)] and vice versa for FP.


0

Every Tree gets its OOB sample. So it might be possible that a data point is in the OOB sample of multiple Trees. oob_decision_function_ calculates the aggregate predicted probability for each data points across Trees when that data point is in the OOB sample of that particular Tree. The reason for putting above points is that OOB will give you the mean of ...


Top 50 recent answers are included