use of com.airbnb.aerosolve.core.FeatureVector in project aerosolve by airbnb.
the class FloatToDenseTransformTest method makeFeatureVectorPartial.
public FeatureVector makeFeatureVectorPartial() {
Map<String, Map<String, Double>> floatFeatures = new HashMap<>();
Map<String, Double> floatFeature1 = new HashMap<>();
floatFeature1.put("x", 50.0);
floatFeature1.put("s", 2000.0);
Map<String, Double> floatFeature2 = new HashMap<>();
floatFeature2.put("z", 2000.0);
floatFeature2.put("k", 2000.0);
floatFeatures.put("floatFeature1", floatFeature1);
floatFeatures.put("floatFeature2", floatFeature2);
FeatureVector featureVector = new FeatureVector();
featureVector.setFloatFeatures(floatFeatures);
return featureVector;
}
use of com.airbnb.aerosolve.core.FeatureVector in project aerosolve by airbnb.
the class FloatToDenseTransformTest method makeFeatureVectorString.
public FeatureVector makeFeatureVectorString() {
Map<String, Map<String, Double>> floatFeatures = new HashMap<>();
Map<String, Double> floatFeature1 = new HashMap<>();
floatFeature1.put("s", 2000.0);
Map<String, Double> floatFeature2 = new HashMap<>();
floatFeature2.put("k", 2000.0);
floatFeatures.put("floatFeature1", floatFeature1);
floatFeatures.put("floatFeature2", floatFeature2);
FeatureVector featureVector = new FeatureVector();
featureVector.setFloatFeatures(floatFeatures);
return featureVector;
}
use of com.airbnb.aerosolve.core.FeatureVector in project aerosolve by airbnb.
the class FloatToDenseTransformTest method testPartial.
@Test
public void testPartial() {
FeatureVector featureVector = testTransform(makeFeatureVectorPartial());
Map<String, List<Double>> denseFeatures = featureVector.getDenseFeatures();
assertNull(denseFeatures);
}
use of com.airbnb.aerosolve.core.FeatureVector in project aerosolve by airbnb.
the class FloatToDenseTransformTest method testFloat.
@Test
public void testFloat() {
FeatureVector featureVector = testTransform(makeFeatureVectorFloat());
Map<String, Map<String, Double>> features = featureVector.getFloatFeatures();
assertNotNull(features);
assertEquals(2, features.size());
Map<String, Double> out = features.get("floatFeature1");
assertEquals(2, out.size());
}
use of com.airbnb.aerosolve.core.FeatureVector in project aerosolve by airbnb.
the class FloatToDenseTransformTest method testMissFamily.
@Test
public void testMissFamily() {
FeatureVector featureVector = testTransform(makeFeatureVectorMissFamily());
Map<String, List<Double>> denseFeatures = featureVector.getDenseFeatures();
assertNull(denseFeatures);
}
Aggregations