class_docstr: Test behaviour of the from_numpy_lasso method
docstr: If observations indicate a==!b and b==!a then the weight of the relationship from a-> should be negative
docstr_tok: ["If","observations","indicate","a==","!","b","and","b==","!","a","then","the","weight","of","the","relationship","from","a-",">","should","be","negative"]
code: def test_inverse_relationships_get_negative_weight(self):
      """If observations indicate a==!b and b==!a then the weight of the relationship from a-> should be negative"""
  
      data = pd.DataFrame(
          [[1, -2] for _ in range(10)] + [[-1, 2] for _ in range(10)],
          columns=["a", "b"],
      )
      g = from_numpy(data.values, w_threshold=0.25)
      assert set(g.edges) == {(0, 1)}
      assert -2 <= g.get_edge_data(0, 1)["mean_effect"] <= -1.9
  
imports: import logging
  import networkx
  import numpy
  import pandas
  import pytest
  import scipy.optimize
  from mock import patch
  from causalnex.structure import StructureModel
  from causalnex.structure.data_generators import generate_binary_data, generate_binary_dataframe, generate_continuous_dataframe, generate_count_dataframe, generate_structure
  from causalnex.structure.pytorch.notears import from_numpy, from_pandas
label_desc: Use image node_id 7 for calling the TestFromNumpy obj's underlying member method code with example usage: obj.test_inverse_relationships_get_negative_weight() without return types