Commit 8b73bddd authored by Vivien Kraus's avatar Vivien Kraus

Merge branch '116-boolean-features-are-not-encoded-as-nominal' into 'develop'

Resolve "Boolean features are not encoded as nominal"

Closes #116

See merge request !114
parents 79985e26 2f42d68e
Pipeline #141628 passed with stages
in 56 minutes and 40 seconds
......@@ -2439,7 +2439,7 @@ This is most easily done with the R =glmnet= package.
#+name: r-function-learn-lasso
#+BEGIN_SRC R :eval no
learn_lasso <- function (data) {
x <- model.matrix (score ~ (n_players_eq_3 + n_players_eq_4 + n_players_eq_5 + with_call)
x <- model.matrix (score ~ (n_players_eq_3 + n_players_eq_4 + n_players_eq_5 + with_call_eq_yes)
,* (type_eq_TAROT_BID_EVENT + type_eq_TAROT_DECL_EVENT + type_eq_TAROT_CALL_EVENT
+ type_eq_TAROT_DISCARD_EVENT + type_eq_TAROT_HANDFUL_EVENT + type_eq_TAROT_CARD_EVENT)
,* .,
......
......@@ -514,7 +514,7 @@ namespace Tarot {
for (int i = 3; i <= 5; i++) {
my_output += "@attribute n_players_eq_%d numeric\n".printf (i);
}
my_output += "@attribute with_call numeric\n";
my_output += "@attribute with_call_eq_yes numeric\n";
for (int i = 0; i <= 24; i++) {
my_output += "@attribute trick_leq_%d numeric\n".printf (i);
}
......@@ -524,7 +524,7 @@ namespace Tarot {
foreach (var t in types) {
my_output += "@attribute type_eq_%s numeric\n".printf (t.to_string ());
}
my_output += "@attribute partner_known numeric\n";
my_output += "@attribute partner_known_eq_yes numeric\n";
foreach (var b in bids) {
my_output += "@attribute bid_minimum_leq_%s numeric\n".printf (b.to_string ());
}
......@@ -555,9 +555,9 @@ namespace Tarot {
for (int i = 0; i <= 14; i++) {
my_output += "@attribute bid_n_longest_leq_%d numeric\n".printf (i);
}
my_output += "@attribute bid_has_petit numeric\n";
my_output += "@attribute bid_has_excuse numeric\n";
my_output += "@attribute bid_has_twentyone numeric\n";
my_output += "@attribute bid_has_petit_eq_yes numeric\n";
my_output += "@attribute bid_has_excuse_eq_yes numeric\n";
my_output += "@attribute bid_has_twentyone_eq_yes numeric\n";
for (int i = 0; i <= 21; i++) {
my_output += "@attribute bid_n_trumps_leq_%d numeric\n".printf (i);
}
......@@ -576,15 +576,15 @@ namespace Tarot {
for (int i = 0; i <= 21; i++) {
my_output += "@attribute bid_median_trump_leq_%d numeric\n".printf (i);
}
my_output += "@attribute team_attack numeric\n";
my_output += "@attribute team_defence numeric\n";
my_output += "@attribute team_attack_eq_yes numeric\n";
my_output += "@attribute team_defence_eq_yes numeric\n";
for (int i = 0; i <= 4; i++) {
my_output += "@attribute n_trick_players_already_played_leq_%d numeric\n".printf (i);
}
for (int i = 0; i <= 5; i++) {
my_output += "@attribute n_allies_after_last_opponent_leq_%d numeric\n".printf (i);
}
my_output += "@attribute play_called_suit numeric\n";
my_output += "@attribute play_called_suit_eq_yes numeric\n";
for (int i = 0; i <= 21; i++) {
my_output += "@attribute play_n_times_lead_leq_%d numeric\n".printf (i);
}
......@@ -594,13 +594,13 @@ namespace Tarot {
for (int i = 0; i <= 37; i++) {
my_output += "@attribute play_suit_remaining_points_leq_%d numeric\n".printf (i);
}
my_output += "@attribute ally_may_be_minor_master numeric\n";
my_output += "@attribute ennemy_may_be_minor_master numeric\n";
my_output += "@attribute ally_may_be_minor_master_eq_yes numeric\n";
my_output += "@attribute ennemy_may_be_minor_master_eq_yes numeric\n";
for (int i = 0; i <= 21; i++) {
my_output += "@attribute n_trumps_remaining_leq_%d numeric\n".printf (i);
}
my_output += "@attribute ally_may_be_trump_master numeric\n";
my_output += "@attribute ennemy_may_be_trump_master numeric\n";
my_output += "@attribute ally_may_be_trump_master_eq_yes numeric\n";
my_output += "@attribute ennemy_may_be_trump_master_eq_yes numeric\n";
for (int i = 0; i <= 45; i++) {
my_output += "@attribute n_halfpoints_in_trick_leq_%d numeric\n".printf (i);
}
......@@ -610,13 +610,13 @@ namespace Tarot {
foreach (var b in bids) {
my_output += "@attribute strategy_bid_leq_%s numeric\n".printf (b.to_string ());
}
my_output += "@attribute strategy_outbid numeric\n";
my_output += "@attribute strategy_call_shortest numeric\n";
my_output += "@attribute strategy_call_second_shortest numeric\n";
my_output += "@attribute strategy_call_second_longest numeric\n";
my_output += "@attribute strategy_call_longest numeric\n";
my_output += "@attribute strategy_call_myself numeric\n";
my_output += "@attribute strategy_call_marriage numeric\n";
my_output += "@attribute strategy_outbid_eq_yes numeric\n";
my_output += "@attribute strategy_call_shortest_eq_yes numeric\n";
my_output += "@attribute strategy_call_second_shortest_eq_yes numeric\n";
my_output += "@attribute strategy_call_second_longest_eq_yes numeric\n";
my_output += "@attribute strategy_call_longest_eq_yes numeric\n";
my_output += "@attribute strategy_call_myself_eq_yes numeric\n";
my_output += "@attribute strategy_call_marriage_eq_yes numeric\n";
for (int i = 0; i <= 4; i++) {
my_output += "@attribute strategy_discard_save_queens_leq_%d numeric\n".printf (i);
}
......@@ -641,14 +641,14 @@ namespace Tarot {
for (int i = 0; i <= 6; i++) {
my_output += "@attribute strategy_discard_longest_leq_%d numeric\n".printf (i);
}
my_output += "@attribute strategy_lead_called_suit numeric\n";
my_output += "@attribute strategy_lead_called_suit_eq_yes numeric\n";
for (int i = 0; i <= 21; i++) {
my_output += "@attribute strategy_lead_suit_length_leq_%d numeric\n".printf (i);
}
for (int i = 0; i <= 21; i++) {
my_output += "@attribute strategy_lead_suit_n_times_lead_leq_%d numeric\n".printf (i);
}
my_output += "@attribute strategy_lead_trumps numeric\n";
my_output += "@attribute strategy_lead_trumps_eq_yes numeric\n";
for (int i = 0; i <= 21; i++) {
my_output += "@attribute strategy_n_smaller_kept_leq_%d numeric\n".printf (i);
}
......@@ -661,13 +661,13 @@ namespace Tarot {
for (int i = 0; i <= 21; i++) {
my_output += "@attribute strategy_n_greater_kept_leq_%d numeric\n".printf (i);
}
my_output += "@attribute strategy_play_excuse numeric\n";
my_output += "@attribute strategy_trump_master numeric\n";
my_output += "@attribute strategy_trump_obvious_master numeric\n";
my_output += "@attribute strategy_play_excuse_eq_yes numeric\n";
my_output += "@attribute strategy_trump_master_eq_yes numeric\n";
my_output += "@attribute strategy_trump_obvious_master_eq_yes numeric\n";
for (int i = 0; i <= 9; i++) {
my_output += "@attribute strategy_n_halfpoints_leq_%d numeric\n".printf (i);
}
my_output += "@attribute strategy_oudler numeric\n";
my_output += "@attribute strategy_oudler_eq_yes numeric\n";
} else {
my_output += "@attribute n_players numeric\n";
my_output += "@attribute with_call { no, yes }\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment