<commit_before>============
Introduction
============

Machine Learning in NeuroImaging: what and why
===============================================

Machine learning problems and vocabulary
-----------------------------------------

Machine learning is interested in learning empirical rules from data to
make **predictions**. Two kinds of problems appear:

:Supervised learning:

    :ref:`supervised_learning` is interested in predicting an **output
    variable**, or **target**, `y`, from **data** `X`. Typically, we start
    from labeled data (the **training set**) for which we know the `y`
    for each instance of `X` and train a model; this model is then
    applied to new unlabeled data (the **test set**) to predict the
    labels. It may be:
    
    * a **regression** problem: predicting a continuous quantity such 
      as age
    
    * a **classification** problem: predicting the class each 
      observation belongs to, such as patient or control

    In neuroimaging, supervised learning is typically used to relate
    brain images to behavioral or clinical observations.

:Unsupervised learning:

    :ref:`unsupervised_learning` is concerned with data `X` without any
    labels. It analyzes the structure of a dataset, for instance
    **clustering** or extracting latent factors such as independent
    components.

    In neuroimaging, it is typically used to study resting state, or to
    find sub-populations in diseases.


Why is machine learning relevant to NeuroImaging: a few examples
--------------------------------------------------------------

:Diagnosis and prognosis:

    Predicting a clinical score from brain imaging with :ref:`supervised
    learning <Supervised_learning>` e.g. `[Mourao-Miranda 2012]
    <http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0029482>`_

:Generalization scores:

    * Information mapping: using the prediction accuracy of a classifier
      to test links between brain images and stimuli. (e.g.
      :ref:`searchlight <searchlight>`) `[Kriegeskorte 2005]
      <http://www.pnas.org/content/103/10/3863.short>`_

    * Transfer learning: measuring how much an estimator trained on a
      task generalizes to another task (e.g. discriminating left from
      right eye movements also discriminates additions from subtractions
      `[Knops 2009]
      <http://www.sciencemag.org/content/324/5934/1583.short>`_)

:Statistical estimation:

    From a statistical point of view, machine learning implements
    statistical estimation of models with a large number of parameters.
    The tricks pulled in machine learning (e.g. regularization) can
    make this estimation possible with a small number of observations
    `[Varoquaux 2012] <http://icml.cc/discuss/2012/688.html>`_. This
    usage of machine learning requires some understanding of the models.

:Data mining:<commit_msg>Rst title length<commit_after>============
Introduction
============

Machine Learning in NeuroImaging: what and why
===============================================

Machine learning problems and vocabulary
-----------------------------------------

Machine learning is interested in learning empirical rules from data to
make **predictions**. Two kinds of problems appear:

:Supervised learning:

    :ref:`supervised_learning` is interested in predicting an **output
    variable**, or **target**, `y`, from **data** `X`. Typically, we start
    from labeled data (the **training set**) for which we know the `y`
    for each instance of `X` and train a model; this model is then
    applied to new unlabeled data (the **test set**) to predict the
    labels. It may be:
    
    * a **regression** problem: predicting a continuous quantity such 
      as age
    
    * a **classification** problem: predicting the class each 
      observation belongs to, such as patient or control

    In neuroimaging, supervised learning is typically used to relate
    brain images to behavioral or clinical observations.

:Unsupervised learning:

    :ref:`unsupervised_learning` is concerned with data `X` without any
    labels. It analyzes the structure of a dataset, for instance
    **clustering** or extracting latent factors such as independent
    components.

    In neuroimaging, it is typically used to study resting state, or to
    find sub-populations in diseases.


Why is machine learning relevant to NeuroImaging: a few examples
-----------------------------------------------------------------

:Diagnosis and prognosis:

    Predicting a clinical score from brain imaging with :ref:`supervised
    learning <Supervised_learning>` e.g. `[Mourao-Miranda 2012]
    <http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0029482>`_

:Generalization scores:

    * Information mapping: using the prediction accuracy of a classifier
      to test links between brain images and stimuli. (e.g.
      :ref:`searchlight <searchlight>`) `[Kriegeskorte 2005]
      <http://www.pnas.org/content/103/10/3863.short>`_

    * Transfer learning: measuring how much an estimator trained on a
      task generalizes to another task (e.g. discriminating left from
      right eye movements also discriminates additions from subtractions
      `[Knops 2009]
      <http://www.sciencemag.org/content/324/5934/1583.short>`_)

:Statistical estimation:

    From a statistical point of view, machine learning implements
    statistical estimation of models with a large number of parameters.
    The tricks pulled in machine learning (e.g. regularization) can
    make this estimation possible with a small number of observations
    `[Varoquaux 2012] <http://icml.cc/discuss/2012/688.html>`_. This
    usage of machine learning requires some understanding of the models.

:Data mining:
{'fraction_non_alphanumeric': 0.1302011095700416, 'fraction_numerical': 0.020457697642163663, 'mean_word_length': 3.2607090103397343, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '72667', 'n_tokens_mistral': 1570, 'n_tokens_neox': 1385, 'n_words': 633}