def q4ii(): print '1.LinearSVC with Digits' [digit_X, digit_y] = util.generate_digits() new_X = quad_proj.quad_proj(digit_X) linear_svc(new_X, digit_y) print '2.SVC with Digits' [digit_X, digit_y] = util.generate_digits() new_X = quad_proj.quad_proj(digit_X) svc(new_X, digit_y) print '3.LogisticRegression with Digits' [digit_X, digit_y] = util.generate_digits() new_X = quad_proj.quad_proj(digit_X) logisticRegression(new_X, digit_y)
def q4iii(): print '1.LinearSVC with Digits' [digit_X, digit_y] = util.generate_digits() X2 = quad_proj.quad_proj(digit_X) X3 = rand_proj.rand_proj(X2, 64) linear_svc(X3, digit_y) print '2.SVC with Digits' [digit_X, digit_y] = util.generate_digits() X2 = quad_proj.quad_proj(digit_X) X3 = rand_proj.rand_proj(X2, 64) svc(X3, digit_y) print '3.LogisticRegression with Digits' [digit_X, digit_y] = util.generate_digits() X2 = quad_proj.quad_proj(digit_X) X3 = rand_proj.rand_proj(X2, 64) logisticRegression(X3, digit_y)
def q3ii(): print '1.LinearSVC with Boston50' [boston50_X, boston50_y] = util.generate_Boston50() linear_svc(boston50_X, boston50_y) print '2.LinearSVC with Boston75' [boston75_X, boston75_y] = util.generate_Boston75() linear_svc(boston75_X, boston75_y) print '3.LinearSVC with Digits' [digit_X, digit_y] = util.generate_digits() linear_svc(digit_X, digit_y) print '4.SVC with Boston50' [boston50_X, boston50_y] = util.generate_Boston50() svc(boston50_X, boston50_y) print '5.SVC with Boston75' [boston75_X, boston75_y] = util.generate_Boston75() svc(boston75_X, boston75_y) print '6.SVC with Digits' [digit_X, digit_y] = util.generate_digits() svc(digit_X, digit_y) print '7.LogisticRegression with Boston50' [boston50_X, boston50_y] = util.generate_Boston50() logisticRegression(boston50_X, boston50_y) print '8.LogisticRegression with Boston75' [boston75_X, boston75_y] = util.generate_Boston75() logisticRegression(boston75_X, boston75_y) print '9.LogisticRegression with Digits' [digit_X, digit_y] = util.generate_digits() logisticRegression(digit_X, digit_y)
import util import my_cross_val if __name__ == "__main__": print '1.LinearSVC with Boston50' [boston50_X, boston50_y] = util.generate_Boston50() my_cross_val.my_cross_val('LinearSVC', boston50_X, boston50_y, 10) print '2.LinearSVC with Boston75' [boston75_X, boston75_y] = util.generate_Boston75() my_cross_val.my_cross_val('LinearSVC', boston75_X, boston75_y, 10) print '3.LinearSVC with Digits' [digit_X, digit_y] = util.generate_digits() my_cross_val.my_cross_val('LinearSVC', digit_X, digit_y, 10) print '4.SVC with Boston50' [boston50_X, boston50_y] = util.generate_Boston50() my_cross_val.my_cross_val('SVC', boston50_X, boston50_y, 10) print '5.SVC with Boston75' [boston75_X, boston75_y] = util.generate_Boston75() my_cross_val.my_cross_val('SVC', boston75_X, boston75_y, 10) print '6.SVC with Digits' [digit_X, digit_y] = util.generate_digits() my_cross_val.my_cross_val('SVC', digit_X, digit_y, 10) print '7.LogisticRegression with Boston50' [boston50_X, boston50_y] = util.generate_Boston50()