Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Define shared Params for Spark Transformers/Estimators #8

Description

@j-coll

Most of the Params used in our Transformers and Estimators are going to be shared among them. Spark ML solves this issue by having small interfaces with the shared Params.

See apache/spark/mllib/.../sharedParams.scala

The proposal is to build our own set of shared params, e.g.:

public interface HasStudyId extends Params {
    default Param<String> studyIdParam() {
        return new Param<>(this, "studyId", "Id of the study to be used.");
    }
    default String getStudyId() {
        return getOrDefault(studyIdParam());
    }
    default HasStudyId setStudyId(String study) {
        set(studyIdParam(), study);
        return this;
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions