Test


In [1]:
# load the result of feature selection
load("../transformed data/golub50gene.rda")

In [3]:
test_vote = t(p_50*t(sweep(golub_test_50, 2, b)))
test_V1 = apply(test_vote, 1, function(x) sum(x[x>0]))
test_V2 = abs(apply(test_vote, 1, function(x) sum(x[x<=0])))
test_pred = (test_V1-test_V2)/(test_V1+test_V2)
test_pred_r = ifelse(abs(test_pred)>0.3, ifelse(test_pred>0, "AML", "ALL"), "Uncertain")
test_table = table(Test_Predict = test_pred_r, Test_Actual = golub_test_r)
test_table


Error in table(Test_Predict = test_pred_r, Test_Actual = golub_test_r): object 'golub_test_r' not found
Traceback:

1. table(Test_Predict = test_pred_r, Test_Actual = golub_test_r)

In [ ]: