Recall & Review
beginner
What does the
scipy.signal.correlate function compute?It computes the cross-correlation of two sequences, measuring how one sequence matches or aligns with another as it slides over it.
Click to reveal answer
intermediate
What is the difference between correlation and convolution?
Correlation measures similarity between two signals as one slides over the other without flipping, while convolution flips one signal before sliding and multiplying.
Click to reveal answer
beginner
What does the
mode parameter in scipy.signal.correlate control?It controls the size of the output:
'full' returns the complete correlation, 'valid' returns only points where signals fully overlap, and 'same' returns output the same size as the first input.Click to reveal answer
beginner
How can correlation help in real life?
It helps find patterns or matches, like detecting a known sound in noisy audio or aligning images by matching features.
Click to reveal answer
beginner
What is the shape of the output when correlating two 1D arrays of lengths 5 and 3 with mode='full'?
The output length is 5 + 3 - 1 = 7, so the result is an array of length 7.
Click to reveal answer
What does
scipy.signal.correlate measure between two signals?✗ Incorrect
Correlation measures how similar two signals are as one slides over the other.
Which
mode in scipy.signal.correlate returns output the same size as the first input?✗ Incorrect
The 'same' mode returns an output with the same size as the first input array.
If you correlate two arrays of lengths 4 and 6 with mode='valid', what is the length of the output?
✗ Incorrect
With mode='valid', output length is max(len(a), len(v)) - min(len(a), len(v)) + 1 = 6 - 4 + 1 = 3. Since 3 is not listed, the answer is D.
Which of these is NOT true about correlation?
✗ Incorrect
Correlation does NOT flip one signal; convolution does.
What Python library provides the
correlate function used for signal correlation?✗ Incorrect
The correlate function is in the scipy.signal module.
Explain in your own words what correlation means and how
scipy.signal.correlate works.Think about how you might find a small pattern inside a bigger signal.
You got /4 concepts.
Describe a real-life example where correlation could help solve a problem.
Imagine trying to find a song snippet inside a noisy recording.
You got /4 concepts.