1. Home
  2. Explore
  3. Mathematics
  4. Linear Algebra for Machine Learning

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Linear Algebra for Machine Learning

  • 60Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Vector Data
A basic way to organize information numerically for a computer is to represent it as a
.

60 questions

  1. 1
    A basic way to organize information numerically for a computer is to represent it as a
    _____
    .
    Hint

    Think of a one-dimensional arrangement of numbers.

    Answer

    vector

    Explanation

    A vector can serve as a computer-readable numerical representation of information such as an image, text, or a preference.

  2. 2
    In this talk, a vector is described as a
    _____
    .
    Hint

    It is a list-like arrangement with only one dimension.

    Answer

    one-dimensional array of numbers

    Explanation

    In this introduction, a vector is treated as a one-dimensional array whose entries are numbers.

  3. 3
    When represented geometrically as an arrow, a vector has a
    _____
    .
    Hint

    Consider the two properties conveyed by a directed arrow.

    Answer

    magnitude or a length and a direction

    Explanation

    A geometric way to think about a vector is as something with size and direction.

  4. 4
    The totality of vectors with three entries forms a three-dimensional
    _____
    .
    Hint

    The name combines the collection of vectors with the mathematical setting they occupy.

    Answer

    vector space

    Explanation

    The collection of all vectors with a fixed number of entries is called a vector space of that dimension.

  5. 5
    A vector whose entries represent characteristics such as a patient's height, weight, and age is a
    _____
    .
    Hint

    Its entries describe characteristics of something being studied.

    Answer

    feature vector

    Explanation

    A feature vector is a vector whose entries represent features of an object or other subject of interest.

  6. 6
    The totality of vectors representing features is sometimes called a
    _____
    .
    Hint

    It is the space containing the collection of feature vectors.

    Answer

    feature space

    Explanation

    Feature space is another term for the totality of vectors or feature vectors.

  7. 7
    A black-and-white image can be represented by assigning each pixel a value such as
    _____
    .
    Hint

    These two values can distinguish the two pixel states.

    Answer

    0 or 1

    Explanation

    A black-and-white image can be encoded by assigning a numerical value to each pixel, such as 0 or 1 for the two colors.

  8. 8
    In one grayscale image representation, each pixel receives a value
    _____
    .
    Hint

    The range has 256 possible integer values when both endpoints are included.

    Answer

    between 0 and 255

    Explanation

    A grayscale image can be represented numerically by giving each pixel a value in this range.

  9. 9
    One way to turn an image matrix into a vector is by
    _____
    .
    Hint

    Imagine unzipping the image matrix row by row.

    Answer

    stacking its rows vertically

    Explanation

    A matrix of pixel values can be turned into a one-dimensional array by placing its rows one after another.

  10. 10
    To represent a word such as “dog” using a collection of articles, one can
    _____
    .
    Hint

    Each document contributes a numerical entry based on the selected word.

    Answer

    count the number of times the word appears in each article

    Explanation

    A word can be represented by a vector whose entries are its counts in different documents.

  11. 11
    When representing a user's preferences for movies, the entries of a vector can be the user's
    _____
    .
    Hint

    These numerical values record a user's response to each movie or item.

    Answer

    ratings

    Explanation

    A user's ratings for items, or yes-or-no interaction indicators, can be assembled into a vector.

  12. 12
    A word in a vocabulary can be represented by a vector of zeros with one 1; this is called a
    _____
    .
    Hint

    The name refers to exactly one active entry in an otherwise zero-filled vector.

    Answer

    one-hot encodings

    Explanation

    A one-hot encoding assigns each item a vector containing zeros except for a single 1 that identifies that item.

  13. 13
    In mathematics, one-hot encodings are also known as
    _____
    .
    Hint

    This is the linear algebra name for vectors with a single 1 in a distinct position.

    Answer

    standard basis vectors

    Explanation

    In mathematics, one-hot encodings are also called standard basis vectors.

  14. 14
    A data representation with many zero entries has the drawback called
    _____
    .
    Hint

    Think of a representation with relatively few nonzero entries.

    Answer

    sparsity

    Explanation

    Sparsity describes representations containing many zero entries, as happens with one-hot encodings and many user-item data sets.

  15. 15
    If unknown ratings are replaced with a particular numerical value, the resulting user-item vectors may contain many
    _____
    .
    Hint

    These are often used as placeholders for unknown ratings in the example.

    Answer

    zeros

    Explanation

    If unknown user ratings are replaced with zeros, a large user-item data set can contain many zero entries.

  16. 16
    The linear algebra operation that multiplies corresponding vector entries and adds the results is the
    _____
    .
    Hint

    It combines pairwise multiplication with addition to compare two vectors.

    Answer

    dot product

    Explanation

    The dot product multiplies corresponding entries of two vectors and adds the products to produce a number.

  17. 17
    The number produced by a dot product can serve as a measure of vector
    _____
    .
    Hint

    It gives a numerical sense of how alike the vectors are.

    Answer

    similarity

    Explanation

    The resulting dot product can act as an indicator of how similar two vectors are.

  18. 18
    A geometric intuition for the dot product is that it measures
    _____
    .
    Hint

    Picture a flashlight projecting one arrow onto another arrow's direction.

    Answer

    a shadow of one vector onto the other

    Explanation

    Geometrically, the dot product is related to the length of one vector's shadow in the direction of the other; when the receiving vector has length 1, the shadow length is the dot product.

  19. 19
    The dot product of the one-hot encodings for “cat” and “tiger” is
    _____
    .
    Hint

    There are no positions where both distinct encodings have a 1.

    Answer

    0

    Explanation

    Different one-hot vectors have their 1s in different positions, so every pair of corresponding entries includes a zero and the dot product is zero.

  20. 20
    A drawback of one-hot encodings is that they may fail to represent
    _____
    between items.
    Hint

    The issue is that semantic similarity is not reflected by the encoding.

    Answer

    meaningful relationships

    Explanation

    One-hot encodings do not reflect semantic relationships: the dot product for “cat” and “tiger” is zero, just as it is for “cat” and “apple.”

  21. 21
    Replacing an original vector with a meaningful vector in a smaller-dimensional space is called a
    _____
    .
    Hint

    It is a lower-dimensional vector that stands in for the original.

    Answer

    vector embedding

    Explanation

    An embedding replaces an original vector with another vector in a smaller-dimensional space, ideally with a more meaningful representation.

  22. 22
    Compared with the original vector, an embedding lies in a
    _____
    .
    Hint

    The replacement vector has fewer entries and occupies a reduced space.

    Answer

    smaller dimensional vector space

    Explanation

    An embedding lies in a vector space with fewer dimensions than the space containing the original vector.

  23. 23
    A desired property of an embedding is that its lower-dimensional representation remains
    _____
    .
    Hint

    The goal is not simply to shorten the vector; the representation should preserve useful structure.

    Answer

    meaningful

    Explanation

    A useful embedding should not only be lower-dimensional but should also retain meaningful information about the data.

  24. 24
    A two-dimensional array of numbers is called a
    _____
    .
    Hint

    It has rows and columns of numerical entries.

    Answer

    matrix

    Explanation

    A matrix is a two-dimensional array of numbers, the next step up from a one-dimensional vector.

  25. 25
    A matrix can represent a
    _____
    that turns one vector into another.
    Hint

    It describes how an input vector is changed into an output vector.

    Answer

    transformation

    Explanation

    A matrix can represent a process that maps an input vector to another vector, for example by stretching, rotating, or scaling it.

  26. 26
    A matrix should be understood as transforming the
    _____
    according to its rules, rather than moving only one vector.
    Hint

    The matrix's rules apply to every vector in its domain, not just one.

    Answer

    entire vector space

    Explanation

    A matrix defines how all vectors in a space move, not only the one example vector to which it is applied.

  27. 27
    For two matrices to be multiplied,
    _____
    .
    Hint

    Compare the inner dimensions of the two matrices being multiplied.

    Answer

    the number of columns of the first matrix matches the number of rows of the second matrix

    Explanation

    This dimension requirement allows the entries to be combined in matrix multiplication.

  28. 28
    Besides matrix factorization, another method for producing a vector embedding is a
    _____
    .
    Hint

    This approach uses a learned computational model as a mapping.

    Answer

    neural network

    Explanation

    A neural network can take an original data vector as input and produce another vector as a candidate embedding.

  29. 29
    Under the hood, a neural network may contain many
    _____
    .
    Hint

    These are the linear algebra objects that appear inside the network.

    Answer

    matrices

    Explanation

    Looking inside a neural network reveals one or more matrices, along with other components beyond the scope of linear algebra.

  30. 30
    When compressing high-dimensional data into fewer dimensions, one must avoid losing too much
    _____
    .
    Hint

    This is what may be lost when data is compressed.

    Answer

    information

    Explanation

    Compression reduces dimensionality but can lose information, so it should be done carefully.

  31. 31
    A way to obtain lower-dimensional representations by expressing a matrix as a product of smaller matrices is
    _____
    .
    Hint

    It reverses matrix multiplication by finding component matrices whose product gives the original.

    Answer

    matrix factorization

    Explanation

    Matrix factorization expresses a matrix as a product of smaller matrices, which can provide lower-dimensional vector representations.

  32. 32
    Finding factors that multiply together to make a given number or matrix is called
    _____
    .
    Hint

    It is the reverse direction of multiplication.

    Answer

    factorization

    Explanation

    Factorization works backward from a product to find the factors that multiply to produce it.

  33. 33
    The fundamental matrix factorization named in the talk is the
    _____
    .
    Hint

    Its initials are SVD.

    Answer

    Singular Value Decomposition

    Explanation

    The Singular Value Decomposition, or SVD, is the named factorization described for matrices in the talk.

  34. 34
    In the SVD described, an nnn-by-mmm matrix is written as a product of
    _____
    .
    Hint

    Count the component factors in the decomposition.

    Answer

    three smaller matrices

    Explanation

    An nnn-by-mmm matrix can be expressed as a product of three smaller matrices through the SVD.

  35. 35
    In the SVD, the middle factor is a
    _____
    .
    Hint

    Its nonzero entries are arranged along the main diagonal.

    Answer

    diagonal matrix

    Explanation

    The middle matrix in the SVD has a special diagonal form.

  36. 36
    The property of vectors having length 1 and pairwise dot products of 0 is called
    _____
    .
    Hint

    This property combines unit length with pairwise dot products of zero.

    Answer

    orthonormality

    Explanation

    The rows or columns of the other factors have length 1 and are mutually perpendicular, a property called orthonormality.

  37. 37
    Candidate vector embeddings from a matrix factorization are taken from the
    _____
    of its matrices.
    Hint

    Look at the individual vector-like parts of the factor matrices.

    Answer

    rows or columns

    Explanation

    In the described approach, the rows or columns of the matrices in a factorization provide candidates for vector embeddings.

  38. 38
    Beyond machine learning, the SVD is used in fields such as
    _____
    .
    Hint

    The applications span data analysis, natural science, biology, and engineering.

    Answer

    statistics, physics, genomics, and robotics

    Explanation

    The SVD is used across many fields, including machine learning as well as statistics, physics, genomics, and robotics.

  39. 39
    The difficulty of factorization is an important basis for modern
    _____
    .
    Hint

    This field uses the difficulty of factoring as part of its security foundations.

    Answer

    cryptography

    Explanation

    The talk notes that modern cryptography relies on the difficulty of factorization, illustrating that factoring can be hard.

  40. 40
    In a user-by-movie matrix, the
    _____
    are indexed by people.
    Hint

    Rows are indexed by people in this example.

    Answer

    rows

    Explanation

    In a user-by-movie matrix, each row corresponds to a person or user.

  41. 41
    In a user-by-movie matrix, the
    _____
    are indexed by movies.
    Hint

    The other matrix dimension is indexed by items such as movies.

    Answer

    columns

    Explanation

    In a user-by-movie matrix, each column corresponds to a movie.

  42. 42
    In the example user-movie matrix, a check mark for a watched movie can be represented by
    _____
    .
    Hint

    It is the numerical version of a positive check mark.

    Answer

    1

    Explanation

    A check mark indicating that a user watched a movie can be represented as 1.

  43. 43
    An empty cell in the user-movie matrix can be represented by
    _____
    depending on the application.
    Hint

    The talk gives two possible numerical choices for an unwatched movie cell.

    Answer

    0 or negative numbers

    Explanation

    An empty cell can be represented as 0 or, depending on the application, with negative numbers.

  44. 44
    The naive vector representation for user number 3 is formed from the entries in the matrix's
    _____
    .
    Hint

    For user number 3, select the row corresponding to that person.

    Answer

    third row

    Explanation

    A user's initial representation is the vector formed by the entries of that user's row in the user-movie matrix.

  45. 45
    The naive vector representation for “Shrek” comes from the matrix's
    _____
    .
    Hint

    For a movie, use the column associated with that item.

    Answer

    third column

    Explanation

    A movie's initial representation is formed from the entries in its column; the example uses the column for “Shrek.”

  46. 46
    Hidden characteristics that a useful recommendation embedding can reveal are called
    _____
    .
    Hint

    These underlying characteristics are not directly labeled in the initial data representation.

    Answer

    latent features

    Explanation

    Latent features are hidden characteristics in the data, such as age brackets or whether movies are blockbusters or arthouse films.

  47. 47
    A vector space that captures hidden features in data is called a
    _____
    .
    Hint

    It is the space in which the hidden features are represented.

    Answer

    latent space

    Explanation

    The lower-dimensional space used to represent hidden characteristics is called a latent space.

  48. 48
    In the recommendation example, the product of the smaller matrices is intended to give back the original matrix
    _____
    .
    Hint

    The reconstructed matrix need not match the original perfectly.

    Answer

    approximately

    Explanation

    The example seeks smaller matrices whose product approximately reconstructs the original user-by-movie matrix.

  49. 49
    The eigenvector with the largest eigenvalue is called the
    _____
    of the data.
    Hint

    It is the leading direction identified by the largest scaling factor.

    Answer

    principal eigenvector

    Explanation

    The eigenvector associated with the largest eigenvalue points in the principal direction along which the data is clustered.

  50. 50
    A vector that does not change direction under a matrix transformation, though its size may change, is an
    _____
    .
    Hint

    It is a special vector whose direction is unchanged by a matrix transformation.

    Answer

    eigenvector

    Explanation

    An eigenvector of a transformation keeps its direction and is only scaled by the transformation.

  51. 51
    The scaling factor applied to an eigenvector is its
    _____
    .
    Hint

    It is the scalar associated with the stretching or shrinking of an eigenvector.

    Answer

    eigenvalue

    Explanation

    The eigenvalue is the amount by which the corresponding eigenvector is scaled.

  52. 52
    In data science and machine learning, eigenvectors can encode
    _____
    about data.
    Hint

    They reveal useful characteristics of the data being studied.

    Answer

    valuable information

    Explanation

    In data science and machine learning, eigenvectors can encode information about the structure of the data.

  53. 53
    Although data may live in a high-dimensional space, its points can cluster along
    _____
    .
    Hint

    The data may occupy a much smaller region than the ambient space suggests.

    Answer

    a line or some other small-dimensional space

    Explanation

    Data in a higher-dimensional space may cluster near a line or another lower-dimensional subspace.

  54. 54
    To organize data points in a matrix, each point is first treated as a
    _____
    .
    Hint

    A point in an mmm-dimensional space can be represented by an ordered numerical object.

    Answer

    vectors

    Explanation

    Each data point can be treated as a vector, with one entry for each dimension of the space in which it lives.

  55. 55
    Stacking the vector representations of data points produces a
    _____
    .
    Hint

    It is formed by arranging the data-point vectors together as rows or columns.

    Answer

    matrix

    Explanation

    Stacking the vectors for all data points produces a matrix containing the data.

  56. 56
    To find relevant eigenvectors for dimensionality reduction, one examines the eigenvectors of
    _____
    .
    Hint

    This construction makes a square matrix from the data matrix and its turned-around version.

    Answer

    the matrix multiplied by its transpose

    Explanation

    The data matrix is multiplied by its transpose to form a square matrix whose eigenvectors can be examined.

  57. 57
    One way to center the data points before analyzing them is by
    _____
    .
    Hint

    Centering adjusts each row relative to its average value.

    Answer

    subtracting off the mean of each row

    Explanation

    A statistical preprocessing step is to center the data by subtracting each row's mean.

  58. 58
    The principal direction is identified by the eigenvector whose scaling factor is the
    _____
    .
    Hint

    Choose the scaling factor that is greatest among the eigenvalues.

    Answer

    largest eigenvalue

    Explanation

    The eigenvector with the largest eigenvalue points along the direction in which the data is most strongly clustered in the example.

  59. 59
    The method associated with identifying principal directions of data is called
    _____
    .
    Hint

    This method is commonly abbreviated PCA.

    Answer

    principal component analysis

    Explanation

    The discussion of finding principal directions and reducing dimensions is called principal component analysis, or PCA.

  60. 60
    Finding a smaller space for relevant data
    _____
    in the data.
    Hint

    Consider the computational and interpretive benefits of using a smaller space.

    Answer

    increases efficiency, saves resources, and reveals relevant structure

    Explanation

    Working in a smaller space can make computation more efficient, conserve resources, and expose meaningful patterns in the data.

1 of 60
Question 1 of 60

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent