Melanoma, also redundantly known as malignant melanoma, is a type of skin cancer that develops from the pigment-producing cells known as melanocytes. Melanomas typically occur in the skin, but may rarely occur in the mouth, intestines, or eye (uveal melanoma). In women, they most commonly occur on the legs, while in men, they most commonly occur on the back. About 25% of melanomas develop from moles. Changes in a mole that can indicate melanoma include an increase in size, irregular edges, change in color, itchiness, or skin breakdown.The primary cause of melanoma is ultraviolet light (UV) exposure in those with low levels of the skin pigment melanin. The UV light may be from the sun or other sources, such as tanning devices. Those with many moles, a history of affected family members, and poor immune function are at greater risk. A number of rare genetic conditions, such as xeroderma pigmentosum, also increase the risk. Diagnosis is by biopsy and analysis of any skin lesion that has signs of being potentially cancerous.Using sunscreen and avoiding UV light may prevent melanoma. Treatment is typically removal by surgery. In those with slightly larger cancers, nearby lymph nodes may be tested for spread (metastasis). Most people are cured if spread has not occurred. For those in whom melanoma has spread, immunotherapy, biologic therapy, radiation therapy, or chemotherapy may improve survival.
A "recovery" algorithm was developed by Rebane and Pearl (1987) which rests on Wrights distinction between the three possible types of causal substructures allowed in a directed acyclic graph (DAG):

  
    
      
        X
        →
        Y
        →
        Z
      
    
    {\displaystyle X\rightarrow Y\rightarrow Z}
  

  
    
      
        X
        ←
        Y
        →
        Z
      
    
    {\displaystyle X\leftarrow Y\rightarrow Z}
  

  
    
      
        X
        →
        Y
        ←
        Z
      
    
    {\displaystyle X\rightarrow Y\leftarrow Z}
  Type 1 and type 2 represent the same statistical dependencies (i.e., 
  
    
      
        X
      
    
    {\displaystyle X}
   and 
  
    
      
        Z
      
    
    {\displaystyle Z}
   are independent given 
  
    
      
        Y
      
    
    {\displaystyle Y}
  ) and are, therefore, indistinguishable within purely cross-sectional data.