class_docstr: Encodes a list position frequency matrices for a given list of multiple sequence alignments
  
  The default character set is 25 amino acids. If you want to use a different character set, such as nucleotides, simply pass in
  a list of character strings in the featurizer constructor.
  
  The max_length parameter is the maximum length of the sequences to be featurized. If you want to featurize longer sequences, modify the
  max_length parameter in the featurizer constructor.
  
  The final row in the position frequency matrix is the unknown set, if there are any characters which are not included in the charset.
  
  Examples
  --------
  >>> from deepchem.feat.sequence_featurizers import PFMFeaturizer
  >>> from deepchem.data import NumpyDataset
  >>> msa = NumpyDataset(X=[['ABC','BCD'],['AAA','AAB']], ids=[['seq01','seq02'],['seq11','seq12']])
  >>> seqs = msa.X
  >>> featurizer = PFMFeaturizer()
  >>> pfm = featurizer.featurize(seqs)
  >>> pfm.shape
  (2, 26, 100)
docstr: Initialize featurizer.
  
  Parameters
  ----------
  charset: List[str] (default CHARSET)
      A list of strings, where each string is length 1 and unique.
  max_length: int, optional (default 25)
      Maximum length of sequences to be featurized.
docstr_tok: ["Initialize","featurizer",".","Parameters","--","--","--","--","--","charset",":","List","[","str","]","(","default","CHARSET",")","A","list","of","strings",",","where","each","string","is","length","1","and","unique",".","max_length",":","int",",","optional","(","default","25",")","Maximum","length","of","sequences","to","be","featurized","."]
code: def __init__(
      self,
      charset: List[str] = CHARSET,
      max_length: Optional[int] = 100,
  ):
      """Initialize featurizer.
  
      Parameters
      ----------
      charset: List[str] (default CHARSET)
          A list of strings, where each string is length 1 and unique.
      max_length: int, optional (default 25)
          Maximum length of sequences to be featurized.
      """
      if len(charset) != len(set(charset)):
          raise ValueError("All values in charset must be unique.")
      self.charset = charset
      self.max_length = max_length
      self.ohe = OneHotFeaturizer(
          charset=CHARSET, max_length=max_length
      )
  
file_path: deepchem/deepchem/feat/sequence_featurizers/position_frequency_matrix_featurizer.py
imports: import numpy
  from deepchem.feat.molecule_featurizers import OneHotFeaturizer
  from deepchem.feat.base_classes import Featurizer
  from typing import List, Optional
label_desc: Use image node_id 1 to create a new PFMFeaturizer object from inherited base classes: Featurizer with example: obj = PFMFeaturizer(charset, max_length)