官术网_书友最值得收藏!

Model training and testing loop

Once we have our training data in a form that is suitable for our model, we can proceed with the model's training and testing phase. During this phase, we are primarily concerned with model selection. This can refer to choosing the best modeling approach for our task, or the best parameter settings for a given model. In fact, the term model selection often refers to both of these processes, as, in many cases, we might wish to try out various models and select the best performing model (with the best performing parameter settings for each model). It is also common to explore the application of combinations of different models (known as ensemble methods) in this phase.

This is typically a fairly straightforward process of running our chosen model on our training dataset and testing its performance on a test dataset (that is, a set of data that is held out for the evaluation of the model that the model has not seen in the training phase). This process is referred to as cross-validation.

Sometimes, the model tends to overfit or doesn't converge fully depending on the type of the dataset and the number of Iterations used.

Using Ensemble methods such as Gradient Boosted Trees and Random forest are techniques used in ML and Spark to avoid overfitting.

However, due to the large scale of data we are typically working with, it is often useful to carry out this initial train-test loop on a smaller representative sample of our full dataset or perform model selection using parallel methods where possible.

For this part of the pipeline, Spark's built-in machine learning library, MLlib, is a perfect fit. We will focus most of our attention in this book on the model training, evaluation, and cross-validation steps for various machine learning techniques, using MLlib and Spark's core features.

主站蜘蛛池模板: 酒泉市| 漳浦县| 临夏市| 湟中县| 久治县| 克什克腾旗| 略阳县| 崇文区| 黑龙江省| 工布江达县| 滦南县| 裕民县| 大邑县| 成武县| 固镇县| 木兰县| 大足县| 称多县| 清新县| 蚌埠市| 合水县| 崇义县| 潞城市| 纳雍县| 沭阳县| 若羌县| 定远县| 镇沅| 古丈县| 武邑县| 仙游县| 大姚县| 株洲县| 阿荣旗| 秭归县| 宾川县| 竹北市| 广水市| 岑巩县| 鄂伦春自治旗| 承德市|