Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
[CURRENCY.ETH_EUR]: {
predict: trades => { //before prediction (is called)
return TRADES_TO_ROW(trades, ETH_EUR_FACTOR);
},
main: row => { //before training (is mapped)
// const trades = row.x.slice(0);
row.x = TRADES_TO_ROW(row.x, ETH_EUR_FACTOR);
row.y = TRADES_TO_ROW_OUTPUT(row.y, ETL_FACTOR);
return row;
},
alter: (outputs, tradeForPrediction) => { //after prediction (is called)
return OUTPUT_TO_TRADE_PRICES(outputs, ETL_FACTOR, tradeForPrediction);
}
},
[CURRENCY.LTC_EUR]: {
predict: trades => { //before prediction (is called)
return TRADES_TO_ROW(trades, LTC_EUR_FACTOR);
},
main: row => { //before training (is mapped)
// const trades = row.x.slice(0);
row.x = TRADES_TO_ROW(row.x, LTC_EUR_FACTOR);
row.y = TRADES_TO_ROW_OUTPUT(row.y, ETL_FACTOR);
return row;
},
alter: (outputs, tradeForPrediction) => { //after prediction (is called)
return OUTPUT_TO_TRADE_PRICES(outputs, ETL_FACTOR, tradeForPrediction);
}
},
};
const SUM_LAST_ELEMENTS_IN_ARRAY = (a, c = 3) => {
startForLitecoin(){
return this.start(CURRENCY.LTC_EUR, 3335);
}