concept set in category R

This is an excerpt from Manning's book R in Action, Third Edition.
R is a case-sensitive, interpreted language. You can enter commands one at a time at the command prompt (>) or run a set of commands from a source file. There are a wide variety of data types, including vectors, matrices, data frames (similar to datasets), and lists (collections of objects). We’ll discuss each of these data types in chapter 2.
Change a continuous variable into a set of categories

This is an excerpt from Manning's book Machine Learning with R, the tidyverse, and mlr.
Confusingly, R has a data structure called an atomic vector that may or may not represent a mathematical vector. An atomic vector in R contains a set of values that must all be the same type (this is where the word atomic comes from in the name). If the atomic vector’s elements are numeric, then it will also be a vector in the mathematical sense, because the values encode magnitude and direction. But if we have atomic vectors with character or logical elements, neither of these can encode magnitude and direction; so while we refer to them as vectors within R, they are not vectors in the mathematical sense. Here is how we can create numeric, character, and logical atomic vectors using the c() function.
This is probably difficult to picture in your head, so let’s look at an analogy. Imagine that you have a big jar of beads with your sewing kit. There are beads of different sizes and weights, and some are more elongated than others. It’s raining, and there’s nothing better to do, so you decide that you will organize your beads into sets to make it easier to find the beads you need in the future. You arrange a grid of bowls on the table and consider each bead in turn. You then place beads that are most similar to each other in the same bowl. You put beads that are similar, but not the same, in adjacent bowls, while beads that are very different go into bowls that are far away from each other. An example of what this might look like is shown in figure 15.1.
Figure 15.12. The distance between each case and every other case is calculated, and their k-nearest neighbors are assigned (distance along the z-axis in the top-left plot is indicated by the size of the circle). For each case, the algorithm learns a set of weights, one for each nearest neighbor, that sum to 1. Each neighbor’s variable values are multiplied by its weight (so row 1 becomes x = 3.1 × 0.1, y = 2.0 × 0.1, z = 0.1 × 0.1). The weighted values of each neighbor are summed (the columns are summed) to approximate the original values of the selected case.
![]()
SOMs learn patterns in the data by updating the weights of each node until the map converges to a set of weights that preserves similarities among the cases.

This is an excerpt from Manning's book Practical Data Science with R, Second Edition.
Different audiences require different kinds of information. Business-oriented audiences want to understand the impact of your findings in terms of business metrics. In the loan example, the most important thing to present to business audiences is how your loan application model will reduce charge-offs (the money that the bank loses to bad loans). Suppose your model identified a set of bad loans that amounted to 22% of the total money lost to defaults. Then your presentation or executive summary should emphasize that the model can potentially reduce the bank’s losses by that amount, as shown in figure 1.4.
“Jitter” the original example to generate synthetic examples that are similar to it. You can think of each jittered point as the original example with the value of each variable changed slightly. For example, if the original example is then a jittered point might beSepal.Length Sepal.Width Petal.Length Petal.Width 5.1 3.5 1.4 0.2To make sure that the synthetic examples are plausible, LIME uses the distributions of the data in the training set to generate the jittered data. For our discussion, we’ll call the set of synthetic examples {s_i}. Figure 6.23 shows the synthetic data as the additional pluses and minuses. Note that the jittering is randomized. This means that running explain() on the same example multiple times will produce different results each time. If LIME’s explanation is strong, the results should not be too different, so that the explanations remain quantitatively similar. In our case, it’s likely that Petal.Length will always show up as the variable with the most weight; it’s just the exact value of Petal.Length’s weight and its relationship to the other variables that will vary.Sepal.Length Sepal.Width Petal.Length Petal.Width 5.505938 3.422535 1.3551 0.4259682
clusterboot’s algorithm uses the Jaccard coefficient, a similarity measure between sets. The Jaccard similarity between two sets A and B is the ratio of the number of elements in the intersection of A and B over the number of elements in the union of A and B. This is shown in figure 9.9.

This is an excerpt from Manning's book R in Action, Second Edition: Data analysis and graphics with R.
R is a case-sensitive, interpreted language. You can enter commands one at a time at the command prompt (>) or run a set of commands from a source file. There are a wide variety of data types, including vectors, matrices, data frames (similar to datasets), and lists (collections of objects). We’ll discuss each of these data types in chapter 2.
The methods described in this chapter require large samples to derive stable solutions. What constitutes an adequate sample size is somewhat complicated. Until recently, analysts used rules of thumb like “factor analysis requires 5–10 times as many subjects as variables.” Recent studies suggest that the required sample size depends on the number of factors, the number of variables associated with each factor, and how well the set of factors explains the variance in the variables (Bandalos and Boehm-Kaufman, 2009). I’ll go out on a limb and say that if you have several hundred observations, you’re probably safe. In this chapter, we’ll look at artificially small problems in order to keep the output (and page count) manageable.
In EFA, you allow the data to determine the number of factors to be extracted and their meaning. But you could start with a theory about how many factors underlie a set of variables, how the variables load on those factors, and how the factors correlate with one another. You could then test this theory against a set of collected data. The approach is called confirmatory factor analysis (CFA).