class_docstr: Sparse Random Projection using Paddle operations.
  
  Args:
      eps (float, optional): Minimum distortion rate parameter for calculating
          Johnson-Lindenstrauss minimum dimensions. Defaults to 0.1.
      random_state (Optional[int], optional): Uses the seed to set the random
          state for sample_without_replacement function. Defaults to None.
class_docstr_tok: ["Sparse","Random","Projection","using","Paddle","operations",".","Args",":","eps","(","float",",","optional",")",":","Minimum","distortion","rate","parameter","for","calculating","Johnson-Lindenstrauss","minimum","dimensions",".","Defaults","to","0.1.","random_state","(","Optional","[","int","]",",","optional",")",":","Uses","the","seed","to","set","the","random","state","for","sample_without_replacement","function",".","Defaults","to","None","."]
docstr: Generates sparse matrix from the embedding tensor.
  
  Args:
      embedding (Tensor): embedding tensor for generating embedding
  
  Returns:
      (SparseRandomProjection): Return self to be used as
      >>> generator = SparseRandomProjection()
      >>> generator = generator.fit()
docstr_tok: ["Generates","sparse","matrix","from","the","embedding","tensor",".","Args",":","embedding","(","Tensor",")",":","embedding","tensor","for","generating","embedding","Returns",":","(","SparseRandomProjection",")",":","Return","self","to","be","used","as",">",">",">","generator","=","SparseRandomProjection","(",")",">",">",">","generator","=","generator.fit","(",")"]
code: def fit(self, embedding: Tensor) -> "SparseRandomProjection":
      """Generates sparse matrix from the embedding tensor.
  
      Args:
          embedding (Tensor): embedding tensor for generating embedding
  
      Returns:
          (SparseRandomProjection): Return self to be used as
          >>> generator = SparseRandomProjection()
          >>> generator = generator.fit()
      """
      return super().fit(embedding)
  
imports: import warnings
  from typing import Optional
  import paddle
  from paddle import Tensor
  import numpy
  from sklearn.utils.random import sample_without_replacement
label_desc: Use image node_id 2 for calling the SparseRandomProjection obj's underlying member method code with example usage: obj.fit(embedding) and returns: super