Code Duplication    Length = 12-12 lines in 3 locations

examples/tested_and_supported_packages/multiprocessing_example.py 1 location

@@ 42-53 (lines=12) @@
39
    return scores.mean()
40
41
42
def model_rfc(opt):
43
    rfc = RandomForestClassifier(
44
        n_estimators=opt["n_estimators"],
45
        criterion=opt["criterion"],
46
        max_features=opt["max_features"],
47
        min_samples_split=opt["min_samples_split"],
48
        min_samples_leaf=opt["min_samples_leaf"],
49
        bootstrap=opt["bootstrap"],
50
    )
51
    scores = cross_val_score(rfc, X, y, cv=3)
52
53
    return scores.mean()
54
55
56
def model_gbc(opt):

examples/tested_and_supported_packages/joblib_example.py 1 location

@@ 28-39 (lines=12) @@
25
    return scores.mean()
26
27
28
def model_rfc(opt):
29
    rfc = RandomForestClassifier(
30
        n_estimators=opt["n_estimators"],
31
        criterion=opt["criterion"],
32
        max_features=opt["max_features"],
33
        min_samples_split=opt["min_samples_split"],
34
        min_samples_leaf=opt["min_samples_leaf"],
35
        bootstrap=opt["bootstrap"],
36
    )
37
    scores = cross_val_score(rfc, X, y, cv=3)
38
39
    return scores.mean()
40
41
42
def model_gbc(opt):

examples/optimization_applications/multiple_different_optimizers.py 1 location

@@ 18-29 (lines=12) @@
15
X, y = data.data, data.target
16
17
18
def model_rfc(opt):
19
    rfc = RandomForestClassifier(
20
        n_estimators=opt["n_estimators"],
21
        criterion=opt["criterion"],
22
        max_features=opt["max_features"],
23
        min_samples_split=opt["min_samples_split"],
24
        min_samples_leaf=opt["min_samples_leaf"],
25
        bootstrap=opt["bootstrap"],
26
    )
27
    scores = cross_val_score(rfc, X, y, cv=3)
28
29
    return scores.mean()
30
31
32
def model_gbc(opt):