DS Wannabe之5-AM Project: DS 30day int prep day9

Q1: How would you define Machine Learning? 

Machine learning: It is an application of artificial intelligence (AI) that provides systems the ability to learn automatically and to improve from experiences without being programmed. It focuses on the development of computer applications that can access the data and used it to learn for themselves.

The process of learning starts with the observations or data, such as examples, direct experience, or instruction, to look for the patterns in data and to make better decisions in the future based on examples that we provide. The primary aim is to allow the computers to learn automatically without human intervention or assistance and adjust actions accordingly.DS Wannabe之5-AM Project: DS 30day int prep day9_第1张图片

Q2. What is a labeled training set? 

Machine learning is derived from the availability of the labeled data in the form of a training set and test set that is used by the learning algorithm. The separation of data into the training portion and a test portion is the way the algorithm learns.

We split up the data containing known response variable values into two pieces.

The training set is used to train the algorithm, and then you use the trained model on the test set to predict the variable response values that are already known.

The final step is to compare with the predicted responses against actual (observed) responses to see how close they are. The difference is the test error metric. Depending on the test error, you can go back to refine the model and repeat the process until you’re satisfied with the accuracy.

Q3. What are the two common supervised tasks? 

The two common supervised tasks are regression and classification.

Regression

The regression problem is when the output variable is the real or continuous value, such as “salary” or “weight.” Many different models can be used, and the simplest is linear regression. It tries to fit the data with the best hyper-plane, which goes through the points.

DS Wannabe之5-AM Project: DS 30day int prep day9_第2张图片

Classification

It is the type of supervised learning. It specifies the class to which the data elements belong to and is best used when the output has finite and discrete values. It predicts a class for an input variable, as well.

DS Wannabe之5-AM Project: DS 30day int prep day9_第3张图片

Q4. Can you name four common unsupervised tasks? 

Clustering

It is a Machine Learning technique that involves the grouping of the data points. Given a set of data points, and we can use a clustering algorithm to classify each data point into the specific group. In theory, data points that lie in the same group should have similar properties and/ or features, and data points in the different groups should have high dissimilar properties and/or features. Clustering is the method of unsupervised learning and is a common technique for statistical data analysis used in many fields.

Visualization

Data visualization is the technique that uses an array of static and interactive visuals within the specific context to help people to understand and make sense of the large amounts of data. The data is often displayed in the story format that visualizes patterns, trends, and correlations that may go otherwise unnoticed. It is regularly used as an avenue to monetize data as the product. An example of using monetization and data visualization is Uber. The app combines visualization with real-time data so that customers can request a ride.

Q5. What type of Machine Learning algorithm we use to allow a robot to walk in various unknown terrains?

Reinforcement Learning is likely to perform the best if we want a robot to learn how to walk in the various unknown terrains since this is typically the type of problem that the reinforcement learning tackles. It may be possible to express the problem as a supervised or semisupervised learning problem, but it would be less natural.

Reinforcement Learning

It’s about to take suitable actions to maximize rewards in a particular situation. It is employed by the various software and machines to find out the best possible behavior/path it should take in specific situations. Reinforcement learning is different from the supervised learning in a way that in supervised learning, training data has answer key with it so that the model is trained with the correct answer itself, but in reinforcement learning, there is no answer, and the reinforcement agent decides what to do to perform the given task. In the absence of the training dataset, it is bound to learn from its experience.

Q6. What type of algorithm would we use to segment your customers into multiple groups?

If we don’t know how to define the groups, then we can use the clustering algorithm (unsupervised learning) to segment our customers into clusters of similar customers. However, if we know what groups we would like to have, then we can feed many examples of each group to a classification algorithm (supervised learning), and it will classify all your customers into these groups.

Q7: What is an online machine learning? 

If we don’t know how to define the groups, then we can use the clustering algorithm (unsupervised learning) to segment our customers into clusters of similar customers. However, if we know what groups we would like to have, then we can feed many examples of each group to a classification algorithm (supervised learning), and it will classify all your customers into these groups. Online machine learning: It is a method of machine learning in which data becomes available in sequential order and to update our best predictor for the future data at each step, as opposed to batch learning techniques that generate the best predictor by learning on entire training data set at once. Online learning is a common technique and used in the areas of machine learning where it is computationally infeasible to train over the datasets, requiring the need for Out- of- Core algorithms. It is also used in situations where the algorithm must adapt to new patterns in the data dynamically or when the data itself is generated as the function of time, for example, stock  price prediction. Online learning algorithms might be prone to catastrophic interference and problem that can be addressed by the incremental learning approaches.DS Wannabe之5-AM Project: DS 30day int prep day9_第4张图片

Q8: What is out-of-core learning? 

Out-of-core: It refers to the processing data that is too large to fit into the computer’s main memory. Typically, when the dataset fits neatly into the computer’s main memory, randomly accessing sections of data has a (relatively) small performance penalty.

When data must be stored in a medium like a large spinning hard drive or an external computer network, it becomes very expensive to seek an arbitrary section of data randomly or to process the same data multiple times. In such a case, an out-of-core algorithm will try to access all the relevant data in a sequence.

However, modern computers have deep memory hierarchy, and replacing random access with the sequential access can increase the performance even on datasets that fit within memory.

OutOfCore学习指的是在数据集太大而无法完全存储在计算机主内存(RAM)中时,用于处理数据的技术和算法。这种情况在机器学习、数据挖掘和统计数据分析等领域的大型数据集中很常见。当数据集太大而无法适应RAM时,传统的内存处理方法变得不切实际或无法使用,导致需要OutOfCore算法。

这些算法旨在最小化对随机访问内存的依赖,而是通过直接从二级存储设备(如硬盘、SSD或分布式文件系统)读写数据来有效地处理数据。OutOfCore学习的关键挑战是以一种方式管理数据访问和计算,以最小化与二级存储相关的慢I/O操作的性能影响。

OutOfCore算法通常通过将数据集分解成可以一次加载到内存中的较小块来工作,然后处理这些块,并在必要时将它们写回磁盘。这种方法需要仔细管理数据流和处理,以确保系统不会被I/O操作淹没,并且有效地利用计算资源。

在大数据时代,OutOfCore处理的概念越来越重要,因为数据集可以轻松超过TB甚至PB的大小。OutOfCore学习技术允许在RAM有限的机器上分析大型数据集,通过利用二级存储的更大容量来实现,尽管在处理速度和复杂性方面有一些权衡。

除了处理大型数据集外,OutOfCore技术还可以为仍然适合于RAM的较小数据集提供性能优势,这得益于现代计算机深层内存层次结构。通过优化数据访问模式以使其更加顺序而非随机,OutOfCore算法可以减少内存访问时间,即使数据未超过主内存容量,也能实现更快的整体处理。

Q9. What is the Model Parameter? 

Model parameter: It is a configuration variable that is internal to a model and whose value can be

predicted from the data.

  • While making predictions, the model parameter is needed.

  • The values define the skill of a model on problems.

  • It is estimated or learned from data.

  • It is often not set manually by the practitioner.

  • It is often saved as part of the learned model.

Parameters are key to machine learning algorithms. They are part of the model that is learned from historical training data.

Q11. What is Model Hyperparameter? 

Model hyperparameter: It is a configuration that is external to a model and whose values cannot

be estimated from the data.

  • It is often used in processes to help estimate model parameters.

  • The practitioner often specifies them.

  • It can often be the set using heuristics.

  • It is tuned for the given predictive modeling problems error.

We cannot know the best value for the model hyperparameter on the given problem. We may use the rules of thumb, copy values used on other problems, or search for the best value by trial and error.

模型超参数是在训练机器学习模型之前需要指定的设置或配置。与模型参数不同,模型参数是在训练过程中从数据中学习得到的(如神经网络中的权重),而超参数是在学习过程之前设置的,并且对模型的行为和性能有重大影响。以下是有关超参数的一些关键点:

  1. 预训练配置:超参数在模型训练开始之前设置。它们不是从数据中学习得到的,而是用来指导学习过程的。

  2. 由实践者指定:机器学习实践者通常选择并指定超参数。这可能基于经验、领域知识或实验结果。

  3. 启发式设置:超参数通常使用启发式方法、经验法则或试错法设置。并不总是存在适用于所有超参数的固定值,它们可能需要根据数据的特定特性或手头任务进行调整。

  4. 调优优化:超参数调优是搜索最佳超参数集的过程,以便在给定任务上获得最佳的模型性能。这可以通过各种搜索策略完成,如网格搜索、随机搜索或更复杂的方法,如贝叶斯优化。

  5. 示例:常见的超参数示例包括梯度下降中的学习率、神经网络中的隐藏层和神经元数量、回归模型中的正则化项,以及随机森林等集成模型中的树的数量或树的深度。

超参数调优是机器学习工作流中的关键步骤,因为它可以显著提高模型性能。然而,它也可能是计算密集型和耗时的,特别是对于具有大量超参数或复杂搜索空间的模型。

Q12. What is cross-validation? 

Cross-validation: It is a technique for evaluating Machine Learning models by training several Machine Learning models on subsets of available input data and evaluating them on the complementary subset of data. Use cross-validation to detect overfitting, i.e., failing to generalize a pattern.

There are three steps involved in cross-validation are as follows :

  • Reserve some portion of the sample dataset.
  • Using the rest dataset and train models.
  • Test the model using a reserve portion of the data-set.

你可能感兴趣的:(Data,Science,Machine,Learning,人工智能,python,机器学习,学习,笔记,面试)