formulaic icon indicating copy to clipboard operation
formulaic copied to clipboard

Add the missing transforms to bring parity with patsy / R.

Open matthewwardrop opened this issue 5 years ago • 5 comments

Formulaic's support for stateful transforms is underutilised. Over the coming couple of weeks I'll be adding support in for the missing transforms, aiming to be compatible with patsy and R implementations.

  • [x] C: Add support for custom contrast matrices, etc. (PR #70)
  • [x] scale: Center and rescale for mean = 0 and stddev = 1
  • [x] poly: Polynomial basis (PR #44)
  • [x] bs : B-Spline basis (PR #21)
  • [ ] cr : cubic spline basis
  • [ ] cc : cyclic cubic spline basis
  • [ ] te : tensor product smooth

matthewwardrop avatar Jul 20 '20 06:07 matthewwardrop

Is the above list up to date? I'm curious if I could be of any help.

lorentzenchr avatar Jan 16 '22 20:01 lorentzenchr

Hi @lorentzenchr !

Obviously I didn't get to this in the timeline intimated. COVID has led to some changes in various trajectories, including with me heading back to Australia (a big transition given I have four kids). My plan is still to get to this, but you can feel free to explore implementing cr, cc and te if you are interested. I am far more opinionated about the implementation of C.

Note that it was my intention to write these from scratch after learning the mathematics behind them, as I did the others. This allowed me to write things with high performance in mind, and avoid copyright issues.

matthewwardrop avatar Jan 19 '22 18:01 matthewwardrop

Hope you and your family are fine. In my opinion, C is the most important of all. I'll have a look at the spline basis, let's see.

lorentzenchr avatar Jan 19 '22 19:01 lorentzenchr

I'd be interested in your opinions about C.

lorentzenchr avatar Jan 19 '22 20:01 lorentzenchr

Hi @lorentzenchr ; sorry... lost the thread here a bit. I've implemented support for different contrast matrices now in #70. Feel free to take a look :).

matthewwardrop avatar Apr 05 '22 05:04 matthewwardrop