Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages
Filter by Categories
nmims post
Objective Type Set
Online MCQ Assignment
Question Solution
Solved Question
Uncategorized

Multiple choice question for engineering

Set 1

1. Which of the following is used to compute the percent change over a given number of periods ?
a) pct_change
b) percent_change
c) per_change
d) none of the Mentioned

View Answer

Answer: a [Reason:] Series, DataFrame, and Panel all have a method pct_change.

2. Point out the correct statement:
a) Pandas represents timestamps in microsecond resolution
b) Pandas is 100% thread safe
c) For Series and DataFrame objects, var normalizes by N-1 to produce unbiased estimates
d) All of the Mentioned

View Answer

Answer: c [Reason:] Pandas represents timestamps in nanosecond resolution.

3. Which of the following object has a method cov to compute covariance between series ?
a) Series
b) DataFrame
c) Panel
d) None of the Mentioned

View Answer

Answer: a [Reason:] DataFrame has a method cov to compute pairwise covariances among the series in the DataFrame, also excluding NA/null values.

4. Which of the following specifies the required minimum number of observations for each column pair in order to have a valid result ?
a) min_periods
b) max_periods
c) minimum_periods
d) all of the Mentioned

View Answer

Answer: a [Reason:] DataFrame.cov also supports an optional min_periods.

5. Point out the wrong statement:
a) lxml is very fast
b) lxml requires Cython to install correctly
c) lxml does not make any guarantees about the results of it’s parse
d) none of the Mentioned

View Answer

Answer: c [Reason:] There are some versioning issues surrounding the libraries that are used to parse HTML tables in the top-level pandas io function read_html.

6. Which of the following is implemented on DataFrame to compute the correlation between like-labeled Series contained in different DataFrame objects ?
a) corrwith
b) corwith
c) corwit
d) none of the Mentioned

View Answer

Answer: a [Reason:] A score close to 1 means their tastes are very similar.

7. rolling_count function gives number of non-null observations.
a) True
b) False

View Answer

Answer: b [Reason:] The binary operators take two Series or DataFrames.

8. Which of the following method produces a data ranking with ties being assigned the mean of the ranks for the group ?
a) rank
b) dense_rank
c) partition_rank
d) none of the Mentioned

View Answer

Answer: a [Reason:] rank is also a DataFrame method.

9. Which of the following can potentially change the dtype of a Series ?
a) reindex_like
b) index_like
c) itime_like
d) none of the Mentioned

View Answer

Answer: a [Reason:] reindex_like silently inserts NaNs and the dtype changes accordingly.

10. cov and corr supports the optional min_periods keyword.
a) True
b) False

View Answer

Answer: a [Reason:] Non-numeric columns will be automatically excluded from the correlation calculation.

Set 2

1. Which of the following is correct use of cross validation ?
a) Selecting variables to include in a model
b) Comparing predictors
c) Selecting parameters in prediction function
d) All of the Mentioned

View Answer

Answer: d [Reason:] Cross validation is also used to pick type of prediction function to be used.

2. Point out the wrong combination:
a) True negative=correctlty rejected
b) False negative=incorrectlty rejected
c) False positive=correctly identified
d) All of the Mentioned

View Answer

Answer: c [Reason:] False positive means incorrectly identified.

3. Which of the following is common error measure ?
a) Sensitivity
b) Median absolute deviation
c) Specificity
d) All of the Mentioned

View Answer

Answer: d [Reason:] Sensitivity and specificity are statistical measures of the performance of a binary classification test, also known in statistics as classification function.

4. Which of the following is not a machine learning algorithm ?
a) SVG
b) SVM
c) Random forest
d) None of the Mentioned

View Answer

Answer: a [Reason:] SVM stands for scalable vector machine.

5. Point out the wrong statement:
a) ROC curve stands for receiver operating characteristic
b) Fore time series,data must be in chunks
c) Random sampling must be done with replacement
d) None of the Mentioned

View Answer

Answer: d [Reason:] Random sampling with replacement is the bootstrap.

6. Which of the following is a categorical outcome ?
a) RMSE
b) RSquared
c) Accuracy
d) All of the Mentioned

View Answer

Answer: c [Reason:] RMSE stands for Root Mean Squared Error.

7. For k cross validation,larger k value implies more bias.
a) True
b) False

View Answer

Answer: b [Reason:] For k cross validation,larger k value implies less bias.

8. Which of the following method is used for trainControl resampling ?
a) repeatedcv
b) svm
c) bag32
d) none of the Mentioned

View Answer

Answer: a [Reason:] repeatedcv stands for repeated cross validation.

9. Which of the following can be used to create the most common graph types ?
a) qplot
b) quickplot
c) plot
d) all of the Mentioned

View Answer

Answer: a [Reason:] qplot() is short for quick plot.

10. For k cross validation,smaller k value implies less variance.
a) True
b) False

View Answer

Answer: a [Reason:] Larger k value implies more variance.

Set 3

1. Which of the following project is used for calling R products from web ?
a) OpenCPU
b) OpenDisk
c) OpenMem
d) All of the Mentioned

View Answer

Answer: a [Reason:] OpenCPU is complementary to OpenCPU.

2. Point out the wrong statement:
a) Shiny is platform for creating interactive programs embedded in to web page
b) Shiny is invented by R folks
c) Time required to create data products using shiny is more
d) All of the Mentioned

View Answer

Answer: c [Reason:] Time to create data products is less using shiny.

3. Which of the following statement will install shiny ?
a) install.packages(“shiny”)
b) install.library(“shiny”)
c) install.lib(“shiny”)
d) all of the Mentioned

View Answer

Answer: a [Reason:] Shiny applications are automatically “live” in the same way that spreadsheets are live.

4. Which of the following can be done by shiny ?
a) Tabbed main panels
b) Editable data tables
c) Dynamic UI
d) All of the Mentioned

View Answer

Answer: d [Reason:] shiny allows users to upload files.

5. Point out the correct statement:
a) shiny project is a directory containing at least three parts
b) shiny project is a file containing at least three parts
c) shiny project consist is a directory containing only one part
d) none of the Mentioned

View Answer

Answer: d [Reason:] shiny project consist is a directory containing at least two parts.

6. Which of the following function can interrupt execution and can be called continuously ?
a) browser()
b) browse()
c) search()
d) all of the Mentioned

View Answer

Answer: a [Reason:] Debugging shiny apps can be difficult.

7. runApp() will run the shiny and open the browser window.
a) True
b) False

View Answer

Answer: a [Reason:] The chart is rendered within the browser using Flash.

8. Which of the following function is for single checkbox widget ?
a) checkboxInput
b) dateInput
c) singleboxInput
d) all of the Mentioned

View Answer

Answer: a [Reason:] Shiny comes with a family of pre-built widgets, each created with a transparently named R function.

9. How many components are involved in shiny ?
a) 3
b) 4
c) 5
d) none of the Mentioned

View Answer

Answer: d [Reason:] Shiny apps have two components:user-interface script and server script.

10. All of the styled elements are handled through server.R.
a) True
b) False

View Answer

Answer: b [Reason:] All of the styled elements are handled through ui.R.

Set 4

1. Which of the following is the base layer for all of the sparse indexed data structures ?
a) SArray
b) SparseArray
c) PyArray
d) None of the Mentioned

View Answer

Answer: b [Reason:] SparseArray is a 1-dimensional ndarray-like object storing only values distinct from the fill_value.

2. Point out the correct statement:
a) All of the standard pandas data structures have a to_sparse method
b) Any sparse object can be converted back to the standard dense form by calling to_dense
c) The sparse objects exist for memory efficiency reasons
d) All of the Mentioned

View Answer

Answer: d [Reason:] The to_sparse method takes a kind argument and a fill_value.

3. Which of the following is not a indexed object ?
a) SparseSeries
b) SparseDataFrame
c) SparsePanel
d) None of the Mentioned

View Answer

Answer: d [Reason:] SparseArray can be converted back to a regular ndarray by calling to_dense.

4. Which of the following list-like data structure is used for managing a dynamic collection of SparseArrays ?
a) SparseList
b) GeoList
c) SparseSeries
d) All of the Mentioned

View Answer

Answer: a [Reason:] To create one, simply call the SparseList constructor with a fill_value.

5. Point out the wrong statement:
a) to_array. append can accept scalar values or any 2-dimensional sequence
b) Two kinds of SparseIndex are implemented
c) The integer format keeps an arrays of all of the locations where the data are not equal to the fill value
d) None of the Mentioned

View Answer

Answer: a [Reason:] to_array. append can accept scalar values or any 1-dimensional sequence.

6. Which of the following method is used for transforming a SparseSeries indexed by a MultiIndex to a scipy.sparse.coo_matrix ?
a) SparseSeries.to_coo()
b) Series.to_coo()
c) SparseSeries.to_cooser()
d) None of the Mentioned

View Answer

Answer: a [Reason:] Experimental api to transform between sparse pandas and scipy.sparse structures.

7. The integer format tracks only the locations and sizes of blocks of data.
a) True
b) False

View Answer

Answer: b [Reason:] The block format tracks only the locations and sizes of blocks of data.

8. Which of the following is used for testing for membership in the list of column names ?
a) in
b) out
c) elseif
d) none of the Mentioned

View Answer

Answer: a [Reason:] For DataFrames, likewise, in applies to the column axis.

9. Which of the following indexing capabilities is used as a concise means of selecting data from a pandas object ?
a) In
b) ix
c) ipy
d) none of the Mentioned

View Answer

Answer: b [Reason:] ix and reindex are 100% equivalent.

10. Pandas follows the NumPy convention of raising an error when you try to convert something to a bool.
a) True
b) False

View Answer

Answer: a [Reason:] This happens in a if or when using the boolean operations, and, or, or not.

Set 5

1. Which of the following graphs has properties in the below figure ?
data-science-questions-answers-exploratory-graphs-q1
a) Exploratory
b) Inferential
c) Causal
d) None of the Mentioned

View Answer

Answer: a [Reason:] Making plots of the data reveals various interesting features.

2. Which of the following dimension type graph is shown in the below figure ?
data-science-questions-answers-exploratory-graphs-q2
a) one-dimensional
b) two-dimensional
c) three-dimensional
d) none of the Mentioned

View Answer

Answer: b [Reason:] A two-dimensional graph is a set of points in two-dimensional space.

3. Which of the following gave rise to need of graphs in data analysis ?
a) Data visualization
b) Communicating results
c) Decision making
d) All of the Mentioned

View Answer

Answer: d [Reason:] A picture can tell better story than data.

4. Which of the following is characteristic of exploratory graph ?
a) Made Slowly
b) Axes are not cleaned up
c) Color is used for personal information
d) All of the Mentioned

View Answer

Answer: c [Reason:] A large number of exploratory graphs are made.

5. Point out the correct statement:
a) coplots are one dimensional data graph
b) Exploratory graphs are made quickly
c) Exploratory graphs are made relatively less in number
d) All of the Mentioned

View Answer

Answer: a [Reason:] coplot is used for two dimensional representation.

6. Which of the following graph can be used for simple summarization of data ?
a) Scatterplot
b) Overlaying
c) Barplot
d) All of the Mentioned

View Answer

Answer: c [Reason:] A bar chart or bar graph is a chart that presents Grouped data with rectangular bars with lengths proportional to the values that they represent.

7. Color and shape are used to add dimensions to graph data.
a) True
b) False

View Answer

Answer: a [Reason:] Graphs are commonly used by print and electronic media.

8. Which of the following information is not given by five-number summary ?
a) Mean
b) Median
c) Mode
d) All of the mentioned

View Answer

Answer: c [Reason:] The mode is the value that appears most often in a set of data.

9. Which of the following is also referred to as overlayed 1D plot ?
a) lattice
b) barplot
c) gplot
d) all of the Mentioned

View Answer

Answer: a [Reason:] lattice is an add-on package that implements Trellis graphics.

10. Spinning plots can be used for two dimensional data.
a) True
b) False

View Answer

Answer: a [Reason:] There are many ways to create 3D spinning plot as well.