clarified examples

This commit is contained in:
Davis King 2013-04-12 20:52:05 -04:00
parent 6d7b0358ce
commit adf0bc4f0a
3 changed files with 36 additions and 24 deletions

View File

@ -136,19 +136,19 @@ int main()
sample(0) = 3.123;
sample(1) = 2;
cout << "This sample should be >= 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a +1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 3.123;
sample(1) = 9.3545;
cout << "This sample should be >= 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a +1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 13.123;
sample(1) = 9.3545;
cout << "This sample should be < 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a -1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 13.123;
sample(1) = 0;
cout << "This sample should be < 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a -1 class example, the classifier output is " << learned_function(sample) << endl;
// We can also train a decision function that reports a well conditioned probability
@ -174,19 +174,23 @@ int main()
sample(0) = 3.123;
sample(1) = 2;
cout << "This +1 example should have high probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This +1 class example should have high probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 3.123;
sample(1) = 9.3545;
cout << "This +1 example should have high probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This +1 class example should have high probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 13.123;
sample(1) = 9.3545;
cout << "This -1 example should have low probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This -1 class example should have low probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 13.123;
sample(1) = 0;
cout << "This -1 example should have low probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This -1 class example should have low probability. Its probability is: "
<< learned_pfunct(sample) << endl;

View File

@ -150,19 +150,19 @@ int main()
sample(0) = 3.123;
sample(1) = 2;
cout << "This sample should be >= 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a +1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 3.123;
sample(1) = 9.3545;
cout << "This sample should be >= 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a +1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 13.123;
sample(1) = 9.3545;
cout << "This sample should be < 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a -1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 13.123;
sample(1) = 0;
cout << "This sample should be < 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a -1 class example, the classifier output is " << learned_function(sample) << endl;
// We can also train a decision function that reports a well conditioned probability
@ -183,19 +183,23 @@ int main()
sample(0) = 3.123;
sample(1) = 2;
cout << "This +1 example should have high probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This +1 class example should have high probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 3.123;
sample(1) = 9.3545;
cout << "This +1 example should have high probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This +1 class example should have high probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 13.123;
sample(1) = 9.3545;
cout << "This -1 example should have low probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This -1 class example should have low probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 13.123;
sample(1) = 0;
cout << "This -1 example should have low probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This -1 class example should have low probability. Its probability is: "
<< learned_pfunct(sample) << endl;

View File

@ -154,19 +154,19 @@ int main()
sample(0) = 3.123;
sample(1) = 2;
cout << "This sample should be >= 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a +1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 3.123;
sample(1) = 9.3545;
cout << "This sample should be >= 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a +1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 13.123;
sample(1) = 9.3545;
cout << "This sample should be < 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a -1 class example, the classifier output is " << learned_function(sample) << endl;
sample(0) = 13.123;
sample(1) = 0;
cout << "This sample should be < 0 and it is classified as a " << learned_function(sample) << endl;
cout << "This is a -1 class example, the classifier output is " << learned_function(sample) << endl;
// We can also train a decision function that reports a well conditioned probability
@ -187,19 +187,23 @@ int main()
sample(0) = 3.123;
sample(1) = 2;
cout << "This +1 example should have high probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This +1 class example should have high probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 3.123;
sample(1) = 9.3545;
cout << "This +1 example should have high probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This +1 class example should have high probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 13.123;
sample(1) = 9.3545;
cout << "This -1 example should have low probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This -1 class example should have low probability. Its probability is: "
<< learned_pfunct(sample) << endl;
sample(0) = 13.123;
sample(1) = 0;
cout << "This -1 example should have low probability. Its probability is: " << learned_pfunct(sample) << endl;
cout << "This -1 class example should have low probability. Its probability is: "
<< learned_pfunct(sample) << endl;