• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 30 páginas
Examen

Data Science Exam 1 and II with Complete Solutions

Document preview thumbnail
Vista previa 3 fuera de 30 páginas

Data Science Exam 1 and II with Complete Solutions

Vista previa del contenido

Data Science Exam 1 and II with
Complete Solutions
A is a two-dimensional array of integer numbers 50000x50000; B is a one-dimensional
array of 30000 floating-point numbers; C is a floating-point number. Which of the
following operations are valid? (Check all that applies.)


Answers:

A+C

C*A.T

B*C

A/B - ANSWER-B*C
A+C
C*A.T

A NumPy array a contains both numbers and nans. Hows does the function
numpy.sort(a) with the default parameters handle the nans?


Answers:

The nans are moved to the end of the array.

The nans are moved to the beginning of the array.

The nans are discarded from the array.

The function raises an exception. - ANSWER-The nans are moved to the end of the
array.

Alice noticed that the scatter plot of variable Y vs variable X that she plotted as a part of
the exploratory data analysis, looks almost like a straight diagonal line. What statement
is Alice entitled to make, based on this observation?

Answers:
A change in X causes a change in Y.

X and Y are correlated.

,A change in Y causes a change in X.

A change in X causes a change in Y and a change in Y causes a change in X. -
ANSWER-X and Y are correlated.

Alice obtained a list of all elevators in NYC for the purpose of checking which part of the
city has most high-capacity elevators. She imported the list as a Pandas Frame and
learned that it has the following columns: Capacity; Date of last inspection; Elevation;
Building ZIP code; Building latitude; Building longitude; Building street address. About
80% of values in the "Building street address" and "Bulding ZIP code" columns are
missing. What is Alice's best policy for handling the missing values?


Answers:
Eliminate all rows with missing values.

Eliminate all columns with missing values.

Infer the street address from the longitude and latitude.

Replace all missing street addresses with some default value (say, "11 Wall Street"). -
ANSWER-Infer the street address from the longitude and latitude.

Alice uses BeautifulSoup to process an HTML document. She expects that the tag
<div>, that defines a certain division of the document (<div>...</div>), has an attribute
class, and would like to extract the class name. The division tag is in the variable
fragment. Which expression correctly obtains the class name and stores it in the
variable c?

Answers:
c=fragment.get("class")

c=div["class"]

if fragment.has_attr("class"): c=fragment["class"]

fragment.find(div="class") - ANSWER-if fragment.has_attr("class"): c=fragment["class"]

Alice uses BeautifulSoup to process an HTML document. She expects that the tag <p>,
that defines a paragraph within the document (<p>...</p>), has an attribute class, and
would like to extract the class name. The paragraph tag is in the variable fragment.
Which expression correctly obtains the class name and stores it in the variable c?


Answers:

, c=fragment["class"]

fragment.find(p="class")

if fragment.has_attr("class"): c=fragment["class"]

c=p["class"] - ANSWER-if fragment.has_attr("class"): c=fragment["class"]

Alice works for United Airlines (UA). She was asked to predict the overbooking of a
flight (True or False), based on the probability of a UA crew member needing to fly to
the same destination for another flight (one continuous variable in the range 0 through
1). Which models shall Alice use to make the prediction? (Check all that applies.)

Answers:
Linear regression

Ridge regression

Random forest classifier

Logistic regression - ANSWER-Random forest classifier
Logistic regression

An aircraft circles around an airport, waiting for a permission to land, staying at a
constant distance of 10 miles from the landing strip. What is the relationship between
the coordinates X and Y (or latitude and longitude) of the aircraft?


Answers:
They are correlated, but the correlation is not linear.

They are not correlated at all.

They are linearly correlated.

Not possible to tell. - ANSWER-They are correlated, but the correlation is not linear.

Array texmex contains the numbers of people crossing the border between Texas and
Mexico in both directions, by day. The number is positive if more people enter Texas
and negative if more people enter Mexico. Assuming that on day 0 the population of
Mexico was 0 and there is no way to enter Mexico other than from Texas, which
expression calculates the array that contains the total population of Mexico, by day?


Answers:
texmex.sum()

Información del documento

Subido en
22 de octubre de 2024
Número de páginas
30
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$12.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
CLOUNDLite
4.0
(131)
Vendido
665
Seguidores
389
Artículos
12415
Última venta
13 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes