annotate README.rst @ 7:4368259ff821 draft

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