smartnoise-core icon indicating copy to clipboard operation
smartnoise-core copied to clipboard

Simple postprocess multiple regression/classification

Open Shoeboxam opened this issue 4 years ago • 0 comments

There are multiple potential implementations. Here is how a covariance implementation could look. We need the additional components Inverse and Matmul.

Component: Inverse

Arguments

  • data

Component: Matmul

Arguments

  • left
  • right

Options

  • pseudoinverse

Then the top-level component that expands:

Component: DPLinearRegression

Arguments

  • predictors (matrix or dataframe)
  • target (column vector

Options

  • implementation
  • mechanism
  • ddof

The expansion for the 'covariance' implementation could be:

parameters = Matmul(Inverse(DPCovariance(predictors)), DPCovariance(predictors, target))
intercept = DPMean(target) - Matmul(DPMean(predictors), parameters)
ColumnBind(intercept, parameters)

DPCovariance already covers cross-covariance as a special case. We can propagate nulls up from the inverse. To make this quick to implement, we could only allow public data and aggressively drop properties.

Shoeboxam avatar Jul 24 '20 03:07 Shoeboxam