annotate README.rst @ 1:e8362e64026d draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 38fa34f4b3f7298582644add88f9fe63554f32bb
author bgruening
date Sat, 04 Aug 2018 13:30:19 -0400
parents b7d0fc23bfe4
children b3a37a265fa8
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 ***************
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
2 Galaxy wrapper for scikit-learn library
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
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
5 Contents
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
6 ========
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
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
19 .. _What is scikit-learn?
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?
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
22 ===========================
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 ======
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
33 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
34 ======
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
35
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
36 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
37 These are:
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
38
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
39 - Classification
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
40 - 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
41 - Regression
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
42 - 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
43 - Clustering
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
44 - 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
45 - Preprocessing
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
46 - Feature extraction and normalization.
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
47 - Model selection and evaluation
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
48 - 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
49 - Dimensionality reduction
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
50 - 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
51
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
52 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
53
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
54
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
55 .. _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
56
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
57 ===================
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
58 Available tools in the current wrapper
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
59 ===================
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 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
62
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
63 - 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
64 - 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
65 - 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
66 - All the clustering methods
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
67 - 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
68 - 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
69 - Pairwise metric measurement functions
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 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
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:
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
74
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
75 Machine learning workflows
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
76 ===============
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
77
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
78 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
79 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
80
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
81 .. _Supervised learning workflows:
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
82
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 Supervised machine learning workflows
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
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
87 **What is supervised learning?**
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 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
90 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
91
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
92 1. Preprocess the data::
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
93
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
94 * 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
95 * 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
96 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
97 * 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
98 * 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
99
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
100 2. Choose an algorithm::
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
101
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
102 * 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
103 - 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
104 - 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
105 - 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
106 - 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
107 - Interpretability of the predictions
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
108
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
109 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
110
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
111 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
112 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
113 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
114
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
115 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
116 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
117 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
118
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
119 4. Fit a model
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 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
122 repeat the following steps::
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
123
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
124 * Train the model.
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
125 * Evaluate based on metrics.
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
126 * Optimize unitl satisfied.
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
127
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
128 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
129
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
130 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
131 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
132
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
133 .. _Unsupervised learning workflows:
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 =======================
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
136 Unsupervised machine learning workflows
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
137 =======================
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
138
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
139 **What is unsupervised learning?**
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 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
142 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
143 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
144
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
145 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
146
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
147 * 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
148 * Train a model.
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
149 * Evaluate and tune parameters.
b7d0fc23bfe4 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cbb681224f23fa95783514f949c97d6c2c60966
bgruening
parents:
diff changeset
150 * Analyse the model and test on real data.