title: 'PipelinedRDD' object has no attribute '_jdf'
body: <p>It's my first post on stakcoverflow because I don't find any clue to solve this message "'PipelinedRDD' object has no attribute '_jdf'" that appear when I call trainer.fit on my train dataset to create a neural network model under Spark in Python</p>
  
  <p>here is my code </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>from pyspark import SparkContext
  from pyspark.ml.classification import MultilayerPerceptronClassifier, MultilayerPerceptronClassificationModel
  from pyspark.mllib.feature import StandardScaler
  from pyspark.mllib.regression import LabeledPoint
  from pyspark.sql import SQLContext 
  from pyspark.ml.evaluation import MulticlassClassificationEvaluator
     
  ### Import data in Spark ###
  RDD_RAWfileWH= sc.textFile("c:/Anaconda2/Cognet/Data_For_Cognet_ready.csv")
  header = RDD_RAWfileWH.first()
  # Delete header from RAWData
  RDD_RAWfile1 = RDD_RAWfileWH.filter(lambda x: x != header)
  # Split each line of the RDD
  RDD_RAWfile = RDD_RAWfile1.map(lambda line:[float(x) for x in line.split(',')])
  
  FinalData = RDD_RAWfile.map(lambda row: LabeledPoint(row[0],[row[1:]]))
  
  (trainingData, testData) = FinalData.randomSplit([0.7, 0.3])
  
  layers = [15, 2, 3]
  
  # create the trainer and set its parameters
  trainer = MultilayerPerceptronClassifier(maxIter=100, layers=layers, blockSize=128,seed=1234)
  # train the model
  model = trainer.fit(trainingData)
   </code></pre>
  </div>
  </div>
  </p>
  
  <p>and the trace </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-28-123dce2b085a&gt; in &lt;module&gt;()
       46 trainer = MultilayerPerceptronClassifier(maxIter=100, layers=layers, blockSize=128,seed=1234)
       47 # train the model
  ---&gt; 48 model = trainer.fit(trainingData)
       49     # compute accuracy on the test set
       50  #   result = model.transform(test)
  
  C:\Users\piod7321\spark-1.6.1-bin-hadoop2.6\python\pyspark\ml\pipeline.pyc in fit(self, dataset, params)
       67                 return self.copy(params)._fit(dataset)
       68             else:
  ---&gt; 69                 return self._fit(dataset)
       70         else:
       71             raise ValueError("Params must be either a param map or a list/tuple of param maps, "
  
  C:\Users\piod7321\spark-1.6.1-bin-hadoop2.6\python\pyspark\ml\wrapper.pyc in _fit(self, dataset)
      131 
      132     def _fit(self, dataset):
  --&gt; 133         java_model = self._fit_java(dataset)
      134         return self._create_model(java_model)
      135 
  
  C:\Users\piod7321\spark-1.6.1-bin-hadoop2.6\python\pyspark\ml\wrapper.pyc in _fit_java(self, dataset)
      128         """
      129         self._transfer_params_to_java()
  --&gt; 130         return self._java_obj.fit(dataset._jdf)
      131 
      132     def _fit(self, dataset):
  
  AttributeError: 'PipelinedRDD' object has no attribute '_jdf'</code></pre>
  </div>
  </div>
  </p>
  
  <p>I'am not an expert on Spark so If anyone know what is this jdf attribute and how to solve this issue it will be very helpfull for me.</p>
  
  <p>thanks a lot</p>