class_docstr: A Random Forest model.
  
  Uses a parametric bootstrap to handle uncertainty in Y.
  
  Can be used to fit data, make predictions, and do cross validation; however
  gen is not implemented and so this model cannot generate new points.
  
  Args:
      max_features: Maximum number of features at each split. With one-hot
          encoding, this should be set to None. Defaults to "sqrt", which is
          Breiman's version of Random Forest.
      num_trees: Number of trees.
class_docstr_tok: ["A","Random","Forest","model",".","Uses","a","parametric","bootstrap","to","handle","uncertainty","in","Y",".","Can","be","used","to","fit","data",",","make","predictions",",","and","do","cross","validation",";","however","gen","is","not","implemented","and","so","this","model","can","not","generate","new","points",".","Args",":","max_features",":","Maximum","number","of","features","at","each","split",".","With","one-hot","encoding",",","this","should","be","set","to","None",".","Defaults","to","``","sqrt","''",",","which","is","Breiman","'s","version","of","Random","Forest",".","num_trees",":","Number","of","trees","."]
code: def __init__(
      self, max_features: Optional[str] = "sqrt", num_trees: int = 500
  ) -> None:
      self.max_features = max_features
      self.num_trees = num_trees
      self.models: List[RandomForestRegressor] = []
  
imports: from __future__ import annotations
  from typing import Any, List, Optional, Tuple
  import numpy
  import torch
  from ax.core.search_space import SearchSpaceDigest
  from ax.core.types import TCandidateMetadata
  from ax.models.torch.utils import _datasets_to_legacy_inputs
  from ax.models.torch_base import TorchModel
  from ax.utils.common.docutils import copy_doc
  from botorch.utils.datasets import SupervisedDataset
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.tree import DecisionTreeRegressor
  from torch import Tensor
label_desc: Use image node_id 1 to create a new RandomForest object from inherited base classes: TorchModel with example: obj = RandomForest(max_features, num_trees)