docstr: Test whether probability is not centered around 50% when using an intercept
docstr_tok: ["Test","whether","probability","is","not","centered","around","50","%","when","using","an","intercept"]
code: def test_intercept_probability(
      self, graph, distribution, n_categories
  ):
      """Test whether probability is not centered around 50% when using an intercept"""
      graph = StructureModel()
      graph.add_nodes_from(["A"])
      data = generate_categorical_dataframe(
          graph,
          1000000,
          distribution=distribution,
          n_categories=n_categories,
          noise_scale=0.1,
          seed=10,
          intercept=True,
      )
      assert not np.allclose(
          data.mean(axis=0), 1 / n_categories, atol=0.01, rtol=0
      )
  
imports: import re
  import string
  from itertools import product
  import numpy
  import pandas
  import pytest
  from scipy import stats
  from sklearn.gaussian_process.kernels import RBF
  from causalnex.structure import StructureModel
  from causalnex.structure.data_generators import gen_stationary_dyn_net_and_df, generate_binary_data, generate_binary_dataframe, generate_categorical_dataframe, generate_continuous_data, generate_continuous_dataframe, generate_count_dataframe, generate_dataframe_dynamic, generate_structure, generate_structure_dynamic
  from tests.structure.data_generators.test_core import calculate_proba
label_desc: Use image node_id 7 for calling the TestGenerateCategoricalData obj's underlying member method code with example usage: obj.test_intercept_probability(graph, distribution, n_categories) without return types