6. If we use a numeric predictor in a Naive Bayes model, and set the useKernelEs
ID: 2927730 • Letter: 6
Question
6. If we use a numeric predictor in a Naive Bayes model, and set the useKernelEstimator to False (the default setting), what will be used to estimate the effect of the numeric predictor?
a localized regression around each value of the numeric predictor
the numeric predictor will be converted into a discrete attribute so it can be used
the mean and standard deviation of the numeric predictor within each class, with density serving as probability
7. LinearRegression only works with numeric predictors. If we a nominal (categorical) predictor with 3 values (e.g. married, single, other), we can use this in LinearRegression by converting it to
2 indicator variables
3 indicator variables
a numeric variable, e.g. 1=single, 2=married, 3=other
Explanation / Answer
We are allowed to do 1 question at a time. Post again for second question.
7. LinearRegression only works with numeric predictors. If we a nominal (categorical) predictor with 3 values (e.g. married, single, other), we can use this in LinearRegression by converting it to
Ans: Categorical variables refer to the variables in your data that take on categorical values, variables such as sex, group, and region. Factor variables refer to Stata’s treatment of categorical variables. Factor variables create indicator variables for the levels (categories) of categorical variables and, optionally, for their interactions. In what follows, the word level means the value that a categorical variable takes on. The variable sex might take on levels 0 and 1, with 0 representing male and 1 representing female. We could say that sex is a two-level factor variable. The regressors created by factor variables are called indicators or, more explicitly, virtual indicator variables. They are called virtual because the machinery for factor variables seldom creates new variables in your dataset, even though the indicators will appear just as if they were variables in your estimation results.
So, here we use
3 indicator variables
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.