anchor.diff:          //    let cov = x * x.Transpose
               
           //    cov ./ z
  +
  
positive.code:             m
              |> columnWiseCorrelationMatrix Seq.pearson
  
          ///// Computes rowise pearson correlation
          //// TODO: TEST
          //let corr (x: matrix) =
  
negative.code:         /// computes the unnormalized (using only the dot product) cross-correlation of signals v1 and v2 at a given lag.
          let xCorr lag v1 v2 = 
              correlationOf Vector.dot lag v1 v2
  
          /// Biweighted Midcorrelation. This is a median based correlation measure which is more robust against outliers.
          let bicor (vec1:vector) (vec2:vector) = 
              
              let xs,ys  = vec1.Values, vec2.Values
  
              let xMed = xs |> Array.median
              let xMad = xs |> Array.medianAbsoluteDev
              let xWeights = xs |> Array.map ((bicorHelpers.deviation xMed xMad) >> bicorHelpers.weight)
              let xNF = bicorHelpers.getNormalizationFactor xs xWeights xMed
  
              let yMed = ys |> Array.median
              let yMad = ys |> Array.medianAbsoluteDev
              let yWeights = ys |> Array.map ((bicorHelpers.deviation yMed yMad) >> bicorHelpers.weight)
              let yNF = bicorHelpers.getNormalizationFactor ys yWeights yMed
  
              bicorHelpers.sumBy4 (fun xVal xWeight yVal yWeight ->
                  (bicorHelpers.normalize xVal xWeight xNF xMed) * (bicorHelpers.normalize yVal yWeight yNF yMed)
                  )
                  xs xWeights ys yWeights 
  
      /// Contains correlation functions optimized for matrices
      [<AutoOpen>]
  