Class/Object

ksb.csle.didentification.privacy

RearrangeOperator

Related Docs: object RearrangeOperator | package privacy

Permalink

class RearrangeOperator extends BasePrivacyAnonymizer

:: ApplicationDeveloperApi ::

Operator that implements the rearrangement module in the aggregation algorithm. The model swaps some records in the given column each other. - The user can configure the records to be rearranged manually. - Or, the records to be rearranged can be automatically done according to the given ratio. That is, if the ratio is 0.5, the half of total records are randomly rearranged each other.

Linear Supertypes
BasePrivacyAnonymizer, DataFrameCheck, BaseDataOperator[StreamOperatorInfo, DataFrame], BaseGenericOperator[StreamOperatorInfo, DataFrame], BaseGenericMutantOperator[StreamOperatorInfo, DataFrame, DataFrame], BaseDoer, Logging, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RearrangeOperator
  2. BasePrivacyAnonymizer
  3. DataFrameCheck
  4. BaseDataOperator
  5. BaseGenericOperator
  6. BaseGenericMutantOperator
  7. BaseDoer
  8. Logging
  9. Serializable
  10. Serializable
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RearrangeOperator(o: StreamOperatorInfo)

    Permalink

    o

    Object that contains message ksb.csle.common.proto.StreamDidentProto.RearrangementInfo RearrangementInfo contains attributes as follows:

    • selectedColumnId: Column ID to apply the re-arrange function
    • columnHandlePolicy: consider the given columns all together, or individually.
    • method: how to re-arrange the records (manually or randomly)
    • ratio: in case of random method, how amount of data should be re-arranged.
    • swapList: re-arrange the data according to the the given list
    • fieldInfo: the info about column attributes (identifier, sensitive, ..)
    • check: the method how to verify the performance of anonymized data

    RearrangementInfo

    enum RearrangeMethod {
    	REARR_RANDOM = 0;
    	REARR_MANUAL = 1;
    }
    message SwapList {
    	required int32 fromRowId = 1;
    	required int32 toRowId = 2;
    }
    enum ColumnHandlePolicy {
      ONEBYONE = 0;
      ALL = 1;
    }
    message RearrangementInfo {
      repeated int32 selectedColumnId = 1;
      required ColumnHandlePolicy columnHandlePolicy = 2 [default = ONEBYONE];
      required RearrangeMethod method = 3 [default = REARR_RANDOM];
      optional double ratio = 4 [default = 0.001];
      repeated SwapList swapList = 5;
      repeated FieldInfo fieldInfo = 6;
      optional PrivacyCheckInfo check = 7;
    }

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def anonymize(src: DataFrame, columnNames: Array[String]): DataFrame

    Permalink

    Rearranges some records of given columns each other.

    Rearranges some records of given columns each other.

    src

    Dataframe to rearrange

    columnNames

    the array of columns to be rearranged

    returns

    DataFrame Rearranged dataframe

    Definition Classes
    RearrangeOperatorBasePrivacyAnonymizer
    Annotations
    @throws( classOf[DDIFileIOException] )
  5. def anonymize(src: DataFrame, columnName: String): DataFrame

    Permalink

    Anonymizes the column specified in src dataframe using generic 'Type' method.

    Anonymizes the column specified in src dataframe using generic 'Type' method. The 'Type' is decided by inherited object module.

    src

    Dataframe to anonymize

    columnName

    Column to be anonymized

    returns

    DataFrame The dataframe which replaces original column with anonymized column

    Definition Classes
    BasePrivacyAnonymizer
  6. def anonymizeColumn(src: DataFrame, columnName: String): DataFrame

    Permalink

    Applies the rearrangement function on given specified column

    Applies the rearrangement function on given specified column

    src

    Dataframe to anonymize

    columnName

    the column to apply the rearrangment module

    returns

    DataFrame the rearranged dataframe

    Definition Classes
    RearrangeOperatorBasePrivacyAnonymizer
  7. def anonymizedAll(src: DataFrame, columnNames: Array[String]): DataFrame

    Permalink

    Applies the rearrangement function on given all specified columns simultaneously.

    Applies the rearrangement function on given all specified columns simultaneously.

    src

    Dataframe to anonymize

    returns

    DataFrame the rearranged dataframe

  8. def anonymizedOneByOne(src: DataFrame, columnNames: Array[String]): DataFrame

    Permalink

    Suppose there are some columns in a dataset, and the data handler tries to to apply the rearrangement function on some of that columns.

    Suppose there are some columns in a dataset, and the data handler tries to to apply the rearrangement function on some of that columns. This function applies the function on each specified column individually one-by-one.

    src

    Dataframe to anonymize

    columnNames

    the array of columns to apply the rearrangment module

    returns

    DataFrame the rearranged dataframe

  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def getColumnName(src: DataFrame, columnId: Int): String

    Permalink

    Returns column name from src dataframe specified by the column ID defined by protobuf.

    Returns column name from src dataframe specified by the column ID defined by protobuf.

    src

    dataframe to get names of columns.

    columnId

    column ID to anonymize.

    returns

    String.

    Definition Classes
    DataFrameCheck
  16. def getColumnNames(src: DataFrame, columnIDs: Array[Int]): Array[String]

    Permalink

    Returns column names from src dataframe specified by column IDs.

    Returns column names from src dataframe specified by column IDs. Note that the column with invalid IDs are ignored.

    src

    dataframe to get names of columns.

    returns

    Array[String].

    Definition Classes
    DataFrameCheck
  17. def getQuasiColumnIDs(fieldInfos: Array[FieldInfo]): Array[Int]

    Permalink
    Definition Classes
    DataFrameCheck
  18. def getSensColumnIDs(fieldInfos: Array[FieldInfo]): Array[Int]

    Permalink
    Definition Classes
    DataFrameCheck
  19. def getValidColumnIDs(src: DataFrame, columnIDs: Array[Int]): Array[Int]

    Permalink
    Definition Classes
    DataFrameCheck
  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def isValidColumnID(src: DataFrame, columnID: Int): Boolean

    Permalink

    Checks the given column ID is valid.

    Checks the given column ID is valid.

    src

    dataframe to get names of columns.

    returns

    Boolean.

    Definition Classes
    DataFrameCheck
  23. def isValidColumnName(src: DataFrame, columnName: String): Boolean

    Permalink

    Checks the given column Name is valid.

    Checks the given column Name is valid.

    src

    dataframe to get names of columns.

    columnName

    column Name.

    returns

    Boolean.

    Definition Classes
    DataFrameCheck
  24. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. def operate(df: DataFrame): DataFrame

    Permalink

    Operates rearrangement module for basic de-identification

    Operates rearrangement module for basic de-identification

    df

    Input dataframe

    returns

    DataFrame Anonymized dataframe

    Definition Classes
    RearrangeOperator → BaseGenericOperator → BaseGenericMutantOperator
  29. val p: RearrangementInfo

    Permalink
  30. val privacy: PrivacyCheckInfo

    Permalink
    Definition Classes
    BasePrivacyAnonymizer
  31. def stop: Unit

    Permalink
    Definition Classes
    BaseGenericOperator → BaseGenericMutantOperator
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  33. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from BasePrivacyAnonymizer

Inherited from DataFrameCheck

Inherited from BaseDataOperator[StreamOperatorInfo, DataFrame]

Inherited from BaseGenericOperator[StreamOperatorInfo, DataFrame]

Inherited from BaseGenericMutantOperator[StreamOperatorInfo, DataFrame, DataFrame]

Inherited from BaseDoer

Inherited from Logging

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped