class_docstr: Base Stochastic Gradient Tree (SGT) class.
  
  This class defines the main characteristics that are shared by the different SGT
  implementations.
class_docstr_tok: ["Base","Stochastic","Gradient","Tree","(","SGT",")","class",".","This","class","defines","the","main","characteristics","that","are","shared","by","the","different","SGT","implementations","."]
code: def n_observations(self):
      return self._n_observations
  
imports: from __future__ import annotations
  import abc
  import math
  from scipy.stats import f
  from river import base, tree
  from .losses import BinaryCrossEntropyLoss, SquaredErrorLoss
  from .nodes.branch import DTBranch, NominalMultiwayBranch, NumericBinaryBranch
  from .nodes.sgt_nodes import SGTLeaf
  from .utils import BranchFactory, GradHessMerit
label_desc: Use image node_id 7 for calling the StochasticGradientTree obj's underlying member method code with example usage: obj.n_observations() and returns: self