public FeatureMapperFT() { super(new FractionDifferences() ); } }
public float produceFeature(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { return normalize(produceFeatureInternal(record, featureIndex), FRACTION_NORM); }
public void mapFeatures(BaseInformationRecords.BaseInformationOrBuilder record, INDArray inputs, int indexOfRecord) { indices[0] = indexOfRecord; for (int featureIndex = 0; featureIndex < numberOfFeatures(); featureIndex++) { indices[1] = featureIndex; inputs.putScalar(indices, produceFeature(record, featureIndex)); } }
public float produceFeatureInternal(BaseInformationRecords.BaseInformationOrBuilder record, int featureIndex) { int direction = 1; if (featureIndex >= AbstractFeatureMapper.MAX_GENOTYPES){ featureIndex = featureIndex - AbstractFeatureMapper.MAX_GENOTYPES; direction = -1; } assert featureIndex >= 0 && featureIndex < AbstractFeatureMapper.MAX_GENOTYPES: "Only MAX_GENOTYPES features"; int germCounts = getAllCounts(record, false, true).get(featureIndex).forwardCount + getAllCounts(record, false, true).get(featureIndex).reverseCount; int somCounts = getAllCounts(record, true, true).get(featureIndex).forwardCount + getAllCounts(record, true, true).get(featureIndex).reverseCount; return Math.max(0,(normalize(germCounts,totalCountsGerm) - normalize(somCounts,totalCountsSom))*direction); }
public FeatureMapperV6() { super(new FractionDifferences(), new MagnitudeFeatures(), new ReadIndexFeatures(), new QualityFeatures()); } }