class_docstr: This ensemble determines a weight vector to return a weighted mean of the underlying mixers.
  
  More specifically, each model is evaluated on the validation dataset and assigned an accuracy score (as per the fixed accuracy function at the JsonAI level).
  
  Afterwards, all the scores are softmaxed to obtain the final weights.
  
  Note: this ensemble only supports regression tasks.
code: def __init__(
      self,
      target,
      mixers: List[BaseMixer],
      data: EncodedDs,
      args: PredictionArguments,
      dtype_dict: dict,
      accuracy_functions,
      ts_analysis: Optional[dict] = None,
      fit: Optional[bool] = True,
      **kwargs,
  ) -> None:
      super().__init__(target, mixers, data)
      if dtype_dict[target] not in (
          dtype.float,
          dtype.integer,
          dtype.quantity,
      ):
          raise Exception(
              f"This ensemble can only be used regression problems! Got target dtype {dtype_dict[target]} instead!"
          )
  
      if fit:
          score_list = []
          for _, mixer in enumerate(mixers):
              score_dict = evaluate_accuracies(
                  data.data_frame,
                  mixer(data, args)["prediction"],
                  target,
                  accuracy_functions,
                  ts_analysis=ts_analysis,
              )
              avg_score = np.mean(list(score_dict.values()))
              log.info(
                  f"Mixer: {type(mixer).__name__} got accuracy: {avg_score}"
              )
  
              if is_nan_numeric(avg_score):
                  log.warning(
                      f"Could not compute a valid accuracy for mixer: {type(mixer).__name__}, \
                                    functions: {accuracy_functions}, yielded invalid average score {avg_score}, \
                                    resetting that to -pow(2,63) instead."
                  )
                  avg_score = -pow(2, 63)
  
              score_list.append(avg_score)
  
          self.weights = self.accuracies_to_weights(
              np.array(score_list)
          )
          self.prepared = True
  
file_path: lightwood/lightwood/ensemble/weighted_mean_ensemble.py
imports: from typing import List, Optional
  import numpy
  import pandas
  from lightwood.helpers.log import log
  from type_infer.helpers import is_nan_numeric
  from lightwood.mixer.base import BaseMixer
  from lightwood.ensemble.base import BaseEnsemble
  from lightwood.api.types import PredictionArguments
  from lightwood.data.encoded_ds import EncodedDs
  from mindsdb_evaluator import evaluate_accuracies
  from type_infer.dtype import dtype
label_desc: Use image node_id 1 to create a new WeightedMeanEnsemble object from inherited base classes: BaseEnsemble with example: obj = WeightedMeanEnsemble(target, mixers, data, args, dtype_dict, accuracy_functions, ts_analysis, fit)