class_docstr: Logistic regression estimator.
  
  .. versionadded:: 3.5.0
  
  Examples
  --------
  >>> from pyspark.ml.connect.classification import LogisticRegression, LogisticRegressionModel
  >>> lor = LogisticRegression(maxIter=20, learningRate=0.01)
  >>> dataset = spark.createDataFrame([
  ...     ([1.0, 2.0], 1),
  ...     ([2.0, -1.0], 1),
  ...     ([-3.0, -2.0], 0),
  ...     ([-1.0, -2.0], 0),
  ... ], schema=['features', 'label'])
  >>> lor_model = lor.fit(dataset)
  >>> transformed_dataset = lor_model.transform(dataset)
  >>> transformed_dataset.show()
  +------------+-----+----------+--------------------+
  |    features|label|prediction|         probability|
  +------------+-----+----------+--------------------+
  |  [1.0, 2.0]|    1|         1|[0.02423273026943...|
  | [2.0, -1.0]|    1|         1|[0.09334788471460...|
  |[-3.0, -2.0]|    0|         0|[0.99808156490325...|
  |[-1.0, -2.0]|    0|         0|[0.96210002899169...|
  +------------+-----+----------+--------------------+
  >>> lor_model.saveToLocal("/tmp/lor_model")
  >>> LogisticRegressionModel.loadFromLocal("/tmp/lor_model")
  LogisticRegression_...
class_docstr_tok: ["Logistic","regression","estimator",".","..","versionadded",":",":","3.5.0","Examples","--","--","--","--",">",">",">","from","pyspark.ml.connect.classification","import","LogisticRegression",",","LogisticRegressionModel",">",">",">","lor","=","LogisticRegression","(","maxIter=20",",","learningRate=0.01",")",">",">",">","dataset","=","spark.createDataFrame","(","[","...","(","[","1.0",",","2.0","]",",","1",")",",","...","(","[","2.0",",","-1.0","]",",","1",")",",","...","(","[","-3.0",",","-2.0","]",",","0",")",",","...","(","[","-1.0",",","-2.0","]",",","0",")",",","...","]",",","schema=","[","'features","'",",","'label","'","]",")",">",">",">","lor_model","=","lor.fit","(","dataset",")",">",">",">","transformed_dataset","=","lor_model.transform","(","dataset",")",">",">",">","transformed_dataset.show","(",")","+","--","--","--","--","--","--","+","--","--","-+","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+","|","features|label|prediction|","probability|","+","--","--","--","--","--","--","+","--","--","-+","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+","|","[","1.0",",","2.0","]","|","1|","1|","[","0.02423273026943","...","|","|","[","2.0",",","-1.0","]","|","1|","1|","[","0.09334788471460","...","|","|","[","-3.0",",","-2.0","]","|","0|","0|","[","0.99808156490325","...","|","|","[","-1.0",",","-2.0","]","|","0|","0|","[","0.96210002899169","...","|","+","--","--","--","--","--","--","+","--","--","-+","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","+",">",">",">","lor_model.saveToLocal","(","``","\/tmp\/lor_model","''",")",">",">",">","LogisticRegressionModel.loadFromLocal","(","``","\/tmp\/lor_model","''",")","LogisticRegression_","..."]
docstr: __init__(
      self,
      *,
      featuresCol: str = "features",
      labelCol: str = "label",
      predictionCol: str = "prediction",
      probabilityCol: str = "probability",
      maxIter: int = 100,
      tol: float = 1e-6,
      numTrainWorkers: int = 1,
      batchSize: int = 32,
      learningRate: float = 0.001,
      momentum: float = 0.9,
      seed: int = 0,
  )
docstr_tok: ["__init__","(","self",",","*",",","featuresCol",":","str","=","``","features","''",",","labelCol",":","str","=","``","label","''",",","predictionCol",":","str","=","``","prediction","''",",","probabilityCol",":","str","=","``","probability","''",",","maxIter",":","int","=","100",",","tol",":","float","=","1e-6",",","numTrainWorkers",":","int","=","1",",","batchSize",":","int","=","32",",","learningRate",":","float","=","0.001",",","momentum",":","float","=","0.9",",","seed",":","int","=","0",",",")"]
code: def __init__(
      self,
      *,
      featuresCol: str = "features",
      labelCol: str = "label",
      predictionCol: str = "prediction",
      probabilityCol: str = "probability",
      maxIter: int = 100,
      tol: float = 1e-6,
      numTrainWorkers: int = 1,
      batchSize: int = 32,
      learningRate: float = 0.001,
      momentum: float = 0.9,
      seed: int = 0,
  ):
      """
      __init__(
          self,
          *,
          featuresCol: str = "features",
          labelCol: str = "label",
          predictionCol: str = "prediction",
          probabilityCol: str = "probability",
          maxIter: int = 100,
          tol: float = 1e-6,
          numTrainWorkers: int = 1,
          batchSize: int = 32,
          learningRate: float = 0.001,
          momentum: float = 0.9,
          seed: int = 0,
      )
      """
      super(LogisticRegression, self).__init__()
      kwargs = self._input_kwargs
      self._set(**kwargs)
  
imports: from typing import Any, Dict, Union, List, Tuple, Callable, Optional
  import math
  import torch
  import torch.nn
  import numpy
  import pandas
  from pyspark import keyword_only
  from pyspark.ml.connect.base import _PredictorParams
  from pyspark.ml.param.shared import HasProbabilityCol
  from pyspark.sql import DataFrame
  from pyspark.ml.common import inherit_doc
  from pyspark.ml.torch.distributor import TorchDistributor
  from pyspark.ml.param.shared import HasMaxIter, HasFitIntercept, HasTol, HasWeightCol, HasSeed, HasNumTrainWorkers, HasBatchSize, HasLearningRate, HasMomentum
  from pyspark.ml.connect.base import Predictor, PredictionModel
  from pyspark.ml.connect.io_utils import ParamsReadWrite, CoreModelReadWrite
  from pyspark.sql import functions
label_desc: Use image node_id 1 to create a new LogisticRegression object from inherited base classes: Predictor, _LogisticRegressionParams, ParamsReadWrite with example: obj = LogisticRegression()