Quiz 2 questions

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

True

In an optimization problem, if there are no other constraints for each variable except for the objective function, then it is called an unconstrained optimization problem. Otherwise, it is called a constrained optimization problem. Select one: True False

d

In numpy, If a = np.arange(12).reshape(4, 3), b = np.linspace(3, 27, 9).reshape(3, 3), which function can we use to merge a and b by rows? a. np.join((a, b), axis=1) b. np.merge((a, b), axis=0) c. a+b d. np.concatenate((a,b), axis=0)

a

() describes how closely the observed data match the distribution expected under the null hypothesis of that statistical test a. A test statistic b. EM c. Gradient descent method d. Maximum likelihood method

b,c

() use the first-order gradient to calculate the extremum point. a. Newton's Method b. Gradient Descent c. Conjugate Gradient d. Linear method

b,c

A is a 4 x 2 matrix, B is a 2 x 4 matrix and C is a 3 x 3 matrix. Which of the following operations are valid? a. CB b. AB c. BA d. AC

True

A matrix can be regarded as a combination of many vectors. Select one: True False

True

AI is closely related to disciplines such as linear algebra and probability theory. Select one: True False

b

For an identity matrix, all diagonal elements must be ()? a. 2 b. 1 c. 0 d. -1

a

If A = np.array([ [3,4],[7,8] ]), then we use scipy.linalg.eig(A), how many eigenvalues can we get? a. 2 b. 4 c. 3 d. 1

a

If a = np.array([ [1, 2], [3, 4] ]), what a[ [0, 1], [1, 0] ] will be? a. [2, 3] b. [1, 3] c. [1, 4] d. [2, 4]

d

If we use a pair of braces {} to create an empty data, will it be () ? a. A list b. A set c. A tuple d. A dictionary

c

If we want to get the process ID (PID) of the calling process, which module can we use? a. Time module b. Sys module c. Os module d. Io module

d

If we want to plot the frequency of data, which plot is the best choice? a. Scatter plot b. Line plot c. Bar plot d. Histogram plot

d

In a python list: List1 = [1, 2, 3, 4], we can get the element 2 by (). a. List1[2] b. List1[3] c. List1[0] d. List1[1]

a,c

Multiple solution qn: () use the first-order gradient to calculate the extremum point. a. Conjugate Gradient b. Newton's Method c. Gradient Descent

True

The eigenvalues and eigenvectors are very important to the matrix. Using some of the eigenvalues and corresponding eigenvectors of the matrix, we can compress the image. Select one: True False

False

The mean does not reacted as much as the mean by outliers. This property is known as 'robustness'. Select one: True False

True

The mean value in normal distribution determines the symmetry axis of distribution curve. Select one: True False

a,b,c,d

There are multiple ways to pass data to a function, which are (). a. arbitrary positional arguments b. default arguments c. positional arguments d. keyword arguments

False

Tuples are mutable sequences, typically used to store collections of heterogeneous data. Select one: True False

d

We can use _____ function to check the documentation of modules, functions, classes, keywords etc. in python. a. dir() b. type() c. del() d. help()

b

We can use np.std method to get (). a. Median b. Standard deviation c. Variance d. Mean

b,c

We can use scipy.linalg method to obtain the ____ of a matrix.(also finds determinant and the singular value decomposition svd) a. Eigenvector b. Eigenvalue c. Inverse matrix d. Transpose

a

We can use scipy.stats.binom method to generate () distribution. a. Binomial b. Poisson c. Normal d. Bayes

a,b,c,d

Which fields can python be applied? a. Artificial intelligence b. Data science c. Cloud computing d. Web crawler

a,b,c,d

Which functions in pandas can we use when working with missing data? a. isnull() b. fillna() c. isna() d. dropna()

a

Which is not python data types? a. Void b. Complex c. Dictionary d. String

a,c

Which of the following conditions must be met during random tests? a. Each experiment has more than one possible result and all the possible results can be specified in advance. b. None of the results can be specified in advance. c. Random experiments can be repeated under the same conditions. d. The results of the repeated tests were random.

d

Which of the following criteria must be followed when two matrices are multiplied? a. The number of columns in the left matrix must be equal to the number of columns in the right matrix. b. The number of rows in the left matrix must be equal to the number of rows in the right matrix. c. The number of rows in the left matrix must be equal to the number of columns in the right matrix. d. The number of columns in the left matrix must be equal to the number of rows in the right matrix.

a,b,c,d

Which of the following operations can be performed on a matrix? a. Inversion b. Addition c. Subtraction d. Transposition

b,c,d

Which of the followings are python features? a. Low performance b. Object-oriented c. Simple syntax d. Third-party packages

d

Which statement do we use to catch errors or exceptions in python? a. If-elif-else statement b. Assert statement c. For statement d. Try-except statement

c

Which symbol do we use for Python decorator? a. & b. # c. @ d. *


Ensembles d'études connexes

Cause and Effects of the Red Scare Chapter 13, Post WWI, the Red Scare: Chapter 13

View Set

Select Non-Metals: Facts about Hydrogen

View Set

An organism is forced to interact with its environment (including both biotic and abiotic factors) on a daily basis. Discuss the numerous ways that the environment can affect your health from a genetics perspective. Wherever possible, use specific example

View Set

Unit 4: Foundations of Psychiatric Nursing

View Set