def Analysis():
  test_size = 1000
  X, y = Build_Data_Set()
  print(len(X))
  
  clf = svm.SVC(kernel="linear", C=1.0)
  clf.fit(X[:-test_size],y[:-test_size]) # train data

  correct_count = 0
  for x in range(1, test_size+1):
    if clf.predict(X[-x])[0] == y[-x]:
      correct_count += 1

  print("correct_count=%s"%float(correct_count))
  print("test_size=%s"%float(test_size))
  # on OS X with 64-bit python 2.7.6 had to add float(), otherwise result was zero:
  print("Accuracy:", (float(correct_count) / float(test_size)) * 100.00)

# test shuffling data:
# def Randomizing():
#   df = pd.DataFrame({"D1":range(5), "D2":range(5)})
#   print(df)
#   df2 = df.reindex(np.random.permutation(df.index))
#   print(df2)

# Randomizing()
dataset/ETHPy150Open cleesmith/sentdex_scikit_machine_learning_tutorial_for_investing/p15.py/Analysis/original