NEW
Font size
WorksheetsStats+Python ISA Test - Quiz 2
Total questions: 20
Worksheet time: 13mins
Q: Which of the following clustering algorithm is the most sensitive to outliers?
K-medians clustering algorithm
K-modes clustering algorithm
K-means clustering algorithm
K-medoids clustering algorithm
Q: Consider the image attached and write the code in python needed to create a dataframe that looks as this one?
DepartmentData=DataFrame({'DOJ': ['12-Mar-2020','2-Feb-2020','15-Jan-2020','23-Apr-2019','14-Sep-2019'],
'Dep': ['BI','QA','DEV','DEV','QA'],
'id': [101,102,103,104,105],
})
DepartmentData=pd.DataFrame({'DOJ': ['12-Mar-2020','2-Feb-2020','15-Jan-2020','23-Apr-2019','14-Sep-2019'],
'Dep': ['BI','QA','DEV','DEV','QA'],
'id': [101,102,103,104,105]
})
DepartmentData=pd.DataFrame({DOJ== ['12-Mar-2020','2-Feb-2020','15-Jan-2020','23-Apr-2019','14-Sep-2019'],
Dep==['BI','QA','DEV','DEV','QA'],
id== [101,102,103,104,105]
})
None of the above
Q: Which of the following should be imported from sklearn to measure the classification or model performance and accuracy?
metrics
Pandas
Numpy
MASS
Q: Consider the following image depicting association between price and age variable. What would you conclude from the output?
Positive correlation between variables
Negative correlation between variables
Zero correlation between variables
Cannot say
Q: Which of the following code computes or executes the best fit of the Linear regression model as listed below?
LREG.predict
plt.plot.fit
LREG.fit
RegModel.fit
Q: Let’s say, a “Linear regression” model perfectly fits the training data (train error is zero). Now, Which of the following statement is true?
You will always have test error zero
You can not have test error zero
Error may be zero, if there is no noise in the test data.
None of the above
Q: What is bootstrap sampling in statistics and machine learning?
It is a power option to reboot your final model
A library used to improve model accuracy in python
Drawing of sample data repeatedly with replacement, to estimate population parameter
Drawing of random samples into the population to estimate the best sample
Q: The following visualization shows the fit of three different models (in blue line) on same training data. What can you conclude from these visualizations?
1) The training error in first model is higher when compared to second and third model.
2) The best model for this regression problem is the last (third) model, because it has minimum training error.
3) The second model is more robust than first and third because it will perform better on unseen data.
4) The third model is overfitting data as compared to first and second model.
5) All models will perform same because we have not seen the test data.
1 and 3
1, 3 and 4
Only 5
1 and 2
Q: Below graphs show two fitted regression lines (A & B) on randomly generated data. Now, I want to find the sum of residuals in both cases A and B. What would it be?
Note:
1) Scale is same in both graphs for both axis.
2) X axis is independent variable and Y-axis is dependent variable.
A has higher than B
A has lower than B
Both have the same
None of these above
Q: Consider a linear regression problem, using R-squared value to measure goodness-of-fit. Having added another significant variable in the model results in?
A decrease in the r-squared value
A decrease in the adjusted-r-squared value
An increase in both the r-squared values
A decrease in both r-square and adjusted-r-squared values
Q: Which of the one is true about the presence of Heteroskedasticity in the model?
Linear Regression with constant error terms
Linear Regression with varying error terms
Linear Regression with zero error terms
None of the above
Q: Given that horizontal axis measures independent variable & vertical axis dependent variable, which of the following offsets, do we use in case of least square line fit?
Vertical offset
Perpendicular offset
Both but depend on situation
None of above
Q: In order to execute a bag of multiple decision trees, which of the following package is appropriate?
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import MultipleTreePlot
from sklearn.forest import RandomForestRegressor
from sklearn.ensemble import TreeBag
Q: Suppose the distribution of salaries in a company X has median $35,000, and 25th and 75th percentiles are $21,000 and $53,000 respectively.Would a person with Salary $1 be considered an Outlier?
Yes
No
More information is required
Not Applicable
Consider this graph which consists the method of plotting the explained variation as a function of the number of clusters and is used to determine the optimum number of clusters. What is it called?
Elbow Clusters
Elbow Curve
Elbow optimum
Elbow optimal clustering
Q: Consider 3 independent variables X1= Weight, X2 = Colour and X3 = Depth. For an imputation of missing values, which of the following should substitute for variable X2 ?
Mean value of X2
Mean value of X1
Mode value of X3
Mode value of X2
Q: Consider a student's dataset for an University. One of the variables in the data is 'Age' and based on its entries, suppose one wants to segregate the students in the following status as shown in the picture. What would you call this manipulation?
Boot Strapping
Machine Learning
Ordinal Mapping
Feature Engineering
Q: On performing a normalization or standardization on your data, which of the following impact applies on the data?
Outliers in the model are removed
Brings uniformity in the scale of your variables
Inverts the relationship between variables
None of the above
Q: Consider a set of variables X1 = Size, X2 = Rating, X3 = Religion, X4 = Gender, X5 = ParkingType, X6= Ranking, X7= Colour and X8 = Height. For which of these variables, is mapping of features applicable?
All of the above
Only X1, X2, X3 and X6
Only X1, X2 and X6
Only X3, X4, X5, X7 and X8
Q) Consider the distribution of a particular variable which follows the one as shown in the image. Which of the following would be applicable to justify the distribution?
A symmetric distribution with a mean μ = 0
A negatively skewed distribution
A positively skewed distribution
A negative and symmetric distribution with μ = 0
