Skip to content

Commit

Permalink
Merge pull request #11 from julianmendez/development
Browse files Browse the repository at this point in the history
Remove redundant tiles
  • Loading branch information
julianmendez authored Mar 8, 2024
2 parents c6b6ac7 + d37066c commit ed9bd8b
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ import soda.tiles.fairness.tile.FalsePosTile
import soda.tiles.fairness.tile.NeededPTile
import soda.tiles.fairness.tile.PredictionPTile
import soda.tiles.fairness.tile.ReceivedSigmaPTile
import soda.tiles.fairness.tile.ResultPTile
import soda.tiles.fairness.tile.SigmaTile
import soda.tiles.fairness.tile.UnzipPairFstTile
import soda.tiles.fairness.tile.UnzipPairSndTile
import soda.tiles.fairness.tile.UnzipTripleFstTile
import soda.tiles.fairness.tile.UnzipTripleSndTile
import soda.tiles.fairness.tile.UnzipTripleTrdTile
import soda.tiles.fairness.tile.WithPTile
import soda.tiles.fairness.tile.ZipTile


Expand Down Expand Up @@ -190,9 +188,9 @@ trait UnbiasednessPipeline

lazy val prediction_p_tile = PredictionPTile .mk (p0_evaluation)

lazy val result_p_tile = ResultPTile .mk (p1_result)
lazy val result_p_tile = AttributePTile .mk (p1_result)

lazy val with_p_tile = WithPTile .mk (p2_with_p)
lazy val with_p_tile = AttributePTile .mk (p2_with_p)

lazy val false_pos_tile = FalsePosTile .mk

Expand Down
2 changes: 0 additions & 2 deletions core/src/main/scala/soda/tiles/fairness/pipeline/Package.soda
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ import
soda.tiles.fairness.tile.NeededPTile
soda.tiles.fairness.tile.PredictionPTile
soda.tiles.fairness.tile.ReceivedSigmaPTile
soda.tiles.fairness.tile.ResultPTile
soda.tiles.fairness.tile.SigmaTile
soda.tiles.fairness.tile.UnzipPairFstTile
soda.tiles.fairness.tile.UnzipPairSndTile
soda.tiles.fairness.tile.UnzipTripleFstTile
soda.tiles.fairness.tile.UnzipTripleSndTile
soda.tiles.fairness.tile.UnzipTripleTrdTile
soda.tiles.fairness.tile.WithPTile
soda.tiles.fairness.tile.ZipTile

Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class UnbiasednessPipeline

prediction_p_tile = PredictionPTile .mk (p0_evaluation)

result_p_tile = ResultPTile .mk (p1_result)
result_p_tile = AttributePTile .mk (p1_result)

with_p_tile = WithPTile .mk (p2_with_p)
with_p_tile = AttributePTile .mk (p2_with_p)

false_pos_tile = FalsePosTile .mk

Expand Down
57 changes: 0 additions & 57 deletions core/src/main/scala/soda/tiles/fairness/tile/Package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -677,35 +677,6 @@ object ReceivedSigmaPTile {
}


/*
directive lean
import Soda.tiles.fairness.tool.TileMessage
import Soda.tiles.fairness.tile.AttributePTile
*/

/**
* This tile is a particular case of an 'AttributePTile', where the attribute is the 'result'.
* This tile is used to contrast obtained results to predicted results.
*/

trait ResultPTile
{

def p : Actor => Measure

def apply (message : TileMessage [Seq [Actor] ] ) : TileMessage [Seq [Measure] ] =
AttributePTile .mk (p) .apply (message)

}

case class ResultPTile_ (p : Actor => Measure) extends ResultPTile

object ResultPTile {
def mk (p : Actor => Measure) : ResultPTile =
ResultPTile_ (p)
}


/*
directive lean
import Soda.tiles.fairness.tool.TileMessage
Expand Down Expand Up @@ -912,34 +883,6 @@ object UnzipTripleTrdTile {
}


/*
directive lean
import Soda.tiles.fairness.tool.TileMessage
import Soda.tiles.fairness.tile.AttributePTile
*/

/**
* This tile is a particular case of a 'AttributePTile', that projects given property.
*/

trait WithPTile
{

def p : Actor => Measure

def apply (message : TileMessage [Seq [Actor] ] ) : TileMessage [Seq [Measure] ] =
AttributePTile .mk (p) .apply (message)

}

case class WithPTile_ (p : Actor => Measure) extends WithPTile

object WithPTile {
def mk (p : Actor => Measure) : WithPTile =
WithPTile_ (p)
}


/*
directive lean
import Soda.tiles.fairness.tool.TileMessage
Expand Down
20 changes: 0 additions & 20 deletions core/src/main/scala/soda/tiles/fairness/tile/ResultPTile.soda

This file was deleted.

20 changes: 0 additions & 20 deletions core/src/main/scala/soda/tiles/fairness/tile/WithPTile.soda

This file was deleted.

7 changes: 3 additions & 4 deletions docs/scoring_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ These are some of the implemented fairness tiles for scoring scenarios:
|:---------------------------------------------------|:---------------------------------------------|
| all-actor <sub>*(a0), (a1), (a2)*</sub> | [AllActorTripleTile][AllActorTripleTile] |
| <sub>*(a)*</sub> prediction <sub>*(m)*</sub> | [PredictionPTile][PredictionPTile] |
| <sub>*(a)*</sub> result <sub>*(m)*</sub> | [ResultPTile][ResultPTile] |
| <sub>*(a)*</sub> result <sub>*(m)*</sub> | [AttributePTile][AttributePTile] |
| <sub>*(m0), (m1)*</sub> false-pos <sub>*(m)*</sub> | [FalsePosTile][FalsePosTile] |
| <sub>*(a)*</sub> with <sub>*(m)*</sub> | [WithPTile][WithPTile] |
| <sub>*(a)*</sub> with <sub>*(m)*</sub> | [AttributePTile][AttributePTile] |
| <sub>*(m0), (m1)*</sub> correlation <sub>*m*</sub> | [CorrelationTile][CorrelationTile] |
| <sub>*m*</sub> decision <sub>*b*</sub> | [DecisionTile][DecisionTile] |
| unbiasedness <sub>*b*</sub> | [UnbiasednessPipeline][UnbiasednessPipeline] |
Expand All @@ -40,9 +40,8 @@ graph LR

[AllActorTripleTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/AllActorTripleTile.soda
[PredictionPTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/PredictionPTile.soda
[ResultPTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/ResultPTile.soda
[AttributePTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/AttributePTile.soda
[FalsePosTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/FalsePosTile.soda
[WithPTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/WithPTile.soda
[CorrelationTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/CorrelationTile.soda
[DecisionTile]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/tile/DecisionTile.soda
[UnbiasednessPipeline]: https://github.com/julianmendez/tiles/blob/master/core/src/main/scala/soda/tiles/fairness/pipeline/UnbiasednessPipeline.soda
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ import soda.tiles.fairness.tile.MapPTile
import soda.tiles.fairness.tile.NeededPTile
import soda.tiles.fairness.tile.PredictionPTile
import soda.tiles.fairness.tile.ReceivedSigmaPTile
import soda.tiles.fairness.tile.ResultPTile
import soda.tiles.fairness.tile.SigmaTile
import soda.tiles.fairness.tile.UnzipPairFstTile
import soda.tiles.fairness.tile.UnzipPairSndTile
import soda.tiles.fairness.tile.UnzipTripleFstTile
import soda.tiles.fairness.tile.UnzipTripleSndTile
import soda.tiles.fairness.tile.UnzipTripleTrdTile
import soda.tiles.fairness.tile.WithPTile
import soda.tiles.fairness.tile.ZipTile
import soda.tiles.fairness.pipeline.EqualityPipeline
import soda.tiles.fairness.pipeline.EquityPipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ import
soda.tiles.fairness.tile.NeededPTile
soda.tiles.fairness.tile.PredictionPTile
soda.tiles.fairness.tile.ReceivedSigmaPTile
soda.tiles.fairness.tile.ResultPTile
soda.tiles.fairness.tile.SigmaTile
soda.tiles.fairness.tile.UnzipPairFstTile
soda.tiles.fairness.tile.UnzipPairSndTile
soda.tiles.fairness.tile.UnzipTripleFstTile
soda.tiles.fairness.tile.UnzipTripleSndTile
soda.tiles.fairness.tile.UnzipTripleTrdTile
soda.tiles.fairness.tile.WithPTile
soda.tiles.fairness.tile.ZipTile
soda.tiles.fairness.pipeline.EqualityPipeline
soda.tiles.fairness.pipeline.EquityPipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,12 @@ import soda.tiles.fairness.tile.MapPTile
import soda.tiles.fairness.tile.NeededPTile
import soda.tiles.fairness.tile.PredictionPTile
import soda.tiles.fairness.tile.ReceivedSigmaPTile
import soda.tiles.fairness.tile.ResultPTile
import soda.tiles.fairness.tile.SigmaTile
import soda.tiles.fairness.tile.UnzipPairFstTile
import soda.tiles.fairness.tile.UnzipPairSndTile
import soda.tiles.fairness.tile.UnzipTripleFstTile
import soda.tiles.fairness.tile.UnzipTripleSndTile
import soda.tiles.fairness.tile.UnzipTripleTrdTile
import soda.tiles.fairness.tile.WithPTile
import soda.tiles.fairness.tile.ZipTile
import soda.tiles.fairness.pipeline.EqualityPipeline
import soda.tiles.fairness.pipeline.EquityPipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ import
soda.tiles.fairness.tile.NeededPTile
soda.tiles.fairness.tile.PredictionPTile
soda.tiles.fairness.tile.ReceivedSigmaPTile
soda.tiles.fairness.tile.ResultPTile
soda.tiles.fairness.tile.SigmaTile
soda.tiles.fairness.tile.UnzipPairFstTile
soda.tiles.fairness.tile.UnzipPairSndTile
soda.tiles.fairness.tile.UnzipTripleFstTile
soda.tiles.fairness.tile.UnzipTripleSndTile
soda.tiles.fairness.tile.UnzipTripleTrdTile
soda.tiles.fairness.tile.WithPTile
soda.tiles.fairness.tile.ZipTile
soda.tiles.fairness.pipeline.EqualityPipeline
soda.tiles.fairness.pipeline.EquityPipeline
Expand Down

0 comments on commit ed9bd8b

Please sign in to comment.