Packages

o

io.citrine.lolo.util

LoloPyDataLoader

object LoloPyDataLoader

Tool used to transfer data from LoloPy to the JVM

Works by receiving an byte array and converting it to Scala Sequence

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LoloPyDataLoader
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. def deserializeObject(bytes: Array[Byte]): Any

    Deserialize a JVM object from a byte array

    Deserialize a JVM object from a byte array

    bytes

    Bytes to be unserialized

    returns

    The object

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def get1DArray(input: Array[Byte], getDouble: Boolean, bigEndian: Boolean): Seq[Any]

    Receive a 1D array of floats or integers

    Receive a 1D array of floats or integers

    input

    Input byte array

    getDouble

    Whether to read doubles (or integers)

    bigEndian

    Whether the file

  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def getClassifierExpected(predictionResult: PredictionResult[Any]): Array[Byte]

    Get the predicted class from a classification model

    Get the predicted class from a classification model

    Note: The class labels must be integers

    predictionResult

    Prediction result from a classifier

    returns

    Bytes of a integer array of the predicted class labels

  13. def getClassifierProbabilities(predictionResult: PredictionResult[Any], nClasses: Int): Array[Byte]

    Get the classification probabilities as an array

    Get the classification probabilities as an array

    Note: Model must be trained with sequential nonnegative integers starting at 0 as class names.

    predictionResult

    Prediction result from a classifier

    nClasses

    Number of classes in the problem

    returns

    Bytes of a double array of probabilities, stored row-wise (i.e., first entry, then second, ...)

  14. def getFeatureArray(input: Array[Byte], numAttributes: Integer, bigEndian: Boolean): Seq[Vector[Double]]

    Receives the feature array.

    Receives the feature array. Assumes it to be in a C-ordering

    input

    Input array as a byte array

    numAttributes

    Number of features in the array

    bigEndian

    Whether the numbers are is big-endian or not

    returns

    The array as a Scala array

  15. def getRegressionExpected(predictionResult: PredictionResult[Any]): Array[Byte]

    Generate the results of a regression model, which are assumed to be doubles

    Generate the results of a regression model, which are assumed to be doubles

    predictionResult

    Prediction result object

    returns

    Byte array of doubles in native system order

  16. def getRegressionUncertainty(predictionResult: PredictionResult[Any]): Array[Byte]

    Generate the uncertainties of a regression model, which are assumed to be doubles

    Generate the uncertainties of a regression model, which are assumed to be doubles

    predictionResult

    Prediction result object

    returns

    Byte array of doubles in native system order

  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. def serializeObject(obj: Any, compressLevel: Int): Array[Byte]

    Convert a JVM object to a byte array

    Convert a JVM object to a byte array

    Used for saving a model in lolopy inside of a pickle file.

    obj

    Object to be saved

    compressLevel

    Compression level used to condense the serialized representation

    returns

    Object as a serialized byte array

  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  28. def zipTrainingData(X: Seq[Vector[Double]], y: Seq[Any]): Seq[(Vector[Double], Any)]

    Zips the features and labels together

    Zips the features and labels together

    This function was created to provide the ability to easily Zip training and testing data when using Lolo from lolopy. Py4J does not support generic methods well, and this function is a workaround for being able to call zip when needed generate a training set.

    X

    Feature array

    y

    Label array

    returns

    Zipped arrays

Inherited from AnyRef

Inherited from Any

Ungrouped