object LoloPyDataLoader
Tool used to transfer data from LoloPy to the JVM
Works by receiving an byte array and converting it to Scala Sequence
- Alphabetic
- By Inheritance
- LoloPyDataLoader
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
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
-
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, ...)
-
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
-
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
-
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
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
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