class_docstr: A Formula is a model for a mean in a regression model.
  
  It is often given by a sequence of sympy expressions, with the mean
  model being the sum of each term multiplied by a linear regression
  coefficient.
  
  The expressions may depend on additional Symbol instances, giving a
  non-linear regression model.
class_docstr_tok: ["A","Formula","is","a","model","for","a","mean","in","a","regression","model",".","It","is","often","given","by","a","sequence","of","sympy","expressions",",","with","the","mean","model","being","the","sum","of","each","term","multiplied","by","a","linear","regression","coefficient",".","The","expressions","may","depend","on","additional","Symbol","instances",",","giving","a","non-linear","regression","model","."]
code: def __mul__(self, other):
      if not is_formula(other):
          raise ValueError(
              "only two Formulas can be multiplied together"
          )
      if is_factor(self):
          if self == other:
              return self
      v = []
      # Compute the pairwise product of each term
      # If either one is a Term, use Term's multiplication
      for sterm in self.terms:
          for oterm in other.terms:
              if is_term(sterm):
                  v.append(Term.__mul__(sterm, oterm))
              elif is_term(oterm):
                  v.append(Term.__mul__(oterm, sterm))
              else:
                  v.append(sterm * oterm)
      terms = sorted(set(v), key=default_sort_key)
      return Formula(tuple(terms))
  
imports: import itertools
  import warnings
  from string import ascii_letters, digits
  import numpy
  import sympy
  from scipy.linalg import pinv
  from sympy import Dummy, default_sort_key
  from sympy.utilities.lambdify import implemented_function, lambdify
  from nipy.algorithms.utils.matrices import full_rank, matrix_rank
  from nipy.utils import VisibleDeprecationWarning, _NoValue
label_desc: Use image node_id 15 for calling the Formula obj's underlying member method code with example usage: obj.__mul__(other) and returns: Formula, self