-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.cpp
More file actions
53 lines (47 loc) · 1.39 KB
/
Main.cpp
File metadata and controls
53 lines (47 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//CODE written by Shouvik Chatterjee
//Header Files
#include<iostream>
#include<conio.h>
using namespace std;
//Main function
int main() {
//Heading
cout << " ----MACHINE LEARNING :: ---- "<<endl;
cout << "\n This Program calculates whether a number is LARGE or SMALL based on 10 datasets \n used in training - CODE by Techieshouvik\n";
//Variables
string a, b;
int inp,trained_data=1,i=1,n;
//Labels
a = "LARGE"; //Classification Label 1
b = "SMALL"; //Classification Label 2
cout << "\n***--TRAINING SESSION---[10 Gen Trainer]-***"<<endl;
//Loop 10 times
while (i <= 10) {
cout << "\n------------------------GEN :: " << i<<">>>>";
//Input DATA
cout << "\nEnter a number :: ";
cin >> inp;
cout << "\nIs it Large [1] / Small [0] :: ";
cin >> n;
//Define the Rule
if (inp >= trained_data) {
cout <<endl<<"AI says :: "<< a; //LARGE NUMBER
if (n == 0) {
trained_data++; //Tweaking
cout << " [Tweaked] ";
}
}
else {
cout <<endl<<"AI says :: "<< b; //SMALL NUMBER
if (n == 1) {
trained_data--; //Tweaking
cout << " [Tweaked] ";
}
}
i++; //COUNTER VARIABLE INCREMENT
}
cout << endl << "----------------------------------------";
cout << endl << "TRAINED DATA FINAL :: Anything above " << trained_data<<" is LARGE";
cout << endl << "----------------------------------------";
_getch();
}