@Override
    protected void _fit(Dataframe trainingData) {
        ModelParameters modelParameters = knowledgeBase.getModelParameters();
        Map<Object, Object> referenceLevels = modelParameters.getReferenceLevels();

        Set<TypeInference.DataType> supportedXDataTypes = getSupportedXDataTypes();
        Map<Object, TypeInference.DataType> xDataTypes = trainingData.getXDataTypes();

        //find the referenceLevels for each supported variable
        for(Record r : trainingData) {
            for(Map.Entry<Object, Object> entry: r.getX().entrySet()) {
                Object column = entry.getKey();
                Object value = entry.getValue();
                if(value != null && supportedXDataTypes.contains(xDataTypes.get(column)) ) {
                    referenceLevels.putIfAbsent(column, value);
                }
            }
        }
    }
@ Override protected void _fit ( Dataframe trainingData ) { ModelParameters modelParameters = knowledgeBase . getModelParameters ( ) ; Map < Object , Object > referenceLevels = modelParameters . getReferenceLevels ( ) ; Set < TypeInference . DataType > supportedXDataTypes = getSupportedXDataTypes ( ) ; Map < Object , TypeInference . DataType > xDataTypes = trainingData . getXDataTypes ( ) ; for ( Record r : trainingData ) { for ( Map . Entry < Object , Object > entry : r . getX ( ) . entrySet ( ) ) { Object column = entry . getKey ( ) ; Object value = entry . getValue ( ) ; if ( value != null && supportedXDataTypes . contains ( xDataTypes . get ( column ) ) ) { referenceLevels . putIfAbsent ( column , value ) ; } } } }
{@inheritDoc}