New answers tagged

0

Try this. item_target_enc= df.groupby(['item_id'])['item_cnt_month'].mean().to_dict() df['item_id'] = df['item_id'].map(item_target_enc)


-1

An empirical answer to that question woud be to look at public kaggle competitions / notebooks (see here : https://www.kaggle.com/tags/xgboost), where xgboost is heavily used as state of the art for tabular data problems. The answer is yes without a doubt. Notably in competitions, feature engineering is the main way to make a difference (followed maybe by ...


1

This would not reduce the effect of the curse of dimensionality because you are not reducing any dimensions, simply the values of one dimension. A valid reason to do this would be if there are so few training examples above 20 that your neural network struggles to learn much about them. But as Erwan suggested, you should simply try clamping and not, and ...


0

If you want to perform linear regression with feature selection, you can formulate the problem as a MIO and solve it to optimality. Then you can check if its worth it to do the feature selection.


2

Recently practitioners are representing categorical variables as embeddings for ML models. I can see a solution to your problem there. As your problem is having a two-level hierarchy you can consider two embeddings, one set of embeddings for modules, and another set for files. For every document, you can take their combination and pass it as input to the ...


2

Its best to remove such a variable. Reasons are following: Artificial imputation can add bias and result cannot be justified because 99% data for the particular variable was artificially created. The variables/features that you choose for building the predictive model should have low correlation with the target/outcome variable/feature. Because, variable ...


1

There's a good chance that it's a sign of overfitting: the fact that the importance of the features is not stable can be considered as an indication that the model itself is not stable, and this typically happens when it doesn't have enough information in the data to be sure how to use the features. As a result minor variations in the features or data cause ...


0

The features you have selected are a good starting point, but are still (with the exception of tempo) quite "low level" compared to what might be most relevant for music recommendation systems. The Essentia project provides feature extractors for music, that cover both low-level, medium-level and (since Jan 2020) high-level music feature ...


0

The underlying question is: what is a feature, what does it represent, and how can a ML algorithm use it? A feature is an indicator, it's supposed to help the algorithm predict the response variable. So the semantic of the feature is crucial: for instance it's easy to see that a patient's age can be a relevant feature for detecting a particular disease, ...


0

To avoid having too much features produced by a OneHot, you can either : Transform your data before your OneHot, regrouping different classes in intervals you created yourself (for example, reducing your 128 features to 30 classes you created yourself) then applying OneHot Use CategoryEncoder (Such as TargetEncoder, James-Stein, LeaveOneOut, ...


0

The simple answer is to experiment. You did a quite detailed analysis of the relations between your features and response variable and that's definitely a good idea, but don't be afraid to experiment with various models, even those which don't seem perfectly adapted to the task. Why? Because the one thing that such an analysis by individual features doesn't ...


Top 50 recent answers are included