Blog

MCQs

Disclaimer:

Educational Use Only:

The website links provided are to be used strictly for educational and knowledge-gaining purposes only.

No Misuse:

Do not misuse the links or the information contained therein for any commercial, illegal, or unethical activities.

Respect for Websites and Businesses:

Respect the intellectual property and business interests of the websites and their owners. Do not attempt to alter, copy, or redistribute content without proper authorization.

Acknowledge Value of Knowledge:

Recognize and value the knowledge and resources shared by these websites. Use the information responsibly and ethically.

No Endorsement:

The provision of these links does not imply endorsement of the linked sites, their content, or their products and services. Users are responsible for evaluating the suitability and accuracy of the information.

User Responsibility:

By accessing these links, you agree to use the information at your own risk and to comply with all applicable laws and website terms of use.


Overall MCQs for Reference

 

  1. Which date function converts a date string to a Python datetime object?
    a. strptime
    b. split
    c. join
    d. replace
    Answer: a. strptimeskillenai​
  2. What is a common technique for extracting month from a datetime feature in pandas?
    a. .day
    b. .hour
    c. .month
    d. .year
    Answer: c. .monthskillenai​
  3. Which function is used for resampling time series data to a different time frequency in pandas?
    a. dropna()
    b. resample()
    c. fillna()
    d. sort()
    Answer: b. resample()skillenai​
  4. In feature engineering, why is extracting day-of-week from timestamp important?
    a. It helps visualize missing data
    b. It enables capturing periodic patterns
    c. It increases model accuracy by default
    d. It changes data type
    Answer: b. It enables capturing periodic patternsmlexam​
  5. Which is a valid pandas function for time series rolling window calculations?
    a. rolling()
    b. grouping()
    c. aggregating()
    d. sorting()
    Answer: a. rolling()skillenai​
  6. What does ARIMA stand for in time series forecasting?
    a. Adaptive Randomized Interval Measuring Approach
    b. AutoRegressive Integrated Moving Average
    c. Actual Regression in Mean Algorithm
    d. Automated Return Integration Model
    Answer: b. AutoRegressive Integrated Moving Averagefreshersnow​
  7. Which function is commonly used for generating lagged date features?
    a. shift()
    b. slice()
    c. shape()
    d. drop()
    Answer: a. shift()skillenai​
  8. For seasonal feature extraction in time series, which attribute is commonly engineered?
    a. Month
    b. Color
    c. Shape
    d. Weight
    Answer: a. Monthmlexam​
  9. What type of machine learning task mainly utilizes date functions for prediction?
    a. Classification
    b. Clustering
    c. Time Series Forecasting
    d. Regression
    Answer: c. Time Series Forecastingfreshersnow​
  10. Which function is used to check if a date falls on a weekend in Python?
    a. .weekend()
    b. .isoweekday()
    c. .holiday()
    d. .weekday()
    Answer: d. .weekday()skillenai​
  11. How can time elapsed between two timestamps be calculated?
    a. Addition
    b. Subtraction
    c. Multiplication
    d. Modulo
    Answer: b. Subtractionskillenai​
  12. Which library provides advanced time series processing in Python?
    a. numpy
    b. pandas
    c. statsmodels
    d. scikit-learn
    Answer: c. statsmodelsfreshersnow​
  13. What is the result type of pandas to_datetime() function?
    a. Integer
    b. Float
    c. Datetime
    d. String
    Answer: c. Datetimeskillenai​
  14. The “strftime” function is used to:
    a. Format a datetime object as a string
    b. Change time zones
    c. Aggregate features
    d. Drop missing values
    Answer: a. Format a datetime object as a stringskillenai​
  15. What date part is useful to extract for detecting yearly seasonality?
    a. Hour
    b. Day
    c. Month
    d. Second
    Answer: c. Monthmlexam​
  16. When engineering holiday features, which function is commonly used?
    a. is_holiday()
    b. bool()
    c. holidays()
    d. date_of()
    Answer: c. holidays()mlexam​
  17. What is “epoch time”?
    a. Machine learning phase
    b. Starting time in Unix timestamp format
    c. Tensor initialization
    d. Model training
    Answer: b. Starting time in Unix timestamp formatskillenai​
  18. Which pandas frequency string represents quarterly data?
    a. ‘D’
    b. ‘M’
    c. ‘Q’
    d. ‘Y’
    Answer: c. ‘Q’skillenai​
  19. What does the pandas dt accessor enable?
    a. Data cleaning
    b. Date part extraction
    c. Model training
    d. Data normalization
    Answer: b. Date part extractionskillenai​
  20. For hourly aggregation, what pandas string should be used with resample()?
    a. ‘T’
    b. ‘H’
    c. ‘D’
    d. ‘M’
    Answer: b. ‘H’skillenai​
  21. Which feature is best suited for capturing trends in time series data?
    a. Random value
    b. Date index
    c. Group ID
    d. Static code
    Answer: b. Date indexmlexam​
  22. Pandas method for date range creation is:
    a. date_series()
    b. date_range()
    c. date_line()
    d. date_make()
    Answer: b. date_range()skillenai​
  23. What function is used to round dates to the nearest period?
    a. round_period()
    b. floor()
    c. ceil()
    d. round()
    Answer: b. floor()skillenai​
  24. Which function gets the difference in seconds between two datetimes in Python?
    a. nanoseconds()
    b. seconds()
    c. days()
    d. microseconds()
    Answer: b. seconds()skillenai​
  25. What is the main use of lag features in time series?
    a. Model complexity increase
    b. Overfitting enhancement
    c. Capturing temporal dependencies
    d. Data normalization
    Answer: c. Capturing temporal dependenciesfreshersnow​
  26. Which package is widely used for calendar feature engineering in ML?
    a. numpy
    b. pandas
    c. calendra
    d. statsmodels
    Answer: c. calendramlexam​
  27. What method removes timezone information from datetime in pandas?
    a. tz_localize(None)
    b. drop_timezone()
    c. unset_TZ()
    d. remove_tz()
    Answer: a. tz_localize(None)skillenai​
  28. A rolling mean applied to time series data helps:
    a. Model variance
    b. Detect anomalies
    c. Smooth fluctuations
    d. Remove outliers
    Answer: c. Smooth fluctuationsskillenai​
  29. What does “seasonality” refer to in time series?
    a. Random changes
    b. Cyclical patterns
    c. Long-term drift
    d. Data loss
    Answer: b. Cyclical patternsfreshersnow​
  30. Which function is used to convert Unix timestamp to datetime in pandas?
    a. to_datetime()
    b. from_timestamp()
    c. unix_time()
    d. to_timestamp()
    Answer: a. to_datetime()skillenai​
  31. To split a datetime into date and time, use:
    a. split_time()
    b. time_part()
    c. .date and .time
    d. datetime_split()
    Answer: c. .date and .timeskillenai​
  32. What is the advantage of encoding cyclical date features (e.g., month) for ML models?
    a. Improves missing value handling
    b. Allows models to understand cyclic nature
    c. Reduces data size
    d. None
    Answer: b. Allows models to understand cyclic naturemlexam​
  33. Which attribute in pandas datetime gets day of year?
    a. .day
    b. .dayofyear
    c. .dayofmonth
    d. .yearday
    Answer: b. .dayofyearskillenai​
  34. What does “resampling” mean in the context of time series data?
    a. Changing sampling frequency
    b. Modifying column order
    c. Removing duplicates
    d. Imputing nulls
    Answer: a. Changing sampling frequencyskillenai​
  35. Which function parses a string into a datetime in Python?
    a. datetime.strptime()
    b. int()
    c. join()
    d. to_string()
    Answer: a. datetime.strptime()skillenai​
  36. What is the pandas accessor for extracting day names from datetime?
    a. .weekday
    b. .dayofweek
    c. .day_name()
    d. .daylabel()
    Answer: c. .day_name()skillenai​
  37. What does the term “timestamp” signify in ML data processing?
    a. Object ID
    b. Unique location
    c. Point-in-time value
    d. Primary key
    Answer: c. Point-in-time valueskillenai​
  38. Which pandas function rolls dates forward to the nearest business day?
    a. bdate_range()
    b. business_shift()
    c. rollforward()
    d. nearest_bday()
    Answer: a. bdate_range()skillenai​
  39. Feature engineering for time series often includes:
    a. Extracting date parts
    b. Adding noise
    c. Dropping all dates
    d. Joining databases
    Answer: a. Extracting date partsmlexam​
  40. Which date function returns the number of days between two dates?
    a. days_between()
    b. timedelta.days
    c. days_delta()
    d. diff_days()
    Answer: b. timedelta.daysskillenai​
  41. What property returns whether a pandas timestamp is at month end?
    a. .is_month_end
    b. .at_month_end
    c. .monthend()
    d. .month_end()
    Answer: a. .is_month_endskillenai​
  42. For outlier detection in temporal data, which method is commonly used?
    a. Z-score
    b. Time elapsed
    c. Date length
    d. Time division
    Answer: a. Z-scoremlexam​
  43. What does “datetime indexing” enable in ML?
    a. Faster searching
    b. Efficient slicing and filtering
    c. Visualization improvement
    d. All of the above
    Answer: d. All of the abovemlexam​
  44. Which pandas method converts string column to datetime?
    a. datetime_column()
    b. to_datetime()
    c. string_to_date()
    d. convert_date()
    Answer: b. to_datetime()skillenai​
  45. Why is handling timezone important for global ML models?
    a. Affects data consistency across regions
    b. Increases storage
    c. Slows models
    d. Adds missing values
    Answer: a. Affects data consistency across regionsskillenai​
  46. What function extracts the week number from a datetime object?
    a. week_num
    b. isocalendar().week
    c. week_number()
    d. week()
    Answer: b. isocalendar().weekskillenai​
  47. Which function returns the quarter for a pandas datetime?
    a. .month
    b. .quarter
    c. .year
    d. .season
    Answer: b. .quarterskillenai​
  48. What is one-hot encoding used for with date features in ML?
    a. Categorical variable representation
    b. Adding noise
    c. Reducing accuracy
    d. Dropping columns
    Answer: a. Categorical variable representationmlexam​
  49. Which ML model type is most associated with using time lags?
    a. Decision tree
    b. Random forest
    c. Recurrent neural network
    d. KNN
    Answer: c. Recurrent neural networkfreshersnow​
  50. When engineering date-related features, what is a potential pitfall?
    a. Overfitting due to high cardinality
    b. Improved prediction
    c. Increased scalability
    d. Enhanced explainability
    Answer: a. Overfitting due to high cardinalitymlexam​

 

  1. https://skillenai.com/external-post/30-mcqs-on-python-date-and-time-handling/
  2. https://www.mlexam.com/feature-engineering/
  3. https://www.freshersnow.com/machine-learning-mcqs-and-answers-with-explanation/
  4. https://www.sanfoundry.com/1000-machine-learning-questions-answers/
  5. https://interviewkickstart.com/blogs/articles/machine-learning-mcqs-answers
  6. https://aticleworld.com/machine-learning-mcq/
  7. https://www.gyansetu.in/blog/60-deep-learning-objective-type-quiz-mcqs-with-answers-for-interview-preparation/
  8. https://testbook.com/objective-questions/mcq-on-process-scheduling–5eea6a1539140f30f369f35c
  9. https://www.youtube.com/watch?v=FugpqOEPuBg
  10. https://technicalblog.in/languagewise-mcqs/artificial-intelligence/mcqs-on-machine-learning/
  11. https://www.gyansetu.in/blog/machine-learning-mcq-interview-preparation/
  12. https://www.interviewbit.com/machine-learning-mcq/
  13. https://www.cloudskillsboost.google/course_templates/11/quizzes/437493?locale=uk
  14. https://www.cliffsnotes.com/study-notes/19783961
  15. https://www.igmguru.com/blog/machine-learning-mcqs
  16. https://easyexamnotes.com/feature-extraction-selection-concepts-and-algorithms-mcqs/
  17. https://www.geeksforgeeks.org/quizzes/machine-learning-quiz-questions-and-answers/
  18. https://www.geeksforgeeks.org/questions/what-is-the-purpose-of-feature-engineering-in-machine/
  19. https://futureskillsacademy.com/blog/top-machine-learning-mcqs-with-answers/

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!