anchor.diff:      (p.[0], p.[1])
   
   
  -let ``Fitting to an arbitrary linear function from noisy data`` =
  -    printfn "Fitting to an arbitrary linear function from noisy data"
  +let ``Fitting to an arbitrary linear function from noisy data (Fit)`` =
  +    printfn "Fitting to an arbitrary linear function from noisy data (Fit)"
  +
  +    // define our target functions
  +    let f1 x = Math.Sqrt(Math.Exp(x))
  +    let f2 x = SpecialFunctions.DiGamma(x*x)
  +
  +    // sample points
  +    let xdata = [| 1.0 .. 1.0 .. 10.0 |]
  +
  +    // create data samples, with chosen parameters and with gaussian noise added
  +    let fy (noise:IContinuousDistribution) x = 2.5*f1(x) - 4.0*f2(x) + noise.Sample()
  +    let ydata = xdata |> Array.map (fy (Normal.WithMeanVariance(0.0,2.0)))
  +
  +    let p = Fit.linear [f1; f2] xdata ydata
  +
  +    (p.[0], p.[1])
  +
  +let ``Fitting to an arbitrary linear function from noisy data (Linear Algebra)`` =
  +    printfn "Fitting to an arbitrary linear function from noisy data (Linear Algebra)"
   
       // define our target functions
       let f1 x = Math.Sqrt(Math.Exp(x))
  
positive.code:     (p.[0], p.[1])
  
  
  let ``Fitting to an sine from noisy data`` =
      printfn "Fitting to an sine from noisy data"
  
      // sample points
      let omega = 1.0
  
negative.code: // Simple Least Squares Linear Regression, from:
  // http://christoph.ruegg.name/blog/2012/9/9/linear-regression-mathnet-numerics.html
  
  let ``Fitting to a line (Fit)`` =
      printfn "Fitting to a line (Fit)"
  
      Fit.line [| 10.0; 20.0; 30.0 |] [| 15.0; 20.0; 25.0 |]
  
  let ``Fitting to a line (Linear Algebra)`` =
      printfn "Fitting to a line (Linear Algebra)"
  
      let X = DenseMatrix.ofColumnsList 3 2 [ List.init 3 (fun i -> 1.0); [ 10.0; 20.0; 30.0 ] ]
      let y = DenseVector [| 15.0; 20.0; 25.0 |]
  