2

Sycorax is right to point out that “accuracy” has a specific, technical meaning in machine learning (and it is a surprisingly bad performance metric). However, if you mean “accuracy” more colloquially, what you mean makes sense. You want to see how good each particular measurement is. You have the true observation, and you have the predicted observation. ...


2

RandomForestClassifier is a fundamentally different model than RandomForestRegression. The key difference is that the regression model is predicting some continuous value (e.g. a predicted profit/loss, or an estimated height, or something similar). The RandomForestClassifier predicted probability is the estimated probability that the sample belongs to each ...


1

Your function BinariserDF is probably the problem. Since you're using it in a FunctionTransformer, it gets called separately for the training and test folds in the cross-validation, so the number of dummy variables may be different, and the model scoring fails. Instead, use SimpleImputer and ColumnTransformer with OneHotEncoder. (The encoding is also ...


1

I already know that the best way is to split into train/test before and then apply oversampling. No, it isn't. Are unbalanced datasets problematic, and (how) does oversampling (purport to) help? Answer: they aren't, and it doesn't. (See here for a motivation for short answers. Longer answers are always welcome. See here for a general motivation for an ...


1

I like where this is going. The day with the split is it is a function of the subsample of observations seen for that predictor in each tree. Getting the range of the values of those splits would give you an idea of whether there is true signal or just noise in where the split occurs. In order to not confound the results, perhaps you can limit your search to ...


1

To fit so much data, you have to use subsamples, for instance tensorflow you sub-sample at each step (using only one batch) and algorithmically speaking you only load one batch at a time in memory it is why it works. Most of the time this is done using a generator instead of the dataset right away. Your problem is that you always load the whole dataset in ...


1

AIC is defined as $$ \text{AIC} = 2k - 2\ln(\mathcal{L}) $$ where $k$ is the number of parameters and $\ln(\mathcal{L})$ is log-likelihood. First of all, random forest is not fitted using maximum likelihood and there is no obvious likelihood function for it. Second problem is the number of parameters $k$, for linear regression this is simply the number of $\...


Only top voted, non community-wiki answers of a minimum length are eligible