Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ class InputEncoderUtilWrapper(
*/
fun getAllParamsPathsAndEncodedValues(): Map<String, Double> {

val paramPaths = endPointToGeneList().map { it.paramPath }
val encodedValues = encode()
val geneList = endPointToGeneList()
val paramPaths = geneList.map { it.paramPath }
val encodedValues = encode(geneList)

return paramPaths.zip(encodedValues).toMap()
}
Expand Down Expand Up @@ -186,10 +187,10 @@ class InputEncoderUtilWrapper(
*
* @return a list of doubles representing the encoded feature vector
*/
fun encode(): List<Double> {
fun encode(geneList: List<ParamAndGene> = endPointToGeneList()): List<Double> {
val sentinel = -1e6 // for null handling
val neutral = 0.0 // for handling unsupported genes
val listGenes = endPointToGeneList().map { it.gene }
val listGenes = geneList.map { it.gene }
val rawEncodedFeatures = mutableListOf<Double>()

for (g in listGenes) {
Expand Down
Loading