Last active
June 20, 2021 07:04
-
-
Save shehab910/f6c7088075e7a549a8cc94c80538d0e2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <map> | |
#include <string> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
map<string,string> getAiMap(){ | |
map<string,string> m = { | |
{"Physical symbol system hypothesis","symbolism"}, | |
{" Neural network, connection mechanism","connectionism"}, | |
{"Cybernetics and perception-action control system","actionism"}, | |
{"AI is a technical science that studies and develops theories,","ai"}, | |
{"Machine learning specializes in how computers simulate or implement human learning behavior","machine learning"}, | |
{"Deep learning is developed based on the study of artificial neural networks (ANNs).","deep learning" }, | |
{"automatically and accurately transcribes human speeches.","speech signal processing"}, | |
{"deals with how computers can be made to identify objects, scenes, and activities from images","computer vision"}, | |
{"mainly involves knowledge acquisition and expression, natural language understanding, and natural language generation.","nlp"}, | |
{"the reuse of a pre-trained model on a new related problem","transfer learning"}, | |
{"It is the process of removing personally identifiable information from personal data, so that the people whom the data describes remain anonymous.","data anonymization"}, | |
{"There are static knowledge and dynamic knowledge","knowledge"}, | |
{"A theoretical or practical understanding of a subject or a domain.","knowledge"}, | |
{"Skillful person who can do things other people cannot.","domain expert"}, | |
{"Deals with the development of intelligent information systems in which knowledge and reasoning play pivotal role.","knowledge engineering (ke)"}, | |
{"A developed filed at the intersection of computer science and management science deals with knowledge as a key source in modern organizations","knowledge management (km)"}, | |
{"Graphical representation that represent semantic relations between concepts.","semantic network"}, | |
{"is computer program that emulates the decision making capability of a human expert.","expert system"}, | |
{"contains five members: the domain expert, the knowledge engineer, the programmer, the project manager and the end-user","expert system development team"}, | |
{"someone who is capable of designing, building and testing an expert system.","knowledge engineer"}, | |
{"enable the user to ask the expert system how a particular conclusion is reached and why a specific fact is needed. An expert system must be able to explain its reasoning and justify its advice, analysis or conclusion.","explanation facilities"}, | |
{"The means of communication between a user seeking a solution to the problem and an expert system.","user interface"}, | |
{"A technique for gathering information and then inferring from it whatever can be inferred.","forward chaining"},{"goal-driven reasoning.","backward chaining"}, | |
{"The lack of the exact knowledge that would enable us to reach a perfectly reliable conclusion.","uncertainty"}, | |
{"permits only exact reasoning. It assumes that perfect knowledge always exists.","classical logic"}, | |
{"is a mixture of knowledge and the control structure to process this knowledge.","conventional program"}, | |
{"(including deep learning) is a study of learning algorithms.","machine learning"}, | |
{"A computer program needs to specify which of the k categories some input belongs to.","classification"}, | |
{"A computer program predicts the output for the given input.","regression"}, | |
{"A large amount of data from an unlabeled dataset is divided into multiple categories according to internal similarity of the data.","clustering"}, | |
{"Obtain an optimal model with required performance through training and learning based on the samples of known categories *e.g. Classification & regression*","supervised learning"}, | |
{"For unlabeled samples, the learning algorithms directly model the input datasets. *e.g. Clustering*","unsupervised learning"}, | |
{"A machine learning model that automatically uses a large amount of unlabeled data to assist learning directly of a small amount of labeled data.","semisupervised learning"}, | |
{"It is an area of machine learning concerned with how agents ought to take actions in an environment to maximize some notion of cumulative reward.","reinforcement learning"}, | |
{"A collection of data used in machine learning tasks.","dataset"}, | |
{"A dataset used in the training process, where each sample is referred to as a training sample.","training set"},{"Testing refers to the process of using the model obtained after learning for prediction.","test set"}, | |
{"Fill in missing values and detect and eliminate causes of dataset exceptions.","data cleansing"}, | |
{"Simplify data attributes to avoid dimension explosion.","data dimension reduction"}, | |
{"Normalize data to reduce noise and improve model accuracy.","data normalization"}, | |
{"Are independent of the model during feature selection.","filter methods"}, | |
{"Use a prediction model to score feature subsets.","wrapper methods"}, | |
{"Consider feature selection as a part of model construction.","embedded methods"}, | |
{"The goal of machine learning is that the model obtained","after learning should perform well on new samples"}, | |
{"The goal of machine learning is that the model obtained after learning should perform well on new samples","generalization capability"}, | |
{"difference between the sample result predicted by the model obtained after learning and the actual sample result.","error"}, | |
{"error that you get when you run the model on the training data.","training error"}, | |
{"error that you get when you run the model on new samples. Obviously, we prefer a model with a smaller generalization error.","generalization error"}, | |
{"occurs when the model or the algorithm does not fit the data well enough.","occurs when the model or the algorithm does not fit the data well enough."}, | |
{"occurs when the training error of the model obtained after learning is small but the generalization error is large (poor generalization capability)","overfitting"}, | |
{"Model's capability of fitting functions, which is also called model complexity","model capacity"}, | |
{"Offset of the prediction result from the average value","variance"}, | |
{"Difference between the expected (or average) prediction value and the correct value we are trying to predict.","bias"}, | |
{"Uses all training samples for training each time.","bgd"}, | |
{"Uses one training sample for training each time.","sgd"}, | |
{"Uses a certain number of training samples for training each time.","mbgd"}, | |
{"It is a statistical analysis method used to validate the performance of a classifier","cross validation"}, | |
{"A statistical analysis method to determine the quantitative relationships between two or more variables through regression analysis in mathematical statistics","linear regression"}, | |
{"The logistic regression model is used to solve classification problems.","logistic regression"}, | |
{"is a tree structure (a binary tree or a non-binary tree). Each non-leaf node represents a test on a feature attribute.","decision tree"}, | |
{"Select a feature from the features of the training data as the split standard of the current node","feature selection"}, | |
{"Generate internal node upside down based on the selected features and stop until the dataset can no longer be split.","decision tree generation"}, | |
{"The decision tree may easily become overfitting unless necessary pruning (including pre-pruning and postpruning) is performed to reduce the tree size and optimize its node structure.","pruning"}, | |
{"is a theoretically mature method and one of the simplest machine learning algorithms.","knn classification algorithm"}, | |
{"a simple multi-class classification algorithm based on the Bayes theorem.","naive bayes algorithm"}, | |
{"is a type of boosting algorithm.","gbdt"} | |
}; | |
return m; | |
} | |
void prepMap(){ | |
string q,a; | |
vector<string> qarr; | |
vector<string> aarr; | |
while(q != "exit"){ | |
cout<<"Enter Question: \n"; | |
getline(cin, q); | |
if(q == "exit") break; | |
cout<<"Enter Answer:\n"; | |
getline(cin,a); | |
std::for_each(a.begin(), a.end(), [](char & c) { | |
c = ::tolower(c); | |
}); | |
aarr.push_back(a); | |
qarr.push_back(q); | |
cout<<"Enter 'exit' in Question to exit\n"; | |
} | |
for (int i = 0; i < qarr.size(); i++) | |
{ | |
cout<<"{"<<"\""<<qarr[i]<<"\""<<","<<"\""<<aarr[i]<<"\""<<"},"<<endl; | |
} | |
} | |
void quiz(map<string,string> q){ | |
map<string,string> :: iterator it; | |
vector<string> questions; | |
for(it=q.begin(); it != q.end(); it++){ | |
questions.push_back(it->first); | |
} | |
string a; | |
for (int i = 0; i < questions.size(); i++) | |
{ | |
cout<<questions[i]<<endl<<"Answer: "; | |
getline(cin, a); | |
if(a == "exit") break; | |
else if(a == q[questions[i]]){ | |
cout<<"true.\t"; | |
} else cout<<"false.\t"; | |
cout<<"The correct answer is: "<<q[questions[i]]<<endl<<endl; | |
} | |
} | |
int main(){ | |
//prepMap(); | |
quiz(getAiMap()); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment