未验证 提交 e5a19232 编写于 作者: P PyCaret 提交者: GitHub

Add files via upload

上级 c238c39e
......@@ -55,8 +55,8 @@
"`enable_colab()`\n",
"\n",
"## 1.4 See also:\n",
"- __[Regression Tutorial (REG102) - Intermediate Level](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG102)%20-%20Level%20Intermediate.ipynb)__\n",
"- __[Regression Tutorial (REG103) - Expert Level](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG103)%20-%20Level%20Expert.ipynb)__\n"
"- __[Regression Tutorial (REG102) - Intermediate Level](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Intermediate%20-%20REG102.ipynb)__\n",
"- __[Regression Tutorial (REG103) - Expert Level](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Expert%20-%20REG103.ipynb)__\n"
]
},
{
......@@ -1859,13 +1859,6 @@
"Notice that Mean score of all models matches with the score printed in `compare_models()`. This is because the metrics printed in `compare_models()` score grid are average score of CV folds. Similar to `compare_models()`, if you want to change the fold parameter from default value of 10 to a different value then you can use fold parameter, For Example: `create_model('dt', fold = 5)` to create Decision Tree using 5 fold cross validation."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -2450,13 +2443,6 @@
"Although metrics alone are not the only criteria you should consider when finalizing the best model for production. There are few other factors to consider such as training time, standard deviation of kfolds etc. As you progress through the tutorial, we have discussed those factors in detail in Intermediate and Expert levels. For the remaining part of tutorial, we will use Tuned Light Gradient Boosting Machine stored in `tuned_lightgbm` variable."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"___"
]
},
{
"cell_type": "markdown",
"metadata": {},
......@@ -3183,7 +3169,7 @@
"\n",
"In this tutorial, we have only covered basics of `pycaret.regression`. In the following tutorials, we will go deeper into advance pre-processing techniques that allows you to fully customize your machine learning pipeline, ensembling and generalized stacking and other advance techniques that are must to know for any data scientist. \n",
"\n",
"See you at the next tutorial. Follow the link to __[Regression Tutorial (REG102) - Level Intermediate](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG102)%20-%20Level%20Intermediate.ipynb)__"
"See you at the next tutorial. Follow the link to __[Regression Tutorial (REG102) - Level Intermediate](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Intermediate%20-%20REG102.ipynb)__"
]
}
],
......
......@@ -18,8 +18,8 @@
"We are currently working on this tutorial. Please check back soon! \n",
"\n",
"### In the mean time, you can see: \n",
"- __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__\n",
"- __[Regression Tutorial (REG102) - Level Intermediate](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG102)%20-%20Level%20Intermediate.ipynb)__"
"- __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__\n",
"- __[Regression Tutorial (REG102) - Level Intermediate](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Intermediate%20-%20REG102.ipynb)__"
]
}
],
......
......@@ -14,7 +14,7 @@
"**Date Updated: Feb 25, 2020**\n",
"\n",
"# 1.0 Objective of Tutorial\n",
"Welcome to Regression Tutorial (REG102). This tutorial assumes that you have completed __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__. If you haven't used PyCaret before and this is your first tutorial, we strongly recommend you to go back and progress through the beginner's tutorial to understand basics of working in PyCaret.\n",
"Welcome to Regression Tutorial (REG102). This tutorial assumes that you have completed __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__. If you haven't used PyCaret before and this is your first tutorial, we strongly recommend you to go back and progress through the beginner's tutorial to understand basics of working in PyCaret.\n",
"\n",
"In this tutorial using `pycaret.regression` module we will learn:\n",
"\n",
......@@ -31,7 +31,7 @@
"\n",
"\n",
"## 1.1 Installing PyCaret\n",
"If you haven't installed PyCaret yet. Please follow the link to __[Beginner's Tutorial](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__ for instruction on how to install pycaret.\n",
"If you haven't installed PyCaret yet. Please follow the link to __[Beginner's Tutorial](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ for instruction on how to install pycaret.\n",
"\n",
"## 1.2 Pre-Requisites\n",
"- Python 3.x\n",
......@@ -46,8 +46,8 @@
"`enable_colab()`\n",
"\n",
"## 1.4 See also:\n",
"- __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__\n",
"- __[Regression Tutorial (REG103) - Level Expert](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG103)%20-%20Level%20Expert.ipynb)__"
"- __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__\n",
"- __[Regression Tutorial (REG103) - Level Expert](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Expert%20-%20REG103.ipynb)__"
]
},
{
......@@ -83,7 +83,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For this tutorial we will be using the same dataset that was used in __[Regression Tutorial - Level Beginner (REG101)](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__.\n",
"For this tutorial we will be using the same dataset that was used in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__.\n",
"\n",
"#### Dataset Acknowledgements:\n",
"This case was prepared by Greg Mills (MBA ’07) under the supervision of Phillip E. Pfeifer, Alumni Research Professor of Business Administration. Copyright (c) 2007 by the University of Virginia Darden School Foundation, Charlottesville, VA. All rights reserved.\n",
......@@ -3422,7 +3422,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In the previous tutorial __[Regression - Level Beginner (#REG101)](https://www.github.com/pycaret/pcaret)__ we have learned how to initializes the environment in pycaret using `setup()`. You would remember that we have not passed any additional parameters in our last example as we didn't performed any pre-processing (other than those that are imperative for machine learning experiments and they are performed automatically by PyCaret). In this example we will take it to the next level by customizing the pre-processing pipeline using `setup()`. Let's see how to implement all the steps discussed in section 4 above."
"In __[previous tutorial](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ we have learned how to initializes the environment in pycaret using `setup()`. You would remember that we have not passed any additional parameters in our last example as we didn't performed any pre-processing (other than those that are imperative for machine learning experiments and they are performed automatically by PyCaret). In this example we will take it to the next level by customizing the pre-processing pipeline using `setup()`. Let's see how to implement all the steps discussed in section 4 above."
]
},
{
......@@ -3698,7 +3698,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that it's the same setup grid that was shown in __[Regression Tutorial - Level Beginner (#REG101)](https://www.github.com/pycaret/pcaret)__. The only difference here is the customization that we have performed in `setup()` is now appears as `True`. Also notice that `session_id` is `123` same as beginner's level, which means effect of randomization is completely isolated. Any improvements we see in this experiment is solely due to the pre-processing steps taken in `setup()` or any other modeling techniques we use in later sections of this tutorial."
"Note that it's the same setup grid that was shown in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__. The only difference here is the customization that we have performed in `setup()` is now appears as `True`. Also notice that `session_id` is `123` same as beginner's level, which means effect of randomization is completely isolated. Any improvements we see in this experiment is solely due to the pre-processing steps taken in `setup()` or any other modeling techniques we use in later sections of this tutorial."
]
},
{
......@@ -3712,7 +3712,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Similar to __[Regression Tutorial (REG101) - Level Beginner)](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__ we will also begin this tutorial with `compare_models()`. We will then compare the below results with the last experiment."
"Similar to __[Regression Tutorial (REG101) - Level Beginner)](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ we will also begin this tutorial with `compare_models()`. We will then compare the below results with the last experiment."
]
},
{
......@@ -4389,9 +4389,9 @@
"- Random Sample Consensus RMSLE improved from `0.4390` to `0.0956`\n",
"- Support Vector Machine RMSLE improved from `0.7137` to `0.0866`\n",
"\n",
"At this point, you should also note that while the transformations have improved performance for several linear algorithms it has also adversely effected the performance of tree based algorithms (to lesser extent). For example RMSLE of Random Forest has decreased to `0.0909` from `0.0818` in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__. It is important that you build the intuition as you go along in your machine learning journey, as to which pre-processing are likely to improve and effect different type of models.\n",
"At this point, you should also note that while the transformations have improved performance for several linear algorithms it has also adversely effected the performance of tree based algorithms (to lesser extent). For example RMSLE of Random Forest has decreased to `0.0909` from `0.0818` in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__. It is important that you build the intuition as you go along in your machine learning journey, as to which pre-processing are likely to improve and effect different type of models.\n",
"\n",
"To see results for all the models from previous tutorial refer to Section 7 in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__."
"To see results for all the models from previous tutorial refer to Section 7 in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__."
]
},
{
......@@ -4405,7 +4405,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In previous tutorial __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__ we have learned how to create a model using `create_model()` function. Now we will learn about few other parameters in `create_model()` that may come handy sometimes. In this section of the tutorial, we will create all models using 5 fold cross validation, notice how `fold` parameter is passed inside `create_model()` to achieve this."
"In previous tutorial __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ we have learned how to create a model using `create_model()` function. Now we will learn about few other parameters in `create_model()` that may come handy sometimes. In this section of the tutorial, we will create all models using 5 fold cross validation, notice how `fold` parameter is passed inside `create_model()` to achieve this."
]
},
{
......@@ -4682,7 +4682,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In previous tutorial __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__ we have learned how to automatically tune hyperparameters of a model using pre-defined grids. In this tutorial we will introduce the use of `n_iter` parameter in `tune_model()`. `n_iter` parameter is the number of iterations within the random grid search. For every iteration, the model randomly selects one value from the pre-defined grid of hyperparameters. By default, the parameter is set to `10` which means there would be maximum of 10 iterations to find the best value of hyperparameters. Increasing the value may improve the performance but will also increase the training time. See the example below:"
"In previous tutorial __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ we have learned how to automatically tune hyperparameters of a model using pre-defined grids. In this tutorial we will introduce the use of `n_iter` parameter in `tune_model()`. `n_iter` parameter is the number of iterations within the random grid search. For every iteration, the model randomly selects one value from the pre-defined grid of hyperparameters. By default, the parameter is set to `10` which means there would be maximum of 10 iterations to find the best value of hyperparameters. Increasing the value may improve the performance but will also increase the training time. See the example below:"
]
},
{
......@@ -7130,7 +7130,7 @@
"source": [
"In section 10.4 above we have discussed that stacking is less commonly implemented technique of ensembling due to practical difficulties. To understand this more Let's imagine a scenario that the model deployed in production is stacking ensembler of 4 models plus a meta model (similar to `stack_1` created in section 10.4 above). To generate a prediction on unseen dataset, every data point has to be predicted by all the 4 models of stacking ensembler and then all these prediction has to pass through meta-model to generate a final prediction. As the size of your stacking ensembler increases, it becomes code intensive and hard to maintain and use in production.\n",
"\n",
"In __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__ we have seen how to use a trained model to generate prediction on test / hold-out or unseen dataset. In this example we will see it is no different to generate predictions using stacking ensembler in PyCaret. For the purpose of illustration, we will use `stack_1` created in section 10.4 above for remaining part of this tutorial."
"In __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ we have seen how to use a trained model to generate prediction on test / hold-out or unseen dataset. In this example we will see it is no different to generate predictions using stacking ensembler in PyCaret. For the purpose of illustration, we will use `stack_1` created in section 10.4 above for remaining part of this tutorial."
]
},
{
......@@ -7217,7 +7217,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__ we have learned the purpose of `finalize_model()` and how to do it. In this tutorial we will finalize stacking ensembler and it is no different than finalizing a single model."
"In __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ we have learned the purpose of `finalize_model()` and how to do it. In this tutorial we will finalize stacking ensembler and it is no different than finalizing a single model."
]
},
{
......@@ -7389,7 +7389,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__ we have learned how to save and load the model. In this experiment we will learn how to save the entire experiment including all the outputs and models we have built in this experiment. Saving experiment is as simple as saving model."
"In __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__ we have learned how to save and load the model. In this experiment we will learn how to save the entire experiment including all the outputs and models we have built in this experiment. Saving experiment is as simple as saving model."
]
},
{
......@@ -7866,11 +7866,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We have covered a lot of new concepts in this tutorial. Most importantly, we have seen how to use Exploratory Data Analysis in customizing the pipeline in `setup()` that has improved the results considerably comparing to what we have seen earlier in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG101)%20-%20Level%20Beginner.ipynb)__. We have also learned how to perform and tune ensembling in PyCaret.\n",
"We have covered a lot of new concepts in this tutorial. Most importantly, we have seen how to use Exploratory Data Analysis in customizing the pipeline in `setup()` that has improved the results considerably comparing to what we have seen earlier in __[Regression Tutorial (REG101) - Level Beginner](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Beginner%20-%20REG101.ipynb)__. We have also learned how to perform and tune ensembling in PyCaret.\n",
"\n",
"In this tutorial, we have covered many significant concepts and how to perform them using `pycaret.regression`. However, there are still few more things to go such as interpretating more complex tree based models using shapley values, advance ensembling techniques such as multiple layer stacknet and more in pre-processing pipelines. We will cover all this in our next and final tutorial of the `pycaret.regression` series. \n",
"\n",
"See you at the next tutorial. Follow the link to __[Regression Tutorial (REG103) - Level Expert](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20(REG103)%20-%20Level%20Expert.ipynb)__"
"See you at the next tutorial. Follow the link to __[Regression Tutorial (REG103) - Level Expert](https://github.com/pycaret/pycaret/blob/master/Tutorials/Regression%20Tutorial%20Level%20Expert%20-%20REG103.ipynb)__"
]
}
],
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册