org.apache.spark.mllib.clustering

MCL

class MCL extends Serializable

A clustering model for MCL.

See also

README.md for more details on theory

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MCL
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MCL()

    Construct an MCL instance

    Construct an MCL instance

    Default parameters: {expansionRate: 2, inflationRate: 2, convergenceRate: 0.01, epsilon: 0.05, maxIterations: 10, selfLoopWeight: 0.1, graphOrientationStrategy: "undirected"}.

    returns

    an MCL object

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def difference(m1: IndexedRowMatrix, m2: IndexedRowMatrix): Double

    Calculate the distance between two matrices.

    Calculate the distance between two matrices.

    Find the euclidean distance bewtween two matrices.

    m1

    an adjacency matrix at step n

    m2

    same adjacency matrix at step n+1

    returns

    a normalized distance between m1 and m2

    To do

    Use another object to speed up join between RDD.

  9. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  11. def expansion(mat: IndexedRowMatrix): BlockMatrix

    Expand matrix

    Expand matrix

    mat

    an adjacency matrix

    returns

    expanded adjacency matrix

  12. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  14. def getEpsilon: Double

    Get epsilon coefficient

    Get epsilon coefficient

    Change an edge value to zero when the overall weight of this edge is less than a certain percentage

  15. def getExpansionRate: Int

    Get expansion rate

  16. def getGraphOrientationStrategy: String

    Get graph orientation strategy selected depending on graph nature

  17. def getInflationRate: Double

    Get inflation rate

  18. def getMaxIterations: Int

    Get stop condition if MCL algorithm does not converge fairly quickly

  19. def getSelfLoopWeight: Double

    Get weight of automatically added self loops in adjacency matrix rows

  20. val graphOrientationStrategyOption: Seq[String]

    Available graph orientation strategy options.

    Available graph orientation strategy options.

    See also

    README.md for more details

  21. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  22. def inflation(mat: BlockMatrix): IndexedRowMatrix

    Inflate matrix

    Inflate matrix

    Prune and normalization are applied locally (on each row). So we avoid two more complete scanning of adjacency matrix. As explained in issue #8, pruning is applied on expanded matrix, so we take advantage of natural normalized expansion state.

    mat

    an adjacency matrix

    returns

    inflated adjacency matrix

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. def normalization(row: SparseVector): SparseVector

    Normalize row

    Normalize row

    row

    an unnormalized row of th adjacency matrix

    returns

    normalized row

  26. def normalization(mat: IndexedRowMatrix): IndexedRowMatrix

    Normalize matrix

    Normalize matrix

    mat

    an unnormalized adjacency matrix

    returns

    normalized adjacency matrix

  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def removeWeakConnections(row: SparseVector): SparseVector

    Remove weakest connections from a row

    Remove weakest connections from a row

    Connections weight in adjacency matrix which is inferior to a very small value is set to 0

    row

    a row of the adjacency matrix

    returns

    sparsed row

    To do

    Add more complex pruning strategies.

    See also

    http://micans.org/mcl/index.html

  30. def run[VD](graph: Graph[VD, Double]): MCLModel

    Train MCL algorithm.

    Train MCL algorithm.

    graph

    a graph to partitioned

    returns

    an MCLModel where each node is associated to one or more clusters

  31. def setEpsilon(epsilon: Double): MCL

    Set the minimum percentage to get an edge weight to zero.

    Set the minimum percentage to get an edge weight to zero.

    Default: 0.01.

    Exceptions thrown
    IllegalArgumentException

    epsilon must be higher than 0 and lower than 1

  32. def setExpansionRate(expansionRate: Int): MCL

    Set the expansion rate.

    Set the expansion rate.

    Default: 2.

    Exceptions thrown
    IllegalArgumentException

    expansionRate must be higher than 1

  33. def setGraphOrientationStrategy(graphOrientationStrategy: String): MCL

    Set graph orientation strategy.

    Set graph orientation strategy.

    Default: undirected.

    Exceptions thrown
    IllegalArgumentException

    graphOrientationStrategy must be contained in graphOrientationStrategyOption

  34. def setInflationRate(inflationRate: Double): MCL

    Set the inflation rate.

    Set the inflation rate.

    Default: 2.

    Exceptions thrown
    IllegalArgumentException

    inflationRate must be higher than 0

  35. def setMaxIterations(maxIterations: Int): MCL

    Set maximum number of iterations.

    Set maximum number of iterations.

    Default: 10.

    Exceptions thrown
    IllegalArgumentException

    maxIterations must be higher than 0

  36. def setSelfLoopWeight(selfLoopWeight: Double): MCL

    Set self loops weights.

    Set self loops weights.

    Default: 0.1.

    Exceptions thrown
    IllegalArgumentException

    selfLoopWeight must be higher than 0 and lower than 1

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  38. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped