class_docstr: Deep Streaming Linear Discriminant Analysis.
  
  This strategy does not use backpropagation.
  Minibatches are first passed to the pretrained feature extractor.
  The result is processed one element at a time to fit the LDA.
  Original paper:
  "Hayes et. al., Lifelong Machine Learning with Deep Streaming Linear
  Discriminant Analysis, CVPR Workshop, 2020"
  https://openaccess.thecvf.com/content_CVPRW_2020/papers/w15/Hayes_Lifelong_Machine_Learning_With_Deep_Streaming_Linear_Discriminant_Analysis_CVPRW_2020_paper.pdf
class_docstr_tok: ["Deep","Streaming","Linear","Discriminant","Analysis",".","This","strategy","does","not","use","backpropagation",".","Minibatches","are","first","passed","to","the","pretrained","feature","extractor",".","The","result","is","processed","one","element","at","a","time","to","fit","the","LDA",".","Original","paper",":","''","Hayes","et",".","al.",",","Lifelong","Machine","Learning","with","Deep","Streaming","Linear","Discriminant","Analysis",",","CVPR","Workshop",",","2020","''","https",":","\/\/openaccess.thecvf.com\/content_CVPRW_2020\/papers\/w15\/Hayes_Lifelong_Machine_Learning_With_Deep_Streaming_Linear_Discriminant_Analysis_CVPRW_2020_paper.pdf"]
docstr: Fit the SLDA model to the base data.
  :param X: an Nxd torch tensor of base initialization data
  :param y: an Nx1-dimensional torch tensor of the associated labels for X
  :return: None
docstr_tok: ["Fit","the","SLDA","model","to","the","base","data",".",":","param","X",":","an","Nxd","torch","tensor","of","base","initialization","data",":","param","y",":","an","Nx1-dimensional","torch","tensor","of","the","associated","labels","for","X",":","return",":","None"]
code: def fit_base(self, X, y):
      """
      Fit the SLDA model to the base data.
      :param X: an Nxd torch tensor of base initialization data
      :param y: an Nx1-dimensional torch tensor of the associated labels for X
      :return: None
      """
      print("\nFitting Base...")
  
      # update class means
      for k in torch.unique(y):
          self.muK[k] = X[y == k].mean(0)
          self.cK[k] = X[y == k].shape[0]
      self.num_updates = X.shape[0]
  
      print("\nEstimating initial covariance matrix...")
      from sklearn.covariance import OAS
  
      cov_estimator = OAS(assume_centered=True)
      cov_estimator.fit((X - self.muK[y]).cpu().numpy())
      self.Sigma = (
          torch.from_numpy(cov_estimator.covariance_)
          .float()
          .to(self.device)
      )
  
imports: import warnings
  from typing import Callable, Optional, Sequence, Union
  import os
  import torch
  from avalanche.training.plugins import SupervisedPlugin
  from avalanche.training.templates import SupervisedTemplate
  from avalanche.training.plugins.evaluation import EvaluationPlugin, default_evaluator
  from avalanche.models.dynamic_modules import MultiTaskModule
  from avalanche.models import FeatureExtractorBackbone
label_desc: Use image node_id 7 for calling the StreamingLDA obj's underlying member method code with example usage: obj.fit_base(X, y) without return types