Search code examples
dl4j

"Why after remove columns text don't delete? in Dl4j transform"


"I'm trying to train NN, but have problems, with text in csv, so I decided to remove all text from it."

"I'm trying to remove text from csv file, but text didn't removes"

TransformProcess tp = new TransformProcess.Builder(schema)
  .removeColumns("MSZoning","Street","Alley","LotConfig","LotShape","LandContour","RoofMatl","LotConfig",
                               "BsmtCond",
                               "Utilities","LandSlope", "Neighborhood", "Condition1", "Condition2", "BldgType",
                               "HouseStyle", "RoofStyle",  "Exterior1st", "Exterior2nd", "MasVnrType", "ExterQual",
                               "ExterCond", "Foundation", "BsmtQual", "BsmtExposure",
                               "BsmtFinType1", "BsmtFinType2", "Heating", "HeatingQC", "CentralAir",  "KitchenQual",
                               "Functional", "FireplaceQu", "GarageType",
                               "GarageFinish", "GarageQual", "GarageCond", "PavedDrive", "PoolQC", "Fence",
                               "MiscFeature", "SaleType", "SaleCondition","Electrical")

csv file


Solution

  • Look at this example: https://github.com/eclipse/deeplearning4j-examples/blob/master/datavec-examples/src/main/java/org/datavec/transform/basic/BasicDataVecExample.java

    You need to call tp.build() on your TransformProcess and then get the resulting schema:

    Schema outputSchema = tp.getFinalSchema();