annotate README.rst @ 29:d33d37f32e54 draft

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