org.apache.sysds.runtime.controlprogram.paramserv.dp

## Class SubsampleToMinFederatedScheme

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.paramserv.dp.DataPartitionFederatedScheme
  - - org.apache.sysds.runtime.controlprogram.paramserv.dp.SubsampleToMinFederatedScheme

    public class SubsampleToMinFederatedScheme
    extends DataPartitionFederatedScheme

Subsample to Min Federated scheme When the parameter server runs in federated mode it cannot pull in the data which is already on the workers. Therefore, a UDF is sent to manipulate the data locally. In this case the global minimum number of examples is taken and the worker subsamples data to match that number of examples. The subsampling is done by multiplying with a Permutation Matrix with a global seed. Then all entries in the federation map of the input matrix are separated into MatrixObjects and returned as a list. Only supports row federated matrices atm.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.sysds.runtime.controlprogram.paramserv.dp.DataPartitionFederatedScheme

`DataPartitionFederatedScheme.BalanceMetrics, DataPartitionFederatedScheme.Result`

### Constructor Summary

Constructors
Constructor and Description
`SubsampleToMinFederatedScheme()`

### Method Summary

All Methods Instance Methods Concrete Methods
`DataPartitionFederatedScheme.Result` `partition(MatrixObject features, MatrixObject labels, int seed)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SubsampleToMinFederatedScheme

    public SubsampleToMinFederatedScheme()

### Method Detail

#### partition

    public DataPartitionFederatedScheme.Result partition(MatrixObject features,
                                                         MatrixObject labels,
                                                         int seed)

Specified by:
  `partition` in class `DataPartitionFederatedScheme`