cerndb / dist-keras

Distributed Deep Learning, with a focus on distributed training, using Keras and Apache Spark.
http://joerihermans.com/work/distributed-keras/
GNU General Public License v3.0
623 stars 169 forks source link

How to scale a vector using standardscaler? #79

Closed pooja9410 closed 6 years ago

pooja9410 commented 6 years ago

I am using training LSTM on time-series data. I want to perform regression using LSTM. I have created a vectorassembler. I am able to scale it using standardscaler transformer. I want to scale target variable also using standaredscaler.

standard_scaler = StandardScaler(inputCol="adjclose", outputCol="adjclose_n", withStd=True,withMean=True) standard_scaler_model = standard_scaler.fit(dataset) dataset = standard_scaler_model.transform(dataset)

But it is showing an error.

IllegalArgumentException: 'requirement failed: Column adjclose must be of type org.apache.spark.ml.linalg.VectorUDT@3bfc3ba7 but was actually DoubleType.'