domain
stringclasses
48 values
url
stringlengths
35
137
text
stringlengths
0
836k
topic
stringclasses
13 values
enriquegit.github.io
https://enriquegit.github.io/behavior-free/citing-this-book.html
Citing this Book ================ If you found this book useful, you can consider citing it like this: ``` Garcia-Ceja, Enrique. "Behavior Analysis with Machine Learning Using R", 2021. http://behavior.enriquegc.com ``` BibTeX: ``` @book{GarciaCejaBook, title = {Behavior Analysis with Machine Learning Using...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/MathPrimer.html
Chapter 2 Got Math? The Very Beginning ====================================== Business analytics requires the use of various quantitative tools, from algebra and calculus, to statistics and econometrics, with implementations in various programming languages and software. It calls for technical expertise as well as g...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/IntroductoryRprogamming.html
Chapter 3 Open Source: R Programming ==================================== > “Walking on water and developing software from a specification are easy if both are frozen” – Edward V. Berard 3\.1 Got R? ----------- In this chapter, we develop some expertise in using the R statistical package. See the manual [https...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/MoreDataHandling.html
Chapter 4 MoRe: Data Handling and Other Useful Things ===================================================== In this chapter, we will revisit some of the topics considered in the previous chapters, and demonstrate alternate programming approaches in R. There are some extremely powerful packages in R that allow sql\-l...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/Shiny.html
Chapter 5 Interactive applications with *Shiny* =============================================== **Shiny** is an R framework in which you can set up browser\-based interactive applications and use them to interact with the data. This approach results in a better understanding of models you may build in R. Full docume...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/BayesModels.html
Chapter 6 Bayes Models: Learning from Experience ================================================ For a fairly good introduction to Bayes Rule, see Wikipedia, <http://en.wikipedia.org/wiki/Bayes_theorem>. The various R packages for Bayesian inference are at: [http://cran.r\-project.org/web/views/Bayesian.html](http:...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/TextAnalytics.html
Chapter 7 More than Words: Text Analytics ========================================= 7\.1 Introduction ----------------- Text expands the universe of data many\-fold. See my monograph on text mining in finance at: <http://srdas.github.io/Das_TextAnalyticsInFinance.pdf> In Finance, for example, text has become a ...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/Text2Vec.html
Chapter 8 Much More: Word Embeddings ==================================== 8\.1 Word Embeddings with *text2vec* ------------------------------------ See the original vignette from which this is abstracted. [https://cran.r\-project.org/web/packages/text2vec/vignettes/text\-vectorization.html](https://cran.r-project...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/Networks.html
Chapter 9 Making Connections: Networks ====================================== 9\.1 Networks are beautiful --------------------------- 9\.2 Small Worlds ----------------- 9\.3 Academic Networks ---------------------- <http://academic.research.microsoft.com> Useful introductory book on networks: ...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/DiscriminantFactorAnalysis.html
Chapter 10 Extracting Dimensions: Discriminant and Factor Analysis ================================================================== 10\.1 Introduction ------------------ In discriminant analysis (DA), we develop statistical models that differentiate two or more population types, such as immigrants vs natives, m...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/LimitedDependentVariables.html
Chapter 11 Truncate and Estimate: Limited Dependent Variables ============================================================= 11\.1 Maximum\-Likelihood Estimation (MLE) ------------------------------------------ Suppose we wish to fit data to a given distribution, then we may use this technique to do so. Many of th...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/ClusterAnalysis.html
Chapter 12 In the Same Boat: Cluster Analysis and Prediction Trees ================================================================== 12\.1 Overview -------------- There are many aspects of data analysis that call for grouping individuals, firms, projects, etc. These fall under the rubric of what may be termed as...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/NeuralNetsDeepLearning.html
Chapter 13 Statistical Brains: Neural Networks ============================================== 13\.1 Overview -------------- Neural networks are special forms of nonlinear regressions where the decision system for which the NN is built mimics the way the brain is supposed to work (whether it works like a NN is up ...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/Recommenders.html
Chapter 14 The Machine Knows What You Want: Recommender Systems =============================================================== 14\.1 Introduction ------------------ A recommendation algorithm tells you what you like or want. It may tell you about many things you like, sorted in order as well. It tries to underst...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/productForecastingBassModel.html
Chapter 15 Product Market Forecasting using the Bass Model ========================================================== 15\.1 Main Ideas ---------------- The **Bass** product diffusion model is a classic one in the marketing literature. It has been successfully used to predict the market shares of various newly int...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/Fourier.html
Chapter 16 Riding the Wave: Fourier Analysis ============================================ 16\.1 Introduction ------------------ Fourier analysis comprises many different connnections between infinite series, complex numbers, vector theory, and geometry. We may think of different applications: (a) fitting economic...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/FinanceModels.html
Chapter 17 Finance Models ========================= 17\.1 Brownian Motions: Quick Introduction ------------------------------------------ The law of motion for stocks is often based on a geometric Brownian motion, i.e., \\\[ dS(t) \= \\mu S(t) \\; dt \+ \\sigma S(t) \\; dB(t), \\quad S(0\)\=S\_0\. \\] This is...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/PortfolioOptimization.html
Chapter 18 Being Mean with Variance: Markowitz Optimization =========================================================== 18\.1 Diversification of a portfolio ------------------------------------ It is useful to examine the power of using vector algebra with an application. Here we use vector and summation math to ...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/DigitalPortfolios.html
Chapter 19 Zero or One: Optimal Digital Portfolios ================================================== This chapter is taken from the published paper “Digital Portfolios”, see S. Das ([2013](#ref-DasDP)). 19\.1 Digital Assets -------------------- Digital assets are investments with returns that are binary in nat...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/Gambling.html
Chapter 20 Against the Odds: The Mathematics of Gambling ======================================================== 20\.1 Introduction ------------------ Most people hate mathematics but love gambling. Which of course, is strange because gambling is driven mostly by math. Think of any type of gambling and no doubt ...
Machine Learning
srdas.github.io
https://srdas.github.io/MLBook/Auctions.html
Chapter 21 Bidding it Up: Auctions ================================== 21\.1 Introduction ------------------ Auctions comprise one of the oldest market forms, and are still a popular mechanism for selling various assets and their related price discovery. In this chapter we will study different auction formats, bid...
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/tensors.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/autograd.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/optim_1.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/network_1.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/modules.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/optimizers.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/loss_functions.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/optim_2.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/network_2.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/data.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/training_with_luz.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/image_classification_1.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/overfitting.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/training_efficiency.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/image_classification_2.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/image_segmentation.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/tabular_data.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/time_series.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/audio_classification.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/matrix_computations_leastsquares.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/matrix_computations_convolution.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/fourier_transform_dft.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/fourier_transform_fft.html
Machine Learning
skeydan.github.io
https://skeydan.github.io/Deep-Learning-and-Scientific-Computing-with-R-torch/wavelets.html
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/preface.html
Preface ======= ``` @Book{, author = {Przemyslaw Biecek and Tomasz Burzykowski}, title = {{Explanatory Model Analysis}}, publisher = {Chapman and Hall/CRC, New York}, year = {2021}, isbn = {9780367135591}, url = {https://pbiecek.github.io/ema/}, } ```
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/do-it-yourself.html
3 Do\-it\-yourself ================== Most of the methods presented in this book are available in both R and Python and can be used in a uniform way. But each of these languages has also many other tools for Explanatory Model Analysis. In this book, we introduce various methods for instance\-level and dataset\-lev...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/dataSetsIntro.html
4 Datasets and Models ===================== We will illustrate the methods presented in this book by using three datasets related to: * predicting probability of survival for passengers of the *RMS Titanic*; * predicting prices of *apartments in Warsaw*; * predicting the value of the football players based on the ...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/breakDown.html
6 Break\-down Plots for Additive Attributions ============================================= 6\.1 Introduction ----------------- Probably the most commonly asked question when trying to understand a model’s prediction for a single observation is: *which variables contribute to this result the most?* There is no si...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/iBreakDown.html
7 Break\-down Plots for Interactions ==================================== In Chapter [6](breakDown.html#breakDown), we presented a model\-agnostic approach to the calculation of the attribution of an explanatory variable to a model’s predictions. However, for some models, like models with interactions, the results o...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/shapley.html
8 Shapley Additive Explanations (SHAP) for Average Attributions =============================================================== In Chapter [6](breakDown.html#breakDown), we introduced break\-down (BD) plots, a procedure for calculation of attribution of an explanatory variable for a model’s prediction. We also indic...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/LIME.html
9 Local Interpretable Model\-agnostic Explanations (LIME) ========================================================= 9\.1 Introduction ----------------- Break\-down (BD) plots and Shapley values, introduced in Chapters [6](breakDown.html#breakDown) and [8](shapley.html#shapley), respectively, are most suitable for...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/ceterisParibus.html
10 Ceteris\-paribus Profiles ============================ 10\.1 Introduction ------------------ Chapters [6](breakDown.html#breakDown)–[9](LIME.html#LIME) focused on the methods that quantified the importance of explanatory variables in the context of a single\-instance prediction. Their application yields a deco...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/ceterisParibusOscillations.html
11 Ceteris\-paribus Oscillations ================================ 11\.1 Introduction ------------------ Visual examination of ceteris\-paribus (CP) profiles, as illustrated in the previous chapter, is insightful. However, in case of a model with a large number of explanatory variables, we may end up with a large ...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/localDiagnostics.html
12 Local\-diagnostics Plots =========================== 12\.1 Introduction ------------------ It may happen that, despite the fact that the predictive performance of a model is satisfactory overall, the model’s predictions for some observations are drastically worse. In such a situation it is often said that “the...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/modelPerformance.html
15 Model\-performance Measures ============================== 15\.1 Introduction ------------------ In this chapter, we present measures that are useful for the evaluation of the overall performance of a (predictive) model. As it was mentioned in Sections [2\.1](modelDevelopmentProcess.html#MDPIntro) and [2\.5...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/featureImportance.html
16 Variable\-importance Measures ================================ 16\.1 Introduction ------------------ In this chapter, we present a method that is useful for the evaluation of the importance of an explanatory variable. The method may be applied for several purposes. * Model simplification: variables that do n...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/partialDependenceProfiles.html
17 Partial\-dependence Profiles =============================== 17\.1 Introduction ------------------ In this chapter, we focus on partial\-dependence (PD) plots, sometimes also called PD profiles. They were introduced in the context of gradient boosting machines (GBM) by Friedman ([2000](#ref-Friedman00greedyfun...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/accumulatedLocalProfiles.html
18 Local\-dependence and Accumulated\-local Profiles ==================================================== 18\.1 Introduction ------------------ Partial\-dependence (PD) profiles, introduced in the previous chapter, are easy to explain and interpret, especially given their estimation as the mean of ceteris\-paribu...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/residualDiagnostic.html
19 Residual\-diagnostics Plots ============================== 19\.1 Introduction ------------------ In this chapter, we present methods that are useful for a detailed examination of both overall and instance\-specific model performance. In particular, we focus on graphical methods that use residuals. The methods ...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/UseCaseFIFA.html
21 FIFA 19 ========== 21\.1 Introduction ------------------ In the previous chapters, we introduced a range of methods for the exploration of predictive models. Different methods were discussed in separate chapters, and while illustrated, they were not directly compared. Thus, in this chapter, we apply the method...
Machine Learning
pbiecek.github.io
https://pbiecek.github.io/ema/reproducibility.html
22 Reproducibility ================== All examples presented in this book are reproducible. Parts of the source codes are available in the book. Over time, some of the functionality of the described packages may change. The online version is updated. Fully reproducible code is available at <https://pbiecek.github.io...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/index.html
Preface ======= This book is sold by Taylor \& Francis Group, who owns the copyright. The physical copies are available at [Taylor \& Francis](https://www.crcpress.com/Hands-On-Machine-Learning-with-R/Boehmke-Greenwell/p/book/9781138495685) and [Amazon](https://www.amazon.com/gp/product/1138495689?pf_rd_p=ab873d20...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/intro.html
Chapter 1 Introduction to Machine Learning ========================================== Machine learning (ML) continues to grow in importance for many organizations across nearly all domains. Some example applications of machine learning in practice include: * Predicting the likelihood of a patient returning to the ...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/process.html
Chapter 2 Modeling Process ========================== Much like EDA, the ML process is very iterative and heurstic\-based. With minimal knowledge of the problem or data at hand, it is difficult to know which ML method will perform best. This is known as the *no free lunch* theorem for ML (Wolpert [1996](#ref-wolpert...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/engineering.html
Chapter 3 Feature \& Target Engineering ======================================= Data preprocessing and engineering techniques generally refer to the addition, deletion, or transformation of data. The time spent on identifying data engineering needs can be significant and requires you to spend substantial time unders...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/linear-regression.html
Chapter 4 Linear Regression =========================== *Linear regression*, a staple of classical statistical modeling, is one of the simplest algorithms for doing supervised learning. Though it may seem somewhat dull compared to some of the more modern statistical learning approaches described in later chapters, l...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/logistic-regression.html
Chapter 5 Logistic Regression ============================= Linear regression is used to approximate the (linear) relationship between a continuous response variable and a set of predictor variables. However, when the response variable is binary (i.e., Yes/No), linear regression is not appropriate. Fortunately, anal...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/regularized-regression.html
Chapter 6 Regularized Regression ================================ Linear models (LMs) provide a simple, yet effective, approach to predictive modeling. Moreover, when certain assumptions required by LMs are met (e.g., constant variance), the estimated coefficients are unbiased and, of all linear unbiased estimates, ...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/mars.html
Chapter 7 Multivariate Adaptive Regression Splines ================================================== The previous chapters discussed algorithms that are intrinsically linear. Many of these models can be adapted to nonlinear patterns in the data by manually adding nonlinear model terms (e.g., squared terms, interact...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/knn.html
Chapter 8 *K*\-Nearest Neighbors ================================ *K*\-nearest neighbor (KNN) is a very simple algorithm in which each observation is predicted based on its “similarity” to other observations. Unlike most methods in this book, KNN is a *memory\-based* algorithm and cannot be summarized by a closed\-f...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/DT.html
Chapter 9 Decision Trees ======================== *Tree\-based models* are a class of nonparametric algorithms that work by partitioning the feature space into a number of smaller (non\-overlapping) regions with similar response values using a set of *splitting rules*. Predictions are obtained by fitting a simpler m...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/bagging.html
Chapter 10 Bagging ================== In Section [2\.4\.2](process.html#bootstrapping) we learned about bootstrapping as a resampling procedure, which creates *b* new bootstrap samples by drawing samples with replacement of the original training data. This chapter illustrates how we can use bootstrapping to create a...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/random-forest.html
Chapter 11 Random Forests ========================= *Random forests* are a modification of bagged decision trees that build a large collection of *de\-correlated* trees to further improve predictive performance. They have become a very popular “out\-of\-the\-box” or “off\-the\-shelf” learning algorithm that enjoys g...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/gbm.html
Chapter 12 Gradient Boosting ============================ Gradient boosting machines (GBMs) are an extremely popular machine learning algorithm that have proven successful across many domains and is one of the leading methods for winning Kaggle competitions. Whereas random forests (Chapter [11](random-forest.html#ra...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/deep-learning.html
Chapter 13 Deep Learning ======================== Machine learning algorithms typically search for the optimal representation of data using a feedback signal in the form of an objective function. However, most machine learning algorithms only have the ability to use one or two layers of data transformation to learn ...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/svm.html
Chapter 14 Support Vector Machines ================================== Support vector machines (SVMs) offer a direct approach to binary classification: try to find a *hyperplane* in some feature space that “best” separates the two classes. In practice, however, it is difficult (if not impossible) to find a hyperplane...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/stacking.html
Chapter 15 Stacked Models ========================= In the previous chapters, you’ve learned how to train individual learners, which in the context of this chapter will be referred to as *base learners*. ***Stacking*** (sometimes called “stacked generalization”) involves training a new learning algorithm to combine ...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/iml.html
Chapter 16 Interpretable Machine Learning ========================================= In the previous chapters you learned how to train several different forms of advanced ML models. Often, these models are considered “black boxes” due to their complex inner\-workings. However, because of their complexity, they are ty...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/pca.html
Chapter 17 Principal Components Analysis ======================================== Principal components analysis (PCA) is a method for finding low\-dimensional representations of a data set that retain as much of the original variation as possible. The idea is that each of the *n* observations lives in *p*\-dimension...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/GLRM.html
Chapter 18 Generalized Low Rank Models ====================================== The PCs constructed in PCA are linear in nature, which can cause deficiencies in its performance. This is much like the deficiency that linear regression has in capturing nonlinear relationships. Alternative approaches, known as matrix fac...
Machine Learning
bradleyboehmke.github.io
https://bradleyboehmke.github.io/HOML/autoencoders.html
Chapter 19 Autoencoders ======================= An autoencoder is a neural network that is trained to learn efficient representations of the input data (i.e., the features). Although a simple concept, these representations, called *codings*, can be used for a variety of dimension reduction needs, along with addition...
Machine Learning
smithjd.github.io
https://smithjd.github.io/sql-pet/chapter-appendix-postresql-authentication.html
E Appendix C \- PostgreSQL Authentication ========================================= E.1 Introduction ---------------- PostgreSQL has a very robust and flexible set of authentication methods (PostgreSQL Global Development Group [2018](#ref-PGDG2018a)[a](#ref-PGDG2018a)). In most production environments, these will...
Data Databases and Engineering
smithjd.github.io
https://smithjd.github.io/sql-pet/chapter-appendix-dplyr-to-postres-translation.html
G Appendix \_ Dplyr to SQL translations ======================================= > You may be interested in exactly how the DBI package translates R functions into their SQL quivalents – and in which functions are translated and which are not. > > This Appendix answers those questions. It is based on the work of ...
Data Databases and Engineering
ukgovdatascience.github.io
https://ukgovdatascience.github.io/rap_companion/exemplar.html
Chapter 4 Exemplar RAP ====================== Chapter [3](why.html#why) considered why RAP is a useful paradigm. In this Chapter we demonstrate a RAP package developed in collaboration with the Department for Culture Media and Sport (DCMS). This package enshrines all the pertinent business knowledge in one corpus....
Data Databases and Engineering
ukgovdatascience.github.io
https://ukgovdatascience.github.io/rap_companion/vs.html
Chapter 6 Version Control ========================= 6\.1 Introduction ----------------- Few software engineers would embark on a new project without using some sort of [version control software](https://en.wikipedia.org/wiki/Version_control). Version control software allows us to track the three Ws: **Who made Wh...
Data Databases and Engineering
ukgovdatascience.github.io
https://ukgovdatascience.github.io/rap_companion/package.html
Chapter 7 Packaging Code ======================== A package enshrines all the business knowledge used to create a corpus of work in one place; including the code and its relevant documentation. One of the difficulties that can arise in the more manual methods of statistics production is that we have many different...
Data Databases and Engineering
ukgovdatascience.github.io
https://ukgovdatascience.github.io/rap_companion/dep.html
Chapter 11 Dependency and reproducibility ========================================= *This section is in development. Please [contribute to the discussion](https://github.com/ukgovdatascience/rap_companion/issues/89).* 11\.1 Other people’s code ------------------------- You’re likely to make use of other people’...
Data Databases and Engineering
ukgovdatascience.github.io
https://ukgovdatascience.github.io/rap_companion/qa-data.html
Chapter 12 Quality Assurance of the pipeline ============================================ All the testing we have described so far is to do with the code, and ensuring that the code does what we expect it to, but because we have written an [R package](https://github.com/ukgovdatascience/eesectors), it’s also very ea...
Data Databases and Engineering
ukgovdatascience.github.io
https://ukgovdatascience.github.io/rap_companion/pub.html
Chapter 13 Producing the publication ==================================== > R Markdown provides an unified authoring framework for data science, combining your code, its results, and your prose commentary. R Markdown documents are fully reproducible and support dozens of output formats, like PDFs, Word files, slide...
Data Databases and Engineering
compgenomr.github.io
http://compgenomr.github.io/book/clustering-grouping-samples-based-on-their-similarity.html
4\.1 Clustering: Grouping samples based on their similarity ----------------------------------------------------------- In genomics, we would very frequently want to assess how our samples relate to each other. Are our replicates similar to each other? Do the samples from the same treatment group have similar genome...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/dimensionality-reduction-techniques-visualizing-complex-data-sets-in-2d.html
4\.2 Dimensionality reduction techniques: Visualizing complex data sets in 2D ----------------------------------------------------------------------------- In statistics, dimension reduction techniques are a set of processes for reducing the number of random variables by obtaining a set of principal variables. For e...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/exercises-2.html
4\.3 Exercises -------------- For this set of exercises we will be using the expression data shown below: ``` expFile=system.file("extdata", "leukemiaExpressionSubset.rds", package="compGenomRData") mat=readRDS(expFile) ``` ### 4\.3\.1 Clustering 1. We want to observe t...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/use-case-disease-subtype-from-genomics-data.html
5\.3 Use case: Disease subtype from genomics data ------------------------------------------------- We will start our illustration of machine learning using a real dataset from tumor biopsies. We will use the gene expression data of glioblastoma tumor samples from The Cancer Genome Atlas project. We will try to pred...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/data-preprocessing.html
5\.4 Data preprocessing ----------------------- We will have to preprocess the data before we start training. This might include exploratory data analysis to see how variables and samples relate to each other. For example, we might want to check the correlation between predictor variables and keep only one variable ...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/splitting-the-data.html
5\.5 Splitting the data ----------------------- At this point we might choose to split the data into the test and the training partitions. The reason for this is that we need an independent test we did not train on. This will become clearer in the following sections, but without having a separate test set, we cannot...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/predicting-the-subtype-with-k-nearest-neighbors.html
5\.6 Predicting the subtype with k\-nearest neighbors ----------------------------------------------------- One of the easiest things to wrap our heads around when we are trying to predict a label such as disease subtype is to look for similar samples and assign the labels of those similar samples to our sample. C...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/assessing-the-performance-of-our-model.html
5\.7 Assessing the performance of our model ------------------------------------------- We have to define some metrics to see if our model worked. The algorithm is trying to reduce the classification error, or in other words it is trying to increase the training accuracy. For the assessment of performance, there are...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/model-tuning-and-avoiding-overfitting.html
5\.8 Model tuning and avoiding overfitting ------------------------------------------ How can we know that we picked the best \\(k\\)? One straightforward way is that we can try many different \\(k\\) values and check the accuracy of our model. We will first check the effect of different \\(k\\) values on training a...
Life Sciences
compgenomr.github.io
http://compgenomr.github.io/book/variable-importance.html
5\.9 Variable importance ------------------------ Another important purpose of machine learning models could be to learn which variables are more important for the prediction. This information could lead to potential biological insights or could help design better data collection methods or experiments. Variable i...
Life Sciences