class_docstr: The step-wise IS estimator.
  
  Let s_t, a_t, and r_t be the state, action, and reward at timestep t.
  
  For behavior policy \pi_b and evaluation policy \pi_e, define the
  cumulative importance ratio at timestep t as:
  p_t = \sum_{t'=0}^t (\pi_e(a_{t'} | s_{t'}) / \pi_b(a_{t'} | s_{t'})).
  
  This estimator computes the expected return for \pi_e for an episode as:
  V^{\pi_e}(s_0) = \sum_t \gamma ^ {t} * p_t * r_t
  and returns the mean and standard deviation over episodes.
  
  For more information refer to https://arxiv.org/pdf/1911.06854.pdf
class_docstr_tok: ["The","step-wise","IS","estimator",".","Let","s_t",",","a_t",",","and","r_t","be","the","state",",","action",",","and","reward","at","timestep","t.","For","behavior","policy","\\pi_b","and","evaluation","policy","\\pi_e",",","define","the","cumulative","importance","ratio","at","timestep","t","as",":","p_t","=","\\sum_","{","t'=0","}","^t","(","\\pi_e","(","a_","{","t","'","}","|","s_","{","t","'","}",")","\/","\\pi_b","(","a_","{","t","'","}","|","s_","{","t","'","}",")",")",".","This","estimator","computes","the","expected","return","for","\\pi_e","for","an","episode","as",":","V^","{","\\pi_e","}","(","s_0",")","=","\\sum_t","\\gamma","^","{","t","}","*","p_t","*","r_t","and","returns","the","mean","and","standard","deviation","over","episodes",".","For","more","information","refer","to","https",":","\/\/arxiv.org\/pdf\/1911.06854.pdf"]
code: def estimate_on_single_step_samples(
      self, batch: SampleBatch
  ) -> Dict[str, List[float]]:
      estimates_per_epsiode = {}
  
      rewards, old_prob = batch["rewards"], batch["action_prob"]
      new_prob = self.compute_action_probs(batch)
  
      weights = new_prob / old_prob
      v_behavior = rewards
      v_target = weights * rewards
  
      estimates_per_epsiode["v_behavior"] = v_behavior
      estimates_per_epsiode["v_target"] = v_target
  
      return estimates_per_epsiode
  
file_path: ray/rllib/offline/estimators/importance_sampling.py
imports: from typing import Dict, List, Any
  import math
  from ray.data import Dataset
  from ray.rllib.utils.annotations import override, DeveloperAPI
  from ray.rllib.offline.offline_evaluator import OfflineEvaluator
  from ray.rllib.offline.offline_evaluation_utils import remove_time_dim, compute_is_weights
  from ray.rllib.offline.estimators.off_policy_estimator import OffPolicyEstimator
  from ray.rllib.policy.sample_batch import SampleBatch
label_desc: Use image node_id 2 for calling the ImportanceSampling obj's underlying member method code with example usage: obj.estimate_on_single_step_samples(batch) and returns: estimates_per_epsiode