Hi everyone,
I'm developing a neural network model using the Titanic dataset, and I recently encountered the following warning:
"NetEncoder[{Scalar, ...}]" setting has been deprecated. Use "Real" or "Integer" bare port specifications instead.
In response, I tried changing "age"->"Real" , but the warning persists and doesn't resolve the issue.
Any suggestions on how to fix or properly update the encoder settings would be greatly appreciated.
Here are codes.
titanicdata = ExampleData[{"Dataset", "Titanic"}];
titanicdata = DeleteMissing[titanicdata, 1, 2];
{trainingData, testData} =
TakeDrop[RandomSample@titanicdata, 800]; Take[trainingData, 5]
net1 = NetGraph[{CatenateLayer[], LinearLayer[10],
BatchNormalizationLayer[], LinearLayer[],
LogisticSigmoid}, {{NetPort["age"], NetPort["class"],
NetPort["sex"]} -> 1, 1 -> 2 -> 3 -> 4 -> 5 -> NetPort["survived"]},
"age" -> "Scalar",
"class" -> NetEncoder[{"Class", {"1st", "2nd", "3rd"}, "UnitVector"}],
"sex" -> NetEncoder[{"Class", {"male", "female"}, "UnitVector"}],
"survived" -> "Boolean"]