Top "Dummy-variable" questions

Dummy or indicator variables are used to include categorical or qualitative variables or factors into a regression model in R programming language for statistical computing, bioinformatics, and graphics.

How to force R to use a specified factor level as reference in a regression?

How can I tell R to use a certain level as reference if I use binary explanatory variables in a …

r regression linear-regression categorical-data dummy-variable
Pandas: Get Dummies

I have the following dataframe: amount catcode cid cycle date di feccandid type 0 1000 E1600 N00029285 2014 2014-05-15 D H8TX22107 24…

python pandas dummy-variable
What are the pros and cons between get_dummies (Pandas) and OneHotEncoder (Scikit-learn)?

I'm learning different methods to convert categorical variables to numeric for machine-learning classifiers. I came across the pd.get_dummies …

python pandas machine-learning scikit-learn dummy-variable
Linear regression with dummy/categorical variables

I have a set of data. I have use pandas to convert them in a dummy and categorical variables respectively. …

python pandas linear-regression statsmodels dummy-variable
Keep same dummy variable in training and testing data

I am building a prediction model in python with two separate training and testing sets. The training data contains numerical …

python dataframe scikit-learn prediction dummy-variable
Dummy variables when not all categories are present

I have a set of dataframes where one of the columns contains a categorical variable. I'd like to convert it …

python pandas machine-learning dummy-variable
Handling unknown values for label encoding

How can I handle unknown values for label encoding in sk-learn? The label encoder will only blow up with an …

python pandas scikit-learn dummy-variable one-hot-encoding
How to create dummy variable columns for thousands of categories in Google BigQuery?

I have a simple table with 2 columns: UserID and Category, and each UserID can repeat with a few categories, like …

mysql sql google-bigquery dummy-variable
Mutating dummy variables in dplyr

I want to create 7 dummy variables -one for each day, using dplyr So far, I have managed to do it …

r dplyr dummy-variable
Regression of dummy variables in R

I am new to R and I am trying to performa regression on my dataset, which includes e.g. monthly …

r regression dummy-variable