Skip to main content

Bitfount-Supported Models

Models are parameters to Model-based algorithms. For this class of algorithm, the model is the model architecture used for doing the analysis.

Bitfount currently supports the following model types for federated analysis.

Model
PyTorchLogisticRegression
PyTorchTabularClassifier
PyTorchImageClassifier
TabNetClassifier

In the future, Bitfount community members will be able to submit models for consideration as default Bitfount-supported models. In the meantime, if you have an unsupported model you'd like to use, you may create a custom model as described in Custom Models.

Instantiating a model will generally require that the Data Scientist specify the DataStructure and the Schema, for example:

schema = get_pod_schema('user1/pod1')
datastructure = DataStructure(selected_cols=["A", "B", "C"], target=["C"])
model = PyTorchLogisticRegressionClassifier(
datastructure=datastructure,
schema=schema
)

Once constructed, built-in models include syntactic sugar for running algorithms in a standard federated way. For example, specifying pod_identifiers when calling model.fit is generally equivalent to running the FederatedAveraging protocol with the FederatedTraining algorithm on the given model:

model.fit(pod_identifiers=['user1/pod1', 'user2/pod2'])
# is equivalent to:
protocol = FederatedAveraging(algorithm=FederatedModelTraining(model=model))
protocol.run(pod_identifiers=[pod_identifier])

The model can also be run on a local data source via the data parameter:

data = CSVSource(path='file_path.csv')
model.fit(data=data)

Don’t see a model that works for you? Submit your suggestion or provide feedback to us.