docstr: Test EM algorithm on pure naive Bayes structure without parents
docstr_tok: ["Test","EM","algorithm","on","pure","naive","Bayes","structure","without","parents"]
code: def test_em_no_parents(self, n_jobs):
      """Test EM algorithm on pure naive Bayes structure without parents"""
      df, sm, node_states, true_lv_values = naive_bayes_plus_parents(
          p_c=0.6, parents=0, percentage_not_missing=0.02
      )
      em = EMSingleLatentVariable(
          data=df,
          sm=sm,
          node_states=node_states,
          lv_name="z",
          n_jobs=n_jobs,
      )
      em.run(n_runs=50, stopping_delta=0.001, verbose=2)
  
      max_error, rmse_error = compare_result_with_ideal(
          em.cpds, sm, df, true_lv_values, node_states
      )
      assert max_error < 0.02
      assert rmse_error < 1e-2
  
imports: from collections import Counter
  from typing import Any, AnyStr, Dict, Iterable, List, Set, Tuple, Union
  import numpy
  import pandas
  import pytest
  from causalnex.estimator.em import EMSingleLatentVariable
  from causalnex.network import BayesianNetwork
  from causalnex.structure.structuremodel import StructureModel
  from causalnex.utils.data_utils import states_to_df
label_desc: Use image node_id 3 for calling the TestEMJobs obj's underlying member method code with example usage: obj.test_em_no_parents(n_jobs) without return types