<commit_before>from pyspark import keyword_only
from pyspark.ml.param.shared import *
from pyspark.ml.util import JavaMLReadable, JavaMLWritable
from pyspark.ml.wrapper import JavaTransformer

from ai.h2o.sparkling.sparkSpecifics import get_input_kwargs


class ColumnPruner(JavaTransformer, JavaMLReadable, JavaMLWritable):
    keep = Param(Params._dummy(), "keep", "keep the specified columns in the frame")

    columns = Param(Params._dummy(), "columns", "specified columns")

    @keyword_only
    def __init__(self, keep=False, columns=[]):
        Initializer.load_sparkling_jar()
        super(ColumnPruner, self).__init__()
        self._java_obj = self._new_java_obj("py_sparkling.ml.features.ColumnPruner", self.uid)
        self._setDefault(keep=False, columns=[])
        kwargs = get_input_kwargs(self)
        self.setParams(**kwargs)

    @keyword_only
    def setParams(self, keep=False, columns=[]):<commit_msg>[SW-1480][FollowUp] Cleanup of PySparkling package -> moving to new package ai.h2o (#1404)<commit_after>from pyspark import keyword_only
from pyspark.ml.param.shared import *
from pyspark.ml.util import JavaMLReadable, JavaMLWritable
from pyspark.ml.wrapper import JavaTransformer

from ai.h2o.sparkling import Initializer
from ai.h2o.sparkling.sparkSpecifics import get_input_kwargs


class ColumnPruner(JavaTransformer, JavaMLReadable, JavaMLWritable):
    keep = Param(Params._dummy(), "keep", "keep the specified columns in the frame")

    columns = Param(Params._dummy(), "columns", "specified columns")

    @keyword_only
    def __init__(self, keep=False, columns=[]):
        Initializer.load_sparkling_jar()
        super(ColumnPruner, self).__init__()
        self._java_obj = self._new_java_obj("py_sparkling.ml.features.ColumnPruner", self.uid)
        self._setDefault(keep=False, columns=[])
        kwargs = get_input_kwargs(self)
        self.setParams(**kwargs)

    @keyword_only
    def setParams(self, keep=False, columns=[]):
{'fraction_non_alphanumeric': 0.10880566801619433, 'fraction_numerical': 0.006072874493927126, 'mean_word_length': 4.664756446991404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2244256', 'n_tokens_mistral': 638, 'n_tokens_neox': 611, 'n_words': 133}