Пример #1
0
    def _handleOverwrite(self, path):
        from pyspark.ml.wrapper import JavaWrapper

        _java_obj = JavaWrapper._new_java_obj(
            "org.apache.spark.ml.util.FileSystemOverwrite")
        wrapper = JavaWrapper(_java_obj)
        wrapper._call_java("handleOverwrite", path, True, self.sc._jsc.sc())
Пример #2
0
    def _handleOverwrite(self, path: str) -> None:
        from pyspark.ml.wrapper import JavaWrapper

        _java_obj = JavaWrapper._new_java_obj(  # type: ignore[attr-defined]
            "org.apache.spark.ml.util.FileSystemOverwrite")
        wrapper = JavaWrapper(_java_obj)
        wrapper._call_java(  # type: ignore[attr-defined]
            "handleOverwrite", path, True, self.sparkSession._jsparkSession)
Пример #3
0
    def _handleOverwrite(self, path):
        from pyspark.ml.wrapper import JavaWrapper

        _java_obj = JavaWrapper._new_java_obj("org.apache.spark.ml.util.FileSystemOverwrite")
        wrapper = JavaWrapper(_java_obj)
        wrapper._call_java("handleOverwrite", path, True, self.sc._jsc.sc())
Пример #4
0
 def saveBooster(self, save_path):
     jxgb = JavaWrapper(self.getBooster())
     jxgb._call_java("saveModel", save_path)
Пример #5
0
 def fscore(self,fmap=""):
     jxgb = JavaWrapper(self.getBooster())
     return jxgb._call_java("getFeatureScore",fmap)
Пример #6
0
 def get_dump(self,fmap="",with_stats=True,format= "text"):
     jxgb = JavaWrapper(self.getBooster())
     return jxgb._call_java("getModelDump",fmap,with_stats,format)