Class ADyadRankingInstance

  • All Implemented Interfaces:
    INDArrayDyadRankingInstance, java.lang.Iterable<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad>, org.api4.java.ai.ml.core.dataset.IInstance, org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance, org.api4.java.ai.ml.ranking.dataset.IRankingInstance<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad>, org.api4.java.ai.ml.ranking.dyad.dataset.IDyadRankingInstance
    Direct Known Subclasses:
    DenseDyadRankingInstance, SparseDyadRankingInstance

    public abstract class ADyadRankingInstance
    extends java.lang.Object
    implements INDArrayDyadRankingInstance
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void assertNonEmptyCollection​(java.util.Collection<?> collection)  
      protected void assertOnlyDyadsInCollection​(java.util.Collection<?> collection)  
      java.lang.Object[] getAttributes()  
      abstract java.util.Set<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> getAttributeValue​(int pos)  
      java.util.Set<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> getDyads()  
      double[] getPoint()  
      void removeColumn​(int columnPos)  
      void setAttributeValue​(int pos, java.lang.Object value)  
      abstract void setDyads​(java.util.Set<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> dyads)  
      void setLabel​(java.lang.Object obj)  
      abstract void setRanking​(Ranking<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> ranking)  
      org.nd4j.linalg.api.ndarray.INDArray toMatrix()
      Converts a dyad ranking to a INDArray matrix where each row corresponds to a dyad.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.api4.java.ai.ml.core.dataset.IInstance

        getNumAttributes, getPointValue, isAttributeValuePresent
      • Methods inherited from interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance

        isLabelPresent
      • Methods inherited from interface org.api4.java.ai.ml.ranking.dataset.IRankingInstance

        getLabel, getNumberOfRankedElements
      • Methods inherited from interface java.lang.Iterable

        forEach, iterator, spliterator
    • Constructor Detail

      • ADyadRankingInstance

        public ADyadRankingInstance()
    • Method Detail

      • toMatrix

        public org.nd4j.linalg.api.ndarray.INDArray toMatrix()
        Description copied from interface: INDArrayDyadRankingInstance
        Converts a dyad ranking to a INDArray matrix where each row corresponds to a dyad.
        Specified by:
        toMatrix in interface INDArrayDyadRankingInstance
        Returns:
        The dyad ranking in INDArray matrix form.
      • getPoint

        public double[] getPoint()
        Specified by:
        getPoint in interface org.api4.java.ai.ml.core.dataset.IInstance
      • removeColumn

        public void removeColumn​(int columnPos)
        Specified by:
        removeColumn in interface org.api4.java.ai.ml.core.dataset.IInstance
      • getAttributes

        public java.lang.Object[] getAttributes()
        Specified by:
        getAttributes in interface org.api4.java.ai.ml.core.dataset.IInstance
      • assertOnlyDyadsInCollection

        protected void assertOnlyDyadsInCollection​(java.util.Collection<?> collection)
      • assertNonEmptyCollection

        protected void assertNonEmptyCollection​(java.util.Collection<?> collection)
      • getAttributeValue

        public abstract java.util.Set<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> getAttributeValue​(int pos)
        Specified by:
        getAttributeValue in interface org.api4.java.ai.ml.core.dataset.IInstance
      • getDyads

        public java.util.Set<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> getDyads()
      • setDyads

        public abstract void setDyads​(java.util.Set<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> dyads)
      • setRanking

        public abstract void setRanking​(Ranking<org.api4.java.ai.ml.ranking.dyad.dataset.IDyad> ranking)
      • setLabel

        public void setLabel​(java.lang.Object obj)
        Specified by:
        setLabel in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance
      • setAttributeValue

        public void setAttributeValue​(int pos,
                                      java.lang.Object value)
        Specified by:
        setAttributeValue in interface org.api4.java.ai.ml.core.dataset.IInstance
        Specified by:
        setAttributeValue in interface org.api4.java.ai.ml.core.dataset.supervised.ILabeledInstance