annotate README.rst @ 26:685046e0381a draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 60f0fbc0eafd7c11bc60fb6c77f2937782efd8a9-dirty
author bgruening
date Fri, 09 Aug 2019 07:16:21 -0400
parents f0f1e5ba6fca
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
1 Galaxy wrapper for scikit-learn library
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
2 ***************************************
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
3
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
4 Contents
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
5 ========
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
6
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
7 - `What is scikit-learn?`_
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
8 - `Scikit-learn main package groups`_
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
9 - `Tools offered by this wrapper`_
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
10
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
11 - `Machine learning workflows`_
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
12 - `Supervised learning workflows`_
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
13 - `Unsupervised learning workflows`_
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
14
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
15
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
16 ____________________________
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
17
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
18
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
19 .. _What is scikit-learn?:
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
20
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
21 What is scikit-learn?
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
22 =====================
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
23
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
24 Scikit-learn is an open-source machine learning library for the Python programming language. It offers various algorithms for performing supervised and unsupervised learning as well as data preprocessing and transformation, model selection and evaluation, and dataset utilities. It is built upon SciPy (Scientific Python) library.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
25
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
26 Scikit-learn source code can be accessed at https://github.com/scikit-learn/scikit-learn.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
27 Detailed installation instructions can be found at http://scikit-learn.org/stable/install.html
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
28
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
29
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
30 .. _Scikit-learn main package groups:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
31
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
32 Scikit-learn main package groups
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
33 ================================
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
34
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
35 Scikit-learn provides the users with several main groups of related operations.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
36 These are:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
37
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
38 - Classification
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
39 - Identifying to which category an object belongs.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
40 - Regression
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
41 - Predicting a continuous-valued attribute associated with an object.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
42 - Clustering
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
43 - Automatic grouping of similar objects into sets.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
44 - Preprocessing
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
45 - Feature extraction and normalization.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
46 - Model selection and evaluation
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
47 - Comparing, validating and choosing parameters and models.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
48 - Dimensionality reduction
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
49 - Reducing the number of random variables to consider.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
50
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
51 Each group consists of a number of well-known algorithms from the category. For example, one can find hierarchical, spectral, kmeans, and other clustering methods in sklearn.cluster package.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
52
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
53
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
54 .. _Tools offered by this wrapper:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
55
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
56 Available tools in the current wrapper
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
57 ======================================
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
58
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
59 The current release of the wrapper offers a subset of the packages from scikit-learn library. You can find:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
60
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
61 - A subset of classification metric functions
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
62 - Linear and quadratic discriminant classifiers
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
63 - Random forest and Ada boost classifiers and regressors
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
64 - All the clustering methods
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
65 - All support vector machine classifiers
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
66 - A subset of data preprocessing estimator classes
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
67 - Pairwise metric measurement functions
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
68
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
69 In addition, several tools for performing matrix operations, generating problem-specific datasets, and encoding text and extracting features have been prepared to help the user with more advanced operations.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
70
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
71 .. _Machine learning workflows:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
72
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
73 Machine learning workflows
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
74 ==========================
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
75
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
76 Machine learning is about processes. No matter what machine learning algorithm we use, we can apply typical workflows and dataflows to produce more robust models and better predictions.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
77 Here we discuss supervised and unsupervised learning workflows.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
78
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
79 .. _Supervised learning workflows:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
80
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
81 Supervised machine learning workflows
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
82 =====================================
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
83
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
84 **What is supervised learning?**
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
85
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
86 In this machine learning task, given sample data which are labeled, the aim is to build a model which can predict the labels for new observations.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
87 In practice, there are five steps which we can go through to start from raw input data and end up getting reasonable predictions for new samples:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
88
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
89 1. Preprocess the data::
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
90
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
91 * Change the collected data into the proper format and datatype.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
92 * Adjust the data quality by filling the missing values, performing
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
93 required scaling and normalizations, etc.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
94 * Extract features which are the most meaningfull for the learning task.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
95 * Split the ready dataset into training and test samples.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
96
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
97 2. Choose an algorithm::
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
98
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
99 * These factors help one to choose a learning algorithm:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
100 - Nature of the data (e.g. linear vs. nonlinear data)
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
101 - Structure of the predicted output (e.g. binary vs. multilabel classification)
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
102 - Memory and time usage of the training
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
103 - Predictive accuracy on new data
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
104 - Interpretability of the predictions
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
105
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
106 3. Choose a validation method
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
107
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
108 Every machine learning model should be evaluated before being put into practicical use.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
109 There are numerous performance metrics to evaluate machine learning models.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
110 For supervised learning, usually classification or regression metrics are used.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
111
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
112 A validation method helps to evaluate the performance metrics of a trained model in order
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
113 to optimize its performance or ultimately switch to a more efficient model.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
114 Cross-validation is a known validation method.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
115
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
116 4. Fit a model
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
117
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
118 Given the learning algorithm, validation method, and performance metric(s)
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
119 repeat the following steps::
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
120
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
121 * Train the model.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
122 * Evaluate based on metrics.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
123 * Optimize unitl satisfied.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
124
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
125 5. Use fitted model for prediction::
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
126
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
127 This is a final evaluation in which, the optimized model is used to make predictions
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
128 on unseen (here test) samples. After this, the model is put into production.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
129
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
130 .. _Unsupervised learning workflows:
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
131
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
132 Unsupervised machine learning workflows
17
f0f1e5ba6fca planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cfc9fe24b7975fc5838bb3e456646202898eb977
bgruening
parents: 0
diff changeset
133 =======================================
0
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
134
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
135 **What is unsupervised learning?**
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
136
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
137 Unlike supervised learning and more liklely in real life, here the initial data is not labeled.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
138 The task is to extract the structure from the data and group the samples based on their similarities.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
139 Clustering and dimensionality reduction are two famous examples of unsupervised learning tasks.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
140
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
141 In this case, the workflow is as follows::
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
142
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
143 * Preprocess the data (without splitting to train and test).
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
144 * Train a model.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
145 * Evaluate and tune parameters.
29899feb4d44 planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 0e582cf1f3134c777cce3aa57d71b80ed95e6ba9
bgruening
parents:
diff changeset
146 * Analyse the model and test on real data.