Machine Learning

On this page

Why this module matters

A Level II item can give you a short modeling vignette and ask you to select an algorithm, diagnose an error pattern, or choose a remedy, but the tested skill is usually the decision that comes before the algorithm name and the reason that makes the choice fit the evidence in the vignette. Imagine a retailer using customer records to predict whether a shopper will cancel, estimate next month's sales, or sort shoppers into groups, because the same data can support each task while the requested output, available information, timing, and acceptable mistake differ. A cancellation model may value catching a likely departure, a sales model may punish a large dollar miss, and a grouping exercise may have no labeled answer to check against. If you start with the algorithm, a familiar name can pull you toward the wrong answer, such as choosing a clustering method for a problem that already supplies the outcome to predict or praising a complex model when the vignette describes unstable validation results. It can also make a simple, interpretable baseline look inferior merely because a more fashionable method sounds sophisticated. Read the situation as a small investigation. Identify the decision, identify what the model can learn at the moment of that decision, identify the cost of an error, and only then compare methods by the way each one handles the data, the assumptions it makes, and the evidence it needs.

Start with the target, which is the outcome the model is asked to learn, rather than with the shape of the data or the popularity of a technique. When target labels are present, you are in supervised learning because observed outcomes guide the model's adjustment, while no target labels means unsupervised learning because the method must find structure without a supplied answer. This first split removes many attractive but unsuitable choices before you examine the algorithm's mechanics. Ask whether the requested output is a category, a numeric estimate, fewer features, or groups, and connect that output to the question the manager or client will actually ask after the model runs. In a classification example, the label might be default or no default. A regression example might forecast revenue. Feature reduction keeps much of the useful signal in fewer dimensions. Clustering searches for similar observations when no group label was given. Then use training and validation evidence to see whether the model generalizes beyond the observations that shaped it, because a low training error can simply mean that the model has learned noise, unusual cases, or accidental relationships in that sample. When validation performance falls sharply, treat the gap as a clue about overfitting and consider a simpler model, stronger regularization, better feature choices, or more data if the vignette supports that remedy. Deep learning is a separate clue about multiple learned representation layers, not a synonym for a complicated model, so do not select it just because the data set is large or the proposed task sounds advanced. Look for a setting where the method learns useful intermediate representations, such as visual edges that build into objects or word patterns that build into meaning, and still check whether the case gives evidence that the extra flexibility earns its cost.

Loading diagram…

The flowchart gives you a first pass through the decision: check whether the case supplies labels, then let that answer guide the next question. The image below expands that route into the methods you may compare. As you read it, keep the requested output in view: predicting a labeled response, representing variables with fewer dimensions, and assigning unlabeled observations to groups are different jobs, even when they begin with the same data.

These choices connect in a sequence you can repeat under exam pressure: learning type narrows the candidate set, the requested output points toward a model structure, the data and assumptions separate plausible methods, validation performance shows whether the result generalizes, and the cost of an error tells you which weakness deserves attention first. The rest of the module gives you the cues that make that sequence fast, including signals that distinguish prediction from description, a useful reduction from a misleading one, a real cluster from a pattern created by scaling, and an error pattern that calls for a change in model complexity rather than a change in target. A common candidate move is to see many variables and immediately choose the most powerful-sounding algorithm, or to see a high accuracy number and treat it as proof that the model is ready for use, without asking how the target was formed, whether information leaked into the features, or how the result was tested. That move feels right because the method name seems to promise a solution and the reported score appears objective, while a crowded data set makes a flexible model seem better suited to the job than a modest baseline. The giveaway is a mismatch between the request and the evidence: labels are available but the answer treats the task as unsupervised, the output is numeric but the answer describes classes, or training performance is cited without validation performance. Pause at that mismatch, explain what the model is actually being asked to learn, and use the method's assumptions and the error pattern to choose the remedy rather than choosing by reputation.

High-yield by chapter

  • Supervised vs unsupervised learning and deep learning - Rule: labels present means supervised learning; no target labels means unsupervised learning; deep learning uses multiple representation-learning layers. The exam may ask you to classify the learning task or recognize the model family from a vignette. Trap: a complicated algorithm is not automatically deep learning; look for multiple learned layers.

  • Overfitting, bias-variance trade-off and cross-validation - Rule: low training error with materially higher validation or test error signals overfitting; use validation or cross-validation to assess generalization and select complexity. The exam may give an error pattern and ask for a diagnosis or remedy. Trap: choosing the lowest training error ignores unseen data and may reward noise rather than a model that generalizes.

  • Penalized regression, SVM, KNN, CART and random forests - Rule: coefficient shrinkage signals penalized regression; margins, local similarity, observation splits, and aggregated randomized trees point respectively to SVM, KNN, CART, and random forests. The exam asks you to match these structural cues and the response to a supervised method. Trap: picking a familiar name before checking the requested output and data structure.

  • Principal components analysis and clustering algorithms - Rule: PCA reduces correlated continuous variables to fewer continuous components; k-means assigns observations to a chosen number of groups; hierarchical clustering builds nested groups. The exam may distinguish dimension reduction from fixed-count or exploratory grouping. Trap: PCA and clustering both transform data, but components are not observation groups.

For the supervised outcome, use this map when the case supplies a response and predictor structure.

AlgorithmBest suited whenCue in vignette
Penalized regressionMany predictors, linear signalCoefficients shrink
Support vector machineMargin-based classification, nonlinear boundarySeparating margin
k-nearest neighborNearby observations share outcomesLocal similarity
Classification and regression treeNonlinear interactions need splitsDecision rules
Ensemble learningBase models have complementary errorsAggregate predictions
Random forestRandomized trees improve stabilityTree aggregation

The best-suited method is the one supported by the case evidence. A random forest is itself an ensemble, but the random-tree structure gives you a more specific cue.

Read the two supervised tables together as a screening sequence. First use the response and predictor structure to narrow the candidate methods; then check the more specific cue, such as coefficient shrinkage, a separating margin, local similarity, observation splits, or randomized tree aggregation. That extra cue matters when several methods could produce predictions. The vignette's evidence, rather than a method's general popularity, should support the final choice.

For the unsupervised outcome, first identify whether the requested output is a smaller feature set or a grouping structure.

AlgorithmBest suited whenOutput
Principal components analysisCorrelated continuous variables, fewer featuresContinuous components
k-means clusteringCompact groups, count chosen beforehandAssigned group
Hierarchical clusteringNested groups, count explored laterGroup hierarchy

Once you know the requested output, the unsupervised choice becomes clearer. PCA returns continuous components that summarize variables, while clustering assigns observations to groups or reveals how groups nest. A case that asks for fewer features points toward dimension reduction; a case that asks which observations resemble one another points toward grouping. Then use the stated preference for a count chosen beforehand or explored later to distinguish the two clustering approaches.

How the exam tests this module

The exam compresses model selection into a short case. Read facts as clues, not decoration.

Treat the question shapes below as changes in emphasis within the same decision process. One case may supply labels and ask for a learning category; another may keep the labels but ask which supervised method fits a margin or local-similarity cue. An unlabeled case can instead ask for fewer dimensions or for groups. In each version, name the output first, then connect the evidence to the method, and check whether the tempting alternative answers a different question.

Question shapeWhat is givenWhat is asked and the trap
Learning typeLabels, target, layered representationsClassify learning; complexity is not deep learning
OverfittingTraining and validation or test errorsDiagnose and remedy; training fit alone misleads
Supervised selectionResponse, predictors, boundary, sample structureChoose algorithm; names do not determine suitability
Unsupervised selectionNo target, dimensions, grouping requestChoose method; PCA does not create groups

Read the case in order. First decide whether a target label exists. Next identify the requested output and the structural cue, such as a margin, neighbor relationship, split, component, or group.

Finally inspect training versus validation or test performance. If the question asks for a remedy, choose the response that reduces overfitting or improves generalization, not the model with the lowest training error. An item set can reuse one case while changing the question from learning type to algorithm choice, diagnosis, or remedy.

Check yourself

Practice

An investment firm compares machine learning approaches for prediction and segmentation. Analysts report whether target labels exist, the response type, the model structure, and training and validation errors.

Question 1

A data set contains labeled observations and a continuous target. The analyst wants to predict that target for new observations. Which broad learning type is best described?

Question 2

A flexible model has very low training error and materially higher validation error. Which diagnosis and response best fit?

Question 3

A labeled problem has a categorical outcome. The case emphasizes a nonlinear boundary and a desire to use separating margins. Which supervised algorithm is best suited?

Question 4

An unlabeled data set has many correlated continuous variables. The analyst wants fewer continuous features, not groups of observations. Which unsupervised algorithm is best suited?

Revision snapshot

Rule or cueMethod or responseDecision
Labels presentSupervised learningPredict a target
No target labelsUnsupervised learningFind structure
Multiple representation-learning layersDeep learningDo not infer from complexity
Low training error, higher validation or test errorOverfittingReduce flexibility
Coefficient shrinkagePenalized regressionMany predictors
Separating marginsSupport vector machineBoundary-based prediction
Local similarityk-nearest neighborNearby outcomes
Observation splitsClassification and regression treeNonlinear rules
Model aggregationEnsemble learning, random forestCombine predictions
Dimension reductionPCAFewer features
Chosen group countk-means clusteringAssign groups
Nested groupsHierarchical clusteringExplore hierarchy

Use labels first, then the requested output, then validation evidence. Labels present means supervised learning. No target labels means unsupervised learning. Deep learning uses multiple representation-learning layers. Overfitting is low training error with materially higher validation or test error. Penalized regression shrinks coefficients, trees split observations, ensembles aggregate models, support vector machines use separating margins, k-nearest neighbor uses local similarity, PCA reduces dimensions, k-means assigns observations to a chosen number of groups, and hierarchical clustering builds nested groups.

Unlock the full lesson and continue reading

Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more

Scan to download app

Scan to download
UNLOCK FREE ACCESS

Practice Questions: Machine Learning

  1. 1. For 36 independent monthly active returns, the mean is 0.80% and sample standard deviation is 2.40%. At 5%, test H₀: μ ≤ 0 against H₁: μ > 0; the one-tailed critical t-value is 1.69.

    • A. Fail to reject the null because 0.80% is economically small
    • B. Fail to reject the null because the test statistic is below 1.96
    • C. Reject the null in favor of a positive mean return
    Show answer

    Answer: C. Reject the null in favor of a positive mean return

    Reject the null in favor of a positive mean return - The standard error is 2.40%/√36 = 0.40%, giving a t-statistic of 0.80%/0.40% = 2.00. - Because 2.00 exceeds the supplied one-tailed critical value of 1.69, reject H₀ at 5% in favor of a positive mean return. Fail to reject the null because 0.80% is economically small - Economic size does not determine whether the sample mean is statistically significant in this hypothesis test. - The mean of 0.80% produces a t-statistic of 2.00, above the rejection threshold of 1.69. Fail to reject the null because the test statistic is below 1.96 - The test statistic is 2.00, so it is not below 1.96. - Moreover, 1.96 is not the supplied one-tailed t critical value; the applicable threshold is 1.69.

  2. 2. A deposit earns a nominal annual rate of 7.20%, compounded monthly. The calculated value of its effective annual return is closest to:

    • A. 7.20%
    • B. 7.44%
    • C. 7.47%
    Show answer

    Answer: B. 7.44%

    7.44% - The monthly rate is 0.60% (7.20% ÷ 12). - Compounding for 12 months gives (1 + 0.072/12)^12 − 1 ≈ 7.44%. 7.20% - This is the stated nominal annual rate, not the effective annual return. - It omits the interest earned on interest during the 12 monthly compounding periods. 7.47% - This results from using continuous compounding: e^0.072 − 1 ≈ 7.47%. - The deposit compounds monthly, so its effective annual return is 7.44% instead.

  3. 3. An investor deposits USD 1,000 at the beginning of each quarter for two years. At 8% nominal compounded quarterly, the value immediately after the eighth quarter's interest is credited is closest to:

    • A. USD 8,000.00
    • B. USD 8,582.97
    • C. USD 8,754.63
    Show answer

    Answer: C. USD 8,754.63

    USD 8,754.63 - The eight beginning-of-quarter deposits form an annuity due earning 8% ÷ 4 = 2% per quarter. - Immediately after the eighth quarter’s interest is credited, their value is USD 1,000(1.02⁸ − 1) ÷ 0.02 = USD 8,754.63. USD 8,000.00 - This is eight deposits × USD 1,000 = USD 8,000, with no interest included. - It misses the interest earned because every deposit is made before a quarter’s interest is credited. USD 8,582.97 - USD 1,000[(1.02⁸ − 1) ÷ 0.02] = USD 8,582.97 treats the deposits as an ordinary annuity made at quarter-end. - Beginning-of-quarter deposits each earn one additional quarter of interest, requiring multiplication by 1.02.

  4. 4. An investor deposits USD 10,000 for 18 months at a stated annual rate of 6%, compounded monthly. The calculated future value is closest to:

    • A. USD 10,900
    • B. USD 10,913
    • C. USD 10,939
    Show answer

    Answer: C. USD 10,939

    USD 10,939 - The monthly rate is 0.5% (6% ÷ 12), and 18 months gives 18 compounding periods. - The future value is USD 10,000 × (1.005)^18 ≈ USD 10,939. USD 10,900 - This comes from simple interest: USD 10,000 × [1 + (0.06 × 1.5)] = USD 10,900. - It is too low because it omits the interest earned on interest during the 18 monthly periods. USD 10,913 - This comes from using annual rather than monthly compounding: USD 10,000 × (1.06)^1.5 ≈ USD 10,913. - The stated rate is compounded monthly, so the calculation must use 0.005 per month for 18 periods.

  5. 5. For 36 independent monthly returns, the sample mean is 0.8% and sample standard deviation is 2.4%. Testing H0: μ ≤ 0 against Ha: μ > 0 at 5%, with critical t = 1.690, the analyst should:

    • A. Reject the null hypothesis
    • B. Fail to reject because the test is one-tailed
    • C. Fail to reject because the sample mean is below 1.0%
    Show answer

    Answer: A. Reject the null hypothesis

    Reject the null hypothesis - The standard error is 2.4%/√36 = 0.4%, so the t-statistic is (0.8% − 0)/0.4% = 2.00. - Because 2.00 exceeds the stated 5% critical t-value of 1.690, reject H0 in favor of μ > 0. Fail to reject because the test is one-tailed - The alternative μ > 0 places the rejection region in the upper tail; being one-tailed does not itself justify failing to reject. - The calculated t-statistic of 2.00 is above the stated upper-tail cutoff of 1.690. Fail to reject because the sample mean is below 1.0% - The null hypothesis compares μ with 0, not with a 1.0% threshold. - Although the sample mean is 0.8%, its t-statistic of 2.00 exceeds the critical value of 1.690.

  6. 6. A portfolio's mean annual return is 8.00% from 36 independent observations, with sample standard deviation 12.00%. Using a 1.96 critical value, the calculated 95% confidence interval is closest to:

    • A. 7.35% to 8.65%
    • B. 4.08% to 11.92%
    • C. 3.30% to 12.70%
    Show answer

    Answer: B. 4.08% to 11.92%

    4.08% to 11.92% - The standard error is 12.00% ÷ √36 = 2.00% because the sample contains 36 independent observations. - Using the specified critical value gives 8.00% ± 1.96(2.00%), or 4.08% to 11.92%. 7.35% to 8.65% - This interval results from dividing the standard deviation by 36 instead of √36. - That slip gives 8.00% ± 1.96(12.00% ÷ 36), which rounds to 7.35% to 8.65%. 3.30% to 12.70% - This interval results from using 25 instead of 36 observations when calculating the standard error. - With 25 observations, 8.00% ± 1.96(12.00% ÷ √25) rounds to 3.30% to 12.70%.

  7. 7. An analyst obtains a p-value of 0.030 for a two-sided test conducted at the 5% significance level. The analyst should most likely:

    • A. Reject the null hypothesis
    • B. Fail to reject the null hypothesis
    • C. Accept the null hypothesis as true
    Show answer

    Answer: A. Reject the null hypothesis

    Reject the null hypothesis - The p-value of 0.030 is below the 0.050 significance level. - The test result is therefore statistically significant, so the analyst rejects the null hypothesis. Fail to reject the null hypothesis - That decision would apply if the p-value were greater than 0.050, not 0.030. - Choosing it reverses the decision rule for this test. Accept the null hypothesis as true - A hypothesis test cannot establish that the null hypothesis is true. - Even when a p-value exceeds the significance level, the decision is to fail to reject, not to accept the null hypothesis.

  8. 8. An analyst compares one-period simple returns with continuously compounded returns for an asset whose price remains positive. Which conclusion is most accurate?

    • A. Both returns have a lower bound of −100%
    • B. Neither return has a finite lower bound
    • C. Only the continuously compounded return is unbounded below
    Show answer

    Answer: C. Only the continuously compounded return is unbounded below

    Only the continuously compounded return is unbounded below - The simple return, \(P1/P0-1\), has a lower bound of −100% because both prices are positive. - The continuously compounded return, \(\ln(P1/P0)\), approaches negative infinity as the ending price approaches zero. Both returns have a lower bound of −100% - −100% is the lower bound for the simple return, not the continuously compounded return. - The logarithm of a positive price relative has no finite lower bound. Neither return has a finite lower bound - The continuously compounded return is unbounded below, but the simple return is not. - A positive ending price makes the simple return greater than −100%, however close the price gets to zero.

  9. 9. A portfolio invests 60% in an asset with 12% volatility and 40% in an asset with 20% volatility; correlation is 0.25. The calculated diversification ratio is closest to:

    • A. 0.792
    • B. 1.000
    • C. 1.264
    Show answer

    Answer: C. 1.264

    1.264 - The portfolio volatility is \(\sqrt{0.60^2(0.12^2)+0.40^2(0.20^2)+2(0.60)(0.40)(0.25)(0.12)(0.20)}=\sqrt{0.014464}\approx 12.03\%\). - The weighted average asset volatility is \(0.60(12\%)+0.40(20\%)=15.20\%\), so the diversification ratio is \(15.20\%/12.03\%\approx 1.264\). 0.792 - Reversing the ratio gives portfolio volatility divided by weighted average asset volatility, approximately \(12.03\%/15.20\%=0.791\), which is closest to 0.792. - The diversification ratio instead places the weighted average asset volatility in the numerator. 1.000 - A ratio of 1.000 would result if the assets were perfectly positively correlated, making portfolio volatility equal to \(15.20\%\). - The stated correlation is 0.25, so portfolio volatility is lower than the weighted average asset volatility.

Flashcards: Machine Learning

  1. 1. What is a training data set?

    Show answer

    sample used to fit the model

  2. 2. When is overfitting an issue with supervised ML?

    Show answer

    a large number of features (independent variables) are included in the data sample

  3. 3. What are typical tasks for supervised learning?

    Show answer

    classification and regression

  4. 4. What is accuracy?

    Show answer

    the % of correctly predicted classes out of total predictions

  5. 5. When given the prob. of correct call, IC =

    Show answer

    \= 2(% correct) - 1

  6. 6. What are the investment applications of KNN?

    Show answer

    - predicting bankruptcy - assigning a bond to a ratings class - predicting stock prices - creating customized indices

  7. 7. What are the investment applications of random forest?

    Show answer

    - factor-based asset allocation - prediction models for success of an IPO

  8. 8. When is LASSO useful?

    Show answer

    in building parsimonious models through feature reduction

  9. 9. What kind of mean is a F1 score?

    Show answer

    the harmonic mean of recall and precision

  10. 10. Do you want more precision or recall if the cost of a Type II error is large?

    Show answer

    recall

Everything you need for CFA prep

Get full Oncourse access with lessons, practice questions, flashcards and AI study tools.

GET STARTED FOR FREE
75% OFFLimited time offer
GET 75% OFF