Bowles_2.3_rocks: Visualizing Properties of the Rocks versus Mines Data Set

Listing 2-6: Parallel Coordinates Graph for Real Attribute Visualization—linePlots.py

  • read_csv
  • #plot rows of data as if they were series data dataRow = rocksVMines.iloc[i,0:60] dataRow.plot(color=pcolor)
  • plot.xlabel("Attribute Index") plot.ylabel(("Attribute Values")) plot.show()
  • Figure 2-2: Constructing a parallel coordinates plot

Listing 2-7: Cross Plotting Pairs of Attributes—corrPlot.py

  • pd.read_csv
  • plot.scatter(dataRow2, dataRow3) plot.xlabel("2nd Attribute") plot.ylabel(("3rd Attribute")) plot.show()

Figure 2-4: Cross-plot of rocks versus mines attributes 2 and 3

Listing 2-8: Correlation between Classifi cation Target and Real Attributes—targetCorr.py

Listing 2-9: Pearson’s Correlation Calculation for Attributes 2 versus 3 and 2 versus 21 - corrCalc.py

Figure 2-5: Cross- plot of rocks versus mines attributes 2 and 21

Listing 2-10: Presenting Attribute Correlations Visually—sampleCorrHeatMap.py