0
$\begingroup$

I find that in this question and this API of Keras a sample means a case in statistics as the documentation of that API states that:

Optional Numpy array of weights for the test samples, used for weighting the loss function. You can either pass a flat (1D) Numpy array with the same length as the input samples (1:1 mapping between weights and samples), or in the case of temporal data, you can pass a 2D array with shape (samples,sequence_length), to apply a different weight to every timestep of every sample. This argument is not supported when x is a dataset, instead pass sample weights as the third element of x.

As I understand, the sample here aligns very well with that in the aforementioned question, then my question is why we refer to a sample in machine learning a case in statistics? In statistics, a sample compromises multiple cases and is a part of a population.

$\endgroup$
  • $\begingroup$ No problems, thanks! $\endgroup$ – Richard Hardy Sep 30 at 4:36
2
$\begingroup$

I think the main explanation is simply different traditions. They started pretty much randomly with different terminology and they just continue. I do not think there is any deep, philosophical explanation. By the way, the terminology in applications of statistics and machine learning also varies across the fields; some (biology?) probably use samples instead of sample for statistical problems as well, as they just copy the term(s) from their domain.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Elsewhere I wrote: In statistics, a sample includes several values, and repeated sampling is a high theoretical virtue, but one rarely practised, except by simulation ... In many sciences, a sample is a single object, consisting of a lump, chunk or dollop of water, soil, sediment, rock, blood, tissue, or other substances ...; far from being exceptional, taking many samples may be essential for any serious analysis. Here every field's terminology makes perfect sense to its people, but translation is sometimes needed. $\endgroup$ – Nick Cox Aug 15 at 12:03
  • $\begingroup$ stats.stackexchange.com/questions/202879/… $\endgroup$ – Nick Cox Aug 15 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.