<commit_before>#include "choose_parameters.hpp"

#include <algorithm>
#include <cmath>
#include <limits>

#include "nchoosek.hpp"


namespace ifgt
{


namespace
{


    static const int TruncationNumberUpperLimit = 200;


}


Parameters choose_parameters(int d, double h, double epsilon, int k_limit)<commit_msg>Implement shorter choose parameters<commit_after>#include "choose_parameters.hpp"

#include <algorithm>
#include <cmath>
#include <limits>

#include "nchoosek.hpp"


namespace ifgt
{


namespace
{


    static const int TruncationNumberUpperLimit = 200;
    static const int KLimitFactor = 20;

}


Parameters choose_parameters(int d, double h, double epsilon)
{
    return choose_parameters(d, h, epsilon, std::round(KLimitFactor / h));
}


Parameters choose_parameters(int d, double h, double epsilon, int k_limit)
{'fraction_non_alphanumeric': 0.09541062801932366, 'fraction_numerical': 0.00966183574879227, 'mean_word_length': 5.28030303030303, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3069466', 'n_tokens_mistral': 282, 'n_tokens_neox': 257, 'n_words': 74}