Skip to main content
32 votes
Accepted

Lightgbm vs xgboost vs catboost

On Kaggle, LightGBM is indeed the "meta" base learner of almost all of the competitions that have structured datasets right now. This is mostly because of LightGBM's implementation; it doesn't do ...
aranglol's user avatar
  • 2,196
20 votes
Accepted

Why do we convert skewed data into a normal distribution

You might want to interpret your coefficients. That is, to be able to say things like "if I increase my variable $X_1$ by 1, then, on average and all else being equal, $Y$ should increase by $\beta_1$"...
Ricardo Cruz's user avatar
  • 3,420
16 votes

Why does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?

Remember that the GradientBoostingRegressor (assuming a squared error loss function) successively fits regression trees to the residuals of the previous stage. Now ...
Milad Shahidi's user avatar
14 votes
Accepted

Why SMOTE is not used in prize-winning Kaggle solutions?

After some debate on social networks and much asking, see the Twitter thread. The best answer that I can find is that it does not work. I would love to retract my answer and see a real-life example ...
Carlos Mougan's user avatar
7 votes
Accepted

How can I fill NaN values in a Pandas DataFrame in Python?

You can use the DataFrame.fillna function to fill the NaN values in your data. For example, assuming your data is in a DataFrame ...
timleathart's user avatar
  • 3,940
7 votes

Kaggle notebook Vs Google Colab

There are several rundowns between the two services like this one. Key for me: Only Kaggle supports R, only Colab supports SWIFT Colab is a Google product and is therefore optimized for Tensorflow ...
Fnguyen's user avatar
  • 1,743
7 votes

Why SMOTE is not used in prize-winning Kaggle solutions?

Somehow I missed this question... I can answer this as I have spent a great part of the last years trying to deal with imbalance inside and outside of Kaggle. Why SMOTE doesn't work? SMOTE creates ...
Lucas Morin's user avatar
  • 2,289
6 votes

Import data from google drive to Kaggle Kernel

Go to your Google Drive and right click the dataset you want to upload to Kaggle. Generate the shareable link and the code that comes after ...
Nicolas Essipova's user avatar
6 votes
Accepted

AUC ROC metric on a Kaggle competition

As you would have seen in the research, AUC ROC prioritizes getting the order of the predictions correct, rather than approximating the true frequencies. Usually, like in the credit card fraud ...
nigelhenry's user avatar
5 votes
Accepted

How will a rotation matrix affect contestants in machine learning contests?

Kaggle competitions with clean, anonymised and opaque numerical features are often popular. My opinion is they are popular because they are more universally accessible - all you need is to have ...
Neil Slater's user avatar
5 votes

What is the difference between public test and private test on Kaggle

"publictest" data is used to calculate the score for the public leaderboard while competition is running. After the competition is finished, competitors will be ranked on the data which was marked as ...
Antonio Jurić's user avatar
5 votes

Import data from google drive to Kaggle Kernel

Use gdown to directly download your google drive file into your session every time. The download speed is pretty high so it wont take much time. ...
Purusharth Verma's user avatar
4 votes

What is the difference between public test and private test on Kaggle

The privatetest data is needed because competitors can in principle overfit the publictest data. On Kaggle you are allowed to submit your scores multiple times and see your performance. By this ...
tomaz's user avatar
  • 161
4 votes
Accepted

Is numpy.corrcoef() enough to find correlation?

On a side note, I don't think correlation is the correct measure of relation for you to be using, since Survived is technically a binary categorical variable. "...
bradS's user avatar
  • 1,615
4 votes

Kaggle notebook Vs Google Colab

I have been frequently using both the platforms and could straightaway point a few differences: Kaggle gives NVIDIA Tesla P100 PCI based 16GB GPUS for approximately 9 straight hrs in a single commit, ...
thanatoz's user avatar
  • 2,425
3 votes

Why do we convert skewed data into a normal distribution

The skewed data here is being normalised by adding one(one added so that the zeros are being transformed to one as log of 0 is not defined) and taking natural log. The data can be nearly normalised ...
ahmedrajput's user avatar
3 votes

merge 2 dataframe with Memory Error

The problem is that when you merge two dataframes, you need enough memory for both of them, plus the merged one. There is a workaround from a stackoverflow answer What you can do is to read the first ...
Tasos's user avatar
  • 3,930
3 votes

Import data from google drive to Kaggle Kernel

Here's the solution that works every time and very efficiently. A) Case of file ...
Pascal Jr Tikeng Notsawo's user avatar
3 votes
Accepted

one-hot-encoding categorical data gives error

First of all, I noticed you have loaded the same dataframe for both train and test. Change the code like this: ...
Leevo's user avatar
  • 6,265
3 votes

one-hot-encoding categorical data gives error

Here is an approach using the encoders from sklearn ...
dustindorroh's user avatar
3 votes
Accepted

Dataset columns throwing KeyError

It's FireplaceQu not FirePlaceQu . A KeyError means it doesn't find the column in the dataset. to simply check the spelling you can print all the columns: ...
vico's user avatar
  • 148
3 votes

Should I perform cross validation only on the training set?

Chapter 5 of "Introduction to Statistical Learning" covers CV and bootstrap. I strongly recommend to read this chapter, since sampling methods are extremely relevant in practice. Cross validation (CV)...
Peter's user avatar
  • 7,526
3 votes

Is there any kaggle competition for finding the feature for affecting revenue?

Is there any kaggle competition out there doing EDA (Explotary data analysis) not prediction for finding the most significiant feature that affects the net_revenue or sales ? Although it is hard to ...
Neil Slater's user avatar
3 votes
Accepted

How do I read the cord_19_embeddings_2020-07-16.csv from the COVID-19 Open Research Dataset Challenge (CORD-19) on Kaggle?

So, after a lot of digging, I found something in the comment section. They are document embeddings. There is a github repo that specifies an API. Paper on arxiv Example usage of a similar approach ...
Tobias Kolb's user avatar
3 votes

Can data leakage be sometimes acceptable?

If you have the whole population and do not want to predict anything, as stated in the question link you gave, then it is fine to use the whole population for preprocessing as it will give better ...
spectre's user avatar
  • 2,115
3 votes

How to pose a non-trivial ML task for students?

Actually, scikit-learn has a build in make_classification where you can tune the amount of noise, classes etc. to create your own dataset Then it's just up to you, ...
CutePoison's user avatar
2 votes

Sklearn StratifiedKFold code explanation

A KFold split will take the data and split it however many times you designate. StratifiedKFold is used in order to ensure that your training and validation datasets each contain the same percentage ...
Hobbes's user avatar
  • 1,459
2 votes

What's cooking Kaggle - Improve model

But the problem of this dataset is that we have unbalanced data I think that the way to fix your problem is to use something like SMOTE or one of its variants. (My favorite is SMOTE-ENN, but go with ...
Ryan's user avatar
  • 722
2 votes

Can you recommend a machine learning challenge that is suitable for novices?

You've already answered yourself by tagging kaggle. Let me share the two competitions that I have every new hire in my team go through- and then have them keep ...
2 votes

Owen Zhang's slides: what does the "time" mean?

Here's my understanding: I think it's the explanation of page 10, and time is the same as the "time" in page 10, which means the time axis in real life. In page 10, it shows that: hold out data ...
Icyblade's user avatar
  • 4,336

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