This repository has been archived on 2019-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
s9-mtds-prj-flink/plotClassification.py

22 lines
355 B
Python
Raw Normal View History

2019-01-24 15:10:28 +01:00
#!/usr/bin/env python3
import sys
import numpy as np
import matplotlib.pyplot as plt
FILENAME = sys.argv[1] # CSV file
data = np.loadtxt(FILENAME, delimiter=',')
D = data[0].size - 1 # Number of dimensions
assert D <= 2
assert D > 0
X = data[:, 0]
Y = data[:, 1] if D > 1 else np.zeros(len(data))
C = data[:, -1]
plt.scatter(X, Y, c=C)
plt.show()