3

The word numerical means 'consisting of numbers' ('expressed in or counted by numbers' in one dictionary). Counts are clearly numerical. Indeed they have a meaningful zero and '6' is literally twice as much as '3' and three times as much as '2' ... and so forth (3 bricks + 3 bricks = 6 bricks, etc,.. so 6 bricks is twice as many bricks as 3 bricks), so if ...


2

In a measurement theory sense, the count of the number of lanes is a ratio variable, since it is meaningful to interpret differences between numbers of lanes and ratios of numbers of lanes. This means that you have the option of treating this variable either as a nominal, ordinal, or ratio variable in your statistical mode. The choice of whether to treat ...


1

Given a set of observations $X_1, X_2, \ldots, X_N$, where each observation $X_j \in \mathcal R^n$, the $k$-means clustering algorithm's goal is to partition the $N$ observations into $k (\leq N)$ clusters $C = \{C_1, C_2, \ldots, C_k\}$ in order to minimize the within-cluster sum of squares. The objective function for k-means clustering is $\underset{\mu}{\...


1

Speed limit could be treated as either continuous or categorical. It depends on the purpose of the model, and your expectations of how it will be applied. Let's say all the road segments in your data have one of two speed limits: 50 kmph, or 80 kmph. Now, you might want to predict the outcome for some road segments that have speed limits that are different ...


1

Preamble: You talk about the "underlying true clusters", but in applied clustering this is a highly problematic concept. Assuming a certain model, one can define what is meant by "true clustering", but more than one definition is possible (for example a mixture distribution of 6 Gaussians may have only three modes, and one can define the &...


1

Self answering for future reference: Given some horizon $h$, and stream algorithm $S$ trained on $\{X_1,...X_{i-1}\}$ batches of data, each of size $h$, we will predict the next $h$ data points ($X_i$), creating prediction $Y_i$ (where $|Y_i| = h$), and compare it to $Z_i$. Only then we update $S$ using the next $h$ points ($X_i$). The most standard ...


1

I'd like to point out sklearn normalize and scale use different default axes. normalize defaults to axis=1 whereas scale defaults to axis=0. Following @John Madden great example, but if we do normalization along axis=0, the two clusters will also disappear. import numpy as np from sklearn.decomposition import PCA from sklearn.preprocessing import scale, ...


1

Maybe a bit late, but I would like to add an answer here for future knowledge. One way to find the best $\epsilon$ for DBSCAN is to compute the knn, then sort the distances and see where the "knee" is located. Example in python, because is the language I manage.: from sklearn.neighbors import NearestNeighbors import plotly.express as px neighbors =...


Only top voted, non community-wiki answers of a minimum length are eligible