AI glossary: terms starting with K
15 terms starting with K, each defined the way the lesson that teaches it uses it, with a link to every lesson where it appears.
- k-fold
k splits, each part validating once.
Taught in- k-nearest neighbors
A classifier that predicts the majority label of the K nearest training rows.
Taught in- k-NN regression
Predicting the mean label of the K nearest rows.
Taught inkeepdimsRetain a reduced axis with size one
Taught in- kernel
The program that runs a notebook's cells and keeps the names they create. Restarting it deletes every name.
- kernel density estimate (KDE)
A smoothed density estimated from observations: a small curve (a kernel) is placed at each value and the curves are added.
Taught in- key
What a dictionary looks a value up by, such as
"Pasta"in the menu. Each key appears once, and must be hashable.Taught in- key function
A function passed as
key=, whose result is whatsorted,minandmaxcompare.- key value pair
One entry of a dictionary: a key and its value, written
"Pasta": 12.50.Taught in- KeyError
The exception for a missing dictionary key or an absent member passed to
set.remove.Taught in- keyword
A word Python reserves, such as
if,for,class,TrueandNone. It can not be used as a name. Python 3.12 has 35.- keyword argument
An argument passed as
name=value, matched to the parameter with that name:rate=0.2.Taught in- keyword-only parameter
A parameter after
*or*args, which must be passed by keyword; it can be required even after a parameter with a default.Taught in- KKT conditions
the conditions for an optimum with inequality constraints
Example: gradient condition, feasibility,
μ ≥ 0, slacknesskwargsA parameter with two stars, which collects extra keyword arguments into a dictionary:
def order(quantities).Taught in