concept odd ratio in category machine learning

This is an excerpt from Manning's book Grokking Machine Learning.
where OR is the odds ratio. In the previous example, if the probability of a red ball is P(red ball) = ⅔, then the odds ratio is:

This is an excerpt from Manning's book Machine Learning with R, the tidyverse, and mlr.
The intercept is the log odds of surviving the Titanic disaster when all continuous variables are 0 and the factors are at their reference levels. We tend to be more interested in the slopes than the y-intercept, but these values are in log odds units, which are difficult to interpret. Instead, people commonly convert them into odds ratios.
An odds ratio is, well, a ratio of odds. For example, if the odds of surviving the Titanic if you’re female are about 7 to 10, and the odds of surviving if you’re male are 2 to 10, then the odds ratio for surviving if you’re female is 3.5. In other words, if you were female, you would have been 3.5 times more likely to survive than if you were male. Odds ratios are a very popular way of interpreting the impact of predictors on an outcome, because they are easily understood.
Listing 4.13. Converting model parameters into odds ratios
exp(cbind(Odds_Ratio = coef(logRegModelData), confint(logRegModelData))) Waiting for profiling to be done… Odds_Ratio 2.5 % 97.5 % (Intercept) 45.13516691 19.14718874 109.72483921 Pclass2 0.36775262 0.20650392 0.65220841 Pclass3 0.11854901 0.06700311 0.20885220 Sexmale 0.06229163 0.04182164 0.09116657 Age 0.96192148 0.94700049 0.97652950 Fare 1.00322362 0.99872001 1.00863263 FamSize 0.78424868 0.68315465 0.89110044Most of these odds ratios are less than 1. An odds ratio less than 1 means an event is less likely to occur. It’s usually easier to interpret these if you divide 1 by them. For example, the odds ratio for surviving if you were male is 0.06, and 1 divided by 0.06 = 16.7. This means that, holding all other variables constant, men were 16.7 times less likely to survive than women.
For continuous variables, we interpret the odds ratio as how much more likely a passenger is to survive for every one-unit increase in the variable. For example, for every additional family member, a passenger was 1/0.78 = 1.28 times less likely to survive.
For factors, we interpret the odds ratio as how much more likely a passenger is to survive, compared to the reference level for that variable. For example, we have odds ratios for Pclass2 and Pclass3, which are how many more times passengers in classes 2 and 3 are likely to survive compared to those in class 1, respectively.
The 95% confidence intervals indicate the strength of the evidence that each variable has predictive value. An odds ratio of 1 means the odds are equal and the variable has no impact on prediction. Therefore, if the 95% confidence intervals include the value 1, such as those for the Fare variable, then this may suggest that this variable isn’t contributing anything.