class_docstr: A default Linear Classifier based on sklearn's SGDClassifier for
  learning decision boundaries between concepts.
  Note that default implementation slices input dataset into train and test
  splits and keeps them in memory.
  In case concept datasets are large, this can lead to out of memory and we
  recommend to provide a custom Classier that extends `Classifier` abstract
  class and handles large concept datasets accordingly.
class_docstr_tok: ["A","default","Linear","Classifier","based","on","sklearn","'s","SGDClassifier","for","learning","decision","boundaries","between","concepts",".","Note","that","default","implementation","slices","input","dataset","into","train","and","test","splits","and","keeps","them","in","memory",".","In","case","concept","datasets","are","large",",","this","can","lead","to","out","of","memory","and","we","recommend","to","provide","a","custom","Classier","that","extends","`","Classifier","`","abstract","class","and","handles","large","concept","datasets","accordingly","."]
docstr: This function returns a C x F tensor weights, where
  C is the number of classes and F is the number of features.
  In case of binary classification, C = 2 otherwise it is > 2.
  
  Returns:
      weights (Tensor): A torch Tensor with the weights resulting from
          the model training.
docstr_tok: ["This","function","returns","a","C","x","F","tensor","weights",",","where","C","is","the","number","of","classes","and","F","is","the","number","of","features",".","In","case","of","binary","classification",",","C","=","2","otherwise","it","is",">","2",".","Returns",":","weights","(","Tensor",")",":","A","torch","Tensor","with","the","weights","resulting","from","the","model","training","."]
code: def weights(self) -> Tensor:
      r"""
      This function returns a C x F tensor weights, where
      C is the number of classes and F is the number of features.
      In case of binary classification, C = 2 otherwise it is > 2.
  
      Returns:
          weights (Tensor): A torch Tensor with the weights resulting from
              the model training.
      """
      assert self.lm.linear is not None, (
          "The weights cannot be obtained because no model was trained."
          "In order to train the model call `train_and_eval` method first."
      )
      weights = self.lm.representation()
      if weights.shape[0] == 1:
          # if there are two concepts, there is only one label. We split it in two.
          return torch.stack([-1 * weights[0], weights[0]])
      else:
          return weights
  
imports: import random
  import warnings
  from abc import ABC, abstractmethod
  from typing import Any, Dict, List, Tuple, Union
  import torch
  from captum._utils.models.linear_model import model
  from torch import Tensor
  from torch.utils.data import DataLoader, TensorDataset
label_desc: Use image node_id 3 for calling the DefaultClassifier obj's underlying member method code with example usage: obj.weights() and returns: torch, weights