-
Notifications
You must be signed in to change notification settings - Fork 23
/
B05028_05_json.json
82 lines (68 loc) · 2.51 KB
/
B05028_05_json.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// ----------------------------------------------------------------------------
// JSON templates and outputs for chapter 5
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Managing variables
// ----------------------------------------------------------------------------
{
"groups" : {},
"assignments" : { },
"outputs":["ALL_INPUTS"]
}
// ----------------------------------------------------------------------------
// Grouping variables
// ----------------------------------------------------------------------------
"group_name": "group('first_variable','second_variable' )"
// ----------------------------------------------------------------------------
"groups" : {
"TO_BE_NORMALIZED" : "group('age','fare')",
},
// ----------------------------------------------------------------------------
"groups" : {
"N_GRAM_TEXT" : "group_remove(ALL_TEXT, 'header')",
},
// ----------------------------------------------------------------------------
// Naming variables with assignments
// ----------------------------------------------------------------------------
"assignment_name": "transformation('group_name' )"
// ----------------------------------------------------------------------------
"assignments": {
"normalized_numeric": "normalize(TO_BE_NORMALIZED)",
}
// ----------------------------------------------------------------------------
"assignments": {
"bigrams": "ngram(N_GRAM_TEXT,2)",
}
// ----------------------------------------------------------------------------
// Specifying outputs
// ----------------------------------------------------------------------------
"outputs": [
"header",
"subject",
"body",
"bigrams"
]
// ----------------------------------------------------------------------------
"outputs": [
"ALL_TEXT",
"bigrams"
]
// ----------------------------------------------------------------------------
// Applying recipes to the Titanic dataset
// ----------------------------------------------------------------------------
{
"groups": {
"NUMERIC_VARS_QB_50": "group('sibsp','parch')",
"NUMERIC_VARS_QB_100": "group('age')",
"NUMERIC_VARS_QB_10": "group('fare')"
},
"assignments": {},
"outputs": [
"ALL_BINARY",
"ALL_CATEGORICAL",
"quantile_bin(NUMERIC_VARS_QB_50,50)",
"quantile_bin(NUMERIC_VARS_QB_100,100)",
"quantile_bin(NUMERIC_VARS_QB_10,10)",
"ALL_TEXT"
]
}