FrancoSwiss
  • Member for 4 years, 3 months
  • Last seen more than 1 year ago
Is feature engineering still useful when using XGBoost?
15 votes

Let's define first Feature Engineering: Feature selection Feature extraction Adding features through domain expertise XGBoost does (1) for you. XGBoost does not do (2)/(3) for you. So you still ...

View answer
Should I oversample my validation data to get better F1 score and PRC?
6 votes

what you encounter are real-world problems rarely taught in classes. For training, I would test SKLearn's class_weight = "balanced" or class_weight={0:0.995, 1:0.005}. It's a very robust ...

View answer
How to impute Missing values not the usual way?
6 votes

A trick I have seen on Kaggle. Step 1: replace NAN with the mean or the median. The mean, if the data is normally distributed, otherwise the median. In my case, I have NANs in Age. Step 2: Add a ...

View answer
Ways to simulate weather data over several periods (Python or R)?
4 votes

What about creating a Pandas DataFrame and adding a new column such as "Temp_simulated" and simulate the temperature?

View answer
Why class weight is outperforming oversampling?
4 votes

Probably not the answer you're looking for, but don't go crazy! Different class weight strategies give different results. The follwing drove me almost crazy! The following should give the same ...

View answer
Handling outliers and Null values in Decision tree
4 votes

The answers above are fantastic. Additionally, what you could do is create a new column and label outliers as 1 (otherwise 0). This is a technique used in Kaggle competitions. The idea is to make it ...

View answer
What would I prefer - an over-fitted model or a less accurate model?
3 votes

Obviously the answer is highly subjective; in my case clearly the SECOND. Why? There's nothing worse than seeing a customer running a model in production and not performing as expected. I've had ...

View answer
Coursera's course "How to Win a Data Science Competition"
3 votes

It's a technically rigorous course. Recommend? It depends on what your goal is. Definitely, if your goal is to compete on Kaggle. Not really, if you want to improve practical ML. Remember, Kaggle ...

View answer
How many trees does a Random Forest need?
2 votes

My 2 cents: I'm fan of defying the max_leaf_nodes (in this example 5) and then visualizing it. I suggest starting at 3 and then increasing it slightly (the same applies for your Random Forest). In ...

View answer
Fastest way to relearn machine/deep learning
Accepted answer
2 votes

If you enjoy reading, that's probably the best ML/DL book ever.

View answer
Accuracy of the model
2 votes

Good that you raise the question because there's most likely a bug. I've done over 100 ML models and never seen test accuracy being higher than train accuracy. Potential bug? Most likely there are ...

View answer
Model biased towards low frequency data?
2 votes

With structured data, you have in general 4 challenges: (1) Missing data (2) Outliers (3) Cardinality (4) Rare values (as a rule of thumb <5%) Rare values in categorical variables tend to ...

View answer
Why is my test data accuracy higher than my training data?
Accepted answer
2 votes

I assume you're using structured data (numerical, categorical, nominal, ordinal..): - It's probably due to class imbalance. - If you use Scikit-Learn, you can add class_weight = "balanced" which ...

View answer
Feature Engineering
1 votes

@Nain, this is called a hard problem :) One possible solution is called "Engineering Mixed Variables." I've attached screenshot from a possible solution. Not everything out of fairness to ...

View answer
Machine Learning methods for finding outliers
1 votes

Detecting outliers is, unfortunately, more of an art than science. The famous statistician John Tukey proposed as IQR 1.5 as a “outlier”. Hence, the upper fence is 75% + (IQR 1.5). Here's the code in ...

View answer
Connect Tableau and KoBoToolbox
Accepted answer
1 votes

I see that Kobol offers a REST API. Thus, one could create WebDataConnector to fetch the data in Tableau. If that's an overkill, you could write a script in e.g. Python which extracts the data from ...

View answer
how to see decision tree when running in anaconda?
1 votes

Below is my code for visualizing a decision tree. Hope it helps.

View answer
How to improve accuracy of Named entity recognition (NER) tagger on local data?
1 votes

@Ravikm, excellent question. In Spacy, you can assign a word manually. For example, "Tesla" to ORG. Source: screenshot from Jose Portilla's NLP course on Udemy.

View answer
Combining Machine Learning classifier with NLTK Vader for Sentiment Analysis
1 votes

Interesting approach, but the whole purpose of NLTK Vader is to have a pre-trained model. After all, NLTK Vader was manually (!) labeled. I just tested Google vs. NLTK Vader on "I did not hate this ...

View answer
Logistic Regression doesn't predict for the entire test set
1 votes

OK, I see your point ... check this code snippet out you need to adapt it for your 'Titanic-Submission.csv' the number of predictions will be N = rows good luck! https://www.kaggle.com/...

View answer
A doubt about the GridSearchCV function in Sklearn?
1 votes

The probability that there's a mistake in SK-Learn is very low. Reasons: It's a mature library Among the contributors is Sebastian Raschka. Those guys are very meticulous. https://sebastianraschka....

View answer
Elements of Statistical Learning - question on p. 18
1 votes

Maybe this helps: On YouTube, there's a video with explanations for the main topics in Introduction to Statistical Learning (sorry, not for ELS). https://www.youtube.com/watch?v=3jQs02dbfrI

View answer
why One-Hot Encoder can avoid the situation that the model will misunderstand the data to be in some kind of order if the data has been Label Encoding
1 votes

Good question! This might help: Let's say you have three countries: USA, Germany, and China. No ranking. Label Encoding turns the countries into numbers. For example, 1 (USA),2 (Germany), and 3 (...

View answer
About 1M rows of data. Should I restrict myself to few columns as well?
Accepted answer
1 votes

Did you try it? In general, I believe the curse of dimensionality is way overrated. As a rule of thumb, the curse of dimensionality refers to having more columns than rows. I doubt that you have 1M ...

View answer
Best way to combine two similar document
1 votes

The Gensim NLP library is pretty strong and has a similarity API. Easy to install and test. https://radimrehurek.com/gensim/tut3.html#similarity-interface Good luck!

View answer
Automatically Remove highly correlated features using Variance Inflation Factor?
1 votes

I might oversimplify this, but Pandas allows to drop correlated features based on a threshold. E.g. correlation >0.95 https://chrisalbon.com/machine_learning/feature_selection/...

View answer
Installing skmca python package
Accepted answer
1 votes

Check their reference to the following page for PIP install: https://github.com/MaxHalford/Prince

View answer
How to match a user with another user based on their taste?
1 votes

As suggested, running a clustering algorithm such as k-Means probably works best. The algorithm can find hidden patterns in your dataset. For fun, I used your data to run a k-Means in Tableau (freely ...

View answer
Bad classification performance of logistic regression on imbalanced data in testing as compared to training
1 votes

I do the same dangerous approach. The DANGER is that we do Feature Selection with a non-linear model (Random Forest) and apply a linear model (Logistic Regression). Alternatives: - Try a tree-...

View answer
Dealing with a dataset with a mix of continuous and categorical variables
1 votes

To clarify, you mean mixed variables in one column? e.g. ABC123 If yes, you create two additional columns: one with categorical and one with numerical values. Afterward, you can encode them (one hot ...

View answer