private void GenerateDataset() { keyStore.Clear(); dataSet.Clear(); Console.WriteLine("Generating Dataset..."); for (int i = 0; i < 100000; i++) { keyStore.Add(BTCBasicFunctions.CreateKeyPair()); } Console.WriteLine("Converting Dataset..."); for (int i = 0; i < keyStore.Count; i++) { DataSet ds = new DataSet() { PublicAddressDouble = new double[20], PrivateKey = keyStore[i].PrivateKeyByteArray, PublicAddress = keyStore[i].PublicAddress }; byte[] pap = BTCPrep.PrepareAddress(keyStore[i].PublicAddress); if (pap.Length != 20) { continue; } for (int j = 0; j < pap.Length; j++) { ds.PublicAddressDouble[j] = pap[j] != 0 ? pap[j] / 256.0 : 0; } dataSet.Add(ds); } }
internal async Task GenerateValidationDataset() { Console.WriteLine("Generating Validation Dataset..."); for (int i = 0; i < 10000; i++) { valkeyStore.Add(await BTCBasicFunctions.CreateKeyPair()); } Console.WriteLine("Converting Validation Dataset..."); for (int i = 0; i < valkeyStore.Count; i++) { DataSet ds = new DataSet() { PublicAddressDouble = new double[20], PrivateKey = valkeyStore[i].PrivateKeyByteArray, PublicAddress = valkeyStore[i].PublicAddress }; byte[] pap = await BTCPrep.PrepareAddress(valkeyStore[i].PublicAddress); if (pap.Length != 20) { continue; } for (int j = 0; j < pap.Length; j++) { ds.PublicAddressDouble[j] = pap[j]; } valdataSet.Add(ds); } }
public void Prep() { byte[] pap = BTCPrep.PrepareAddress(publicAddress); for (int j = 0; j < pap.Length; j++) { publicAddressDouble[j] = pap[j] != 0 ? pap[j] / 256.0 : 0; } }
internal void GenerateValidationDataset() { valkeyStore.Clear(); valdataSet.Clear(); Console.WriteLine("Generating Validation Dataset..."); for (int i = 0; i < 10000; i++) { valkeyStore.Add(BTCBasicFunctions.CreateKeyPair()); } Console.WriteLine("Converting Validation Dataset..."); for (int i = 0; i < valkeyStore.Count; i++) { DataSet ds = new DataSet() { PublicAddressDouble = new double[20], PrivateKey = valkeyStore[i].PrivateKeyByteArray, PublicAddress = valkeyStore[i].PublicAddress }; byte[] pap = BTCPrep.PrepareAddress(valkeyStore[i].PublicAddress); if (pap.Length != 20) { continue; } for (int j = 0; j < pap.Length; j++) { ds.PublicAddressDouble[j] = pap[j]; } //Added for Engine B ds.PublicAddressDouble = scalingFunction.LinearScaleToRange(ds.PublicAddressDouble, scalingFunction.FindMinMax(ds.PublicAddressDouble), new MinMax() { min = 0, max = 0.01 }); valdataSet.Add(ds); } }