All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.datavec.local.transforms.DataFrameOps Maven / Gradle / Ivy

There is a newer version: 1.0.0-M2.1
Show newest version
package org.datavec.local.transforms;

import org.datavec.api.transform.Transform;
import org.datavec.api.transform.transform.categorical.CategoricalToIntegerTransform;
import org.datavec.api.transform.transform.categorical.CategoricalToOneHotTransform;
import org.datavec.api.transform.transform.condition.ConditionalCopyValueTransform;
import org.datavec.api.transform.transform.string.AppendStringColumnTransform;
import org.datavec.dataframe.api.CategoryColumn;
import org.datavec.dataframe.api.Table;

/**
 * Created by agibsonccc on 11/11/16.
 */
public class DataFrameOps {

    public static void performTransform(Transform transform, Table table) {
        if (transform instanceof AppendStringColumnTransform) {
            AppendStringColumnTransform appendStringColumnTransform = (AppendStringColumnTransform) transform;
            CategoryColumn categoryColumn = (CategoryColumn) table.column(appendStringColumnTransform.getColumnName());
            table.addColumn(categoryColumn);
        } else if (transform instanceof CategoricalToIntegerTransform) {

        } else if (transform instanceof CategoricalToOneHotTransform) {

        } else if (transform instanceof ConditionalCopyValueTransform) {

        }


    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy