<commit_before>"""
This module include the cost sensitive ensemble methods.
"""

# Authors: <NAME> <<EMAIL>>
# License: BSD 3 clause

from sklearn.cross_validation import train_test_split
from costcla.models import CostSensitiveDecisionTreeClassifier
from costcla.models.bagging import BaggingClassifier

#TODO add documentation for all methods
class CostSensitiveRandomForestClassifier(BaggingClassifier):
    def __init__(self,
                 n_estimators=10,
                 combination='majority_voting',
                 n_jobs=1,
                 verbose=False,
                 pruned=False):
        super(BaggingClassifier, self).__init__(
            base_estimator=CostSensitiveDecisionTreeClassifier(max_features='auto', pruned=pruned),
            n_estimators=n_estimators,
            max_samples=1.0,
            max_features=1.0,<commit_msg>CSRF add max features<commit_after>"""
This module include the cost sensitive ensemble methods.
"""

# Authors: <NAME> <<EMAIL>>
# License: BSD 3 clause

from sklearn.cross_validation import train_test_split
from costcla.models import CostSensitiveDecisionTreeClassifier
from costcla.models.bagging import BaggingClassifier

#TODO add documentation for all methods
class CostSensitiveRandomForestClassifier(BaggingClassifier):
    def __init__(self,
                 n_estimators=10,
                 combination='majority_voting',
                 max_features='auto',
                 n_jobs=1,
                 verbose=False,
                 pruned=False):
        super(BaggingClassifier, self).__init__(
            base_estimator=CostSensitiveDecisionTreeClassifier(max_features='auto', pruned=pruned),
            n_estimators=n_estimators,
            max_samples=1.0,
            max_features=1.0,
{'fraction_non_alphanumeric': 0.0757918552036199, 'fraction_numerical': 0.00904977375565611, 'mean_word_length': 3.038812785388128, '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': '5693406', 'n_tokens_mistral': 503, 'n_tokens_neox': 490, 'n_words': 103}