AI glossary: terms starting with N

27 terms starting with N, each defined the way the lesson that teaches it uses it, with a link to every lesson where it appears.

__name__

A module's name; "__main__" for the file being run. if __name__ == "__main__": guards the lines that should run only when the file is run.

namespace

The table of names that exist, each with a reference to an object.

nan

"not a number", the result of an undefined operation such as inf / inf

Example: np.exp(1000) / np.exp(1000)

nat

Unit produced when information is measured with natural logarithms.

natural log ln

the logarithm with base e

Example: ln 0.5 = −0.6931

nearest neighbor

The row with the smallest distance to a given row.

negative log likelihood

Log likelihood multiplied by minus one.

nested cross-validation

An outer cross-validation that scores a whole search run inside each outer fold.

nested dictionary

A dictionary whose values are dictionaries: cafe["drinks"]["Juice"].

nested loop

A loop inside the body of another loop. The inner loop runs in full for every iteration of the outer one.

nesting

A block inside another block, such as an if inside an if. Each level is indented four more spaces.

Newton's method

repeatedly jump to the minimum of the local parabola, x − f′/f″

Example: three steps to −0.351734

None

No value. The only value of the type NoneType: rating = None for an order not rated yet, which is different from a rating of 0.

NoneType

The type whose only value is None. type(None) gives <class 'NoneType'>.

nonlocal

A declaration that assignments use a binding in an enclosing function scope, rather than creating a local binding.

nonresponse

A selected person's requested data are not obtained.

norm

a length of a vector |

normal approximation

Using a normal model where observed shape is close enough for a stated purpose.

normal distribution

Symmetric distribution specified by mean and SD.

normal equations

AᵀAx̂ = Aᵀb, from the residual being perpendicular to every column

Example: [[3, 3], [3, 5]] x̂ = (6, 7)

normal error shape

A model assumption about conditional errors around fitted values.

normal quantile

Value at a stated cumulative probability in a normal model.

normal vector

a vector perpendicular to a line or plane; here w

Example: (1, 2)

notebook

A document made of cells. A code cell holds Python that can run; a text cell holds notes. Jupyter notebook files end in .ipynb.

Numerator

the trips that meet the condition.

numerical

A column whose values are amounts; continuous when any value in a range is possible, discrete when it counts.

numerically stable

computed so that rounding, overflow and underflow do not change the answer

Example: log_expit(-1000) → −1000.0