Alec  Nikolaus

Alec Nikolaus

1604142600

Train a regression model using a decision tree

**Decision Trees **are a non-parametric supervised learning method, capable of finding complex nonlinear relationships in the data. They can perform both classification and regression tasks. But in this article, we only focus on decision trees with a regression task. For this, the equivalent Scikit-learn class is DecisionTreeRegressor.

We will start by discussing how to train, visualize and make predictions with Decision Trees for a regression task. We will also discuss how to regularize hyperparameters in decision trees. This will avoid the problem of overfitting. Finally, we will discuss some of the advantages and disadvantages of Decision Trees.

Code convention

We use the following code convention to import the necessary libraries and set the plot style.

%matplotlib inline

	import numpy as np
	import pandas as pd
	import seaborn as sns
	import matplotlib.pyplot as plt

	sns.set()

Target audience

I assume that you have a basic understanding of the terminology used in the decision tree and how it works behind the scenes. In this tutorial, more emphasis is given for the model hyperparameter tuning techniques such as k-fold cross-validation.

#scikit-learn #machine-learning #decision-tree-regressor #data-science

What is GEEK

Buddha Community

Train a regression model using a decision tree

Decision Tree -Classification

Decision Tree is one of the most widely used machine learning algorithm. It is a supervised learning algorithm that can perform both classification and regression operations.

As the name suggest, it uses a tree like structure to make decisions on the given dataset. Each internal node of the tree represent a “decision” taken by the model based on any of our attributes. From this decision, we can seperate classes or predict values.

Let’s look at both classification and regression operations one by one.

Classification

In Classification, each leaf node of our decision tree represents a **class **based on the decisions we make on attributes at internal nodes.

To understand it more properly let us look at an example. I have used the Iris Flower Dataset from sklearn library. You can refer the complete code on Github — Here.

Image for post

A node’s samples attribute counts how many training instances it applies to. For example, 100 training instances have a petal width ≤ 2.45 cm .

A node’s value attribute tells you how many training instances of each class this node applies to. For example, the bottom-right node applies to 0 Iris-Setosa, 0 Iris- Versicolor, and 43 Iris-Virginica.

And a node’s gini attribute measures its impurity: a node is “pure” (gini=0) if all training instances it applies to belong to the same class. For example, since the depth-1 left node applies only to Iris-Setosa training instances, it is pure and its gini score is 0.

Image for post

Gini Impurity Formula

where, pⱼ is the ratio of instances of class j among all training instances at that node.

Based on the decisions made at each internal node, we can sketch decision boundaries to visualize the model.

Image for post

But how do we find these boundaries ?

We use Classification And Regression Tree (CART) to find these boundaries.

CART is a simple algorithm that finds an attribute _k _and a threshold _t_ₖat which we get a purest subset. Purest subset means that either of the subsets contain maximum proportion of one particular class. For example, left node at depth-2 has maximum proportion of Iris-Versicolor class i.e 49 of 54. In the _CART cost function, _we split the training set in such a way that we get minimum gini impurity.The CART cost function is given as:

Image for post

After successfully splitting the dataset into two, we repeat the process on either sides of the tree.

We can directly implement Decision tree with the help of Scikit learn library. It has a class called DecisionTreeClassifier which trains the model for us directly and we can adjust the hyperparameters as per our requirements.

Image for post

#machine-learning #decision-tree #decision-tree-classifier #decision-tree-regressor #deep learning

Alec  Nikolaus

Alec Nikolaus

1604142600

Train a regression model using a decision tree

**Decision Trees **are a non-parametric supervised learning method, capable of finding complex nonlinear relationships in the data. They can perform both classification and regression tasks. But in this article, we only focus on decision trees with a regression task. For this, the equivalent Scikit-learn class is DecisionTreeRegressor.

We will start by discussing how to train, visualize and make predictions with Decision Trees for a regression task. We will also discuss how to regularize hyperparameters in decision trees. This will avoid the problem of overfitting. Finally, we will discuss some of the advantages and disadvantages of Decision Trees.

Code convention

We use the following code convention to import the necessary libraries and set the plot style.

%matplotlib inline

	import numpy as np
	import pandas as pd
	import seaborn as sns
	import matplotlib.pyplot as plt

	sns.set()

Target audience

I assume that you have a basic understanding of the terminology used in the decision tree and how it works behind the scenes. In this tutorial, more emphasis is given for the model hyperparameter tuning techniques such as k-fold cross-validation.

#scikit-learn #machine-learning #decision-tree-regressor #data-science

Why Use WordPress? What Can You Do With WordPress?

Can you use WordPress for anything other than blogging? To your surprise, yes. WordPress is more than just a blogging tool, and it has helped thousands of websites and web applications to thrive. The use of WordPress powers around 40% of online projects, and today in our blog, we would visit some amazing uses of WordPress other than blogging.
What Is The Use Of WordPress?

WordPress is the most popular website platform in the world. It is the first choice of businesses that want to set a feature-rich and dynamic Content Management System. So, if you ask what WordPress is used for, the answer is – everything. It is a super-flexible, feature-rich and secure platform that offers everything to build unique websites and applications. Let’s start knowing them:

1. Multiple Websites Under A Single Installation
WordPress Multisite allows you to develop multiple sites from a single WordPress installation. You can download WordPress and start building websites you want to launch under a single server. Literally speaking, you can handle hundreds of sites from one single dashboard, which now needs applause.
It is a highly efficient platform that allows you to easily run several websites under the same login credentials. One of the best things about WordPress is the themes it has to offer. You can simply download them and plugin for various sites and save space on sites without losing their speed.

2. WordPress Social Network
WordPress can be used for high-end projects such as Social Media Network. If you don’t have the money and patience to hire a coder and invest months in building a feature-rich social media site, go for WordPress. It is one of the most amazing uses of WordPress. Its stunning CMS is unbeatable. And you can build sites as good as Facebook or Reddit etc. It can just make the process a lot easier.
To set up a social media network, you would have to download a WordPress Plugin called BuddyPress. It would allow you to connect a community page with ease and would provide all the necessary features of a community or social media. It has direct messaging, activity stream, user groups, extended profiles, and so much more. You just have to download and configure it.
If BuddyPress doesn’t meet all your needs, don’t give up on your dreams. You can try out WP Symposium or PeepSo. There are also several themes you can use to build a social network.

3. Create A Forum For Your Brand’s Community
Communities are very important for your business. They help you stay in constant connection with your users and consumers. And allow you to turn them into a loyal customer base. Meanwhile, there are many good technologies that can be used for building a community page – the good old WordPress is still the best.
It is the best community development technology. If you want to build your online community, you need to consider all the amazing features you get with WordPress. Plugins such as BB Press is an open-source, template-driven PHP/ MySQL forum software. It is very simple and doesn’t hamper the experience of the website.
Other tools such as wpFoRo and Asgaros Forum are equally good for creating a community blog. They are lightweight tools that are easy to manage and integrate with your WordPress site easily. However, there is only one tiny problem; you need to have some technical knowledge to build a WordPress Community blog page.

4. Shortcodes
Since we gave you a problem in the previous section, we would also give you a perfect solution for it. You might not know to code, but you have shortcodes. Shortcodes help you execute functions without having to code. It is an easy way to build an amazing website, add new features, customize plugins easily. They are short lines of code, and rather than memorizing multiple lines; you can have zero technical knowledge and start building a feature-rich website or application.
There are also plugins like Shortcoder, Shortcodes Ultimate, and the Basics available on WordPress that can be used, and you would not even have to remember the shortcodes.

5. Build Online Stores
If you still think about why to use WordPress, use it to build an online store. You can start selling your goods online and start selling. It is an affordable technology that helps you build a feature-rich eCommerce store with WordPress.
WooCommerce is an extension of WordPress and is one of the most used eCommerce solutions. WooCommerce holds a 28% share of the global market and is one of the best ways to set up an online store. It allows you to build user-friendly and professional online stores and has thousands of free and paid extensions. Moreover as an open-source platform, and you don’t have to pay for the license.
Apart from WooCommerce, there are Easy Digital Downloads, iThemes Exchange, Shopify eCommerce plugin, and so much more available.

6. Security Features
WordPress takes security very seriously. It offers tons of external solutions that help you in safeguarding your WordPress site. While there is no way to ensure 100% security, it provides regular updates with security patches and provides several plugins to help with backups, two-factor authorization, and more.
By choosing hosting providers like WP Engine, you can improve the security of the website. It helps in threat detection, manage patching and updates, and internal security audits for the customers, and so much more.

Read More

#use of wordpress #use wordpress for business website #use wordpress for website #what is use of wordpress #why use wordpress #why use wordpress to build a website

Sowing the Seeds of Decision Tree Regression

Article 5 of Machine Learning Series

In this article we will discuss about decision trees, one of the supervised learning algorithm, commonly referred to as CART that can be used for both regression and classification problems.

As the name suggests, the primary role of this algorithm is to make a decision using a tree structure. To find solutions a decision tree makes a sequential, hierarchical decision about the outcome variable based on the predictor data. A decision tree is generally used while working with non-linear data.

Image for post

Because of their simplicity and the fact that they are easy to understand and implement, they are widely used in a large number of industries.

Getting Acquainted With Some New Terms

Now, before we move further it’s important that we understand some important terminologies associated with the algorithm. Decision Trees are made up of a number of nodes, each of which represents a particular feature. The first node of a decision tree is generally referred to as the Root Node.

Image for post

The depth of the tree is the total number of levels present in the tree excluding the root node. A branch denotes a decision and can be visualized as a link between different nodes. A leaf tells you what class each sample belongs to.

How Does The Decision Tree Work

Decision Trees progressively divide data sets into small data groups until they reach sets that are small enough to be described by some label. At the same time an associated decision tree is incrementally developed.

Decision trees apply a top-down approach to data. The splitting of a binary tree can either be binary or multiway. The algorithm partitions the data into a set of rectangles and fits the model over each of these rectangles. More the number of rectangles (splits) greater is the complexity.

Image for post

A downside of using super complex decision tree is that they are likely of fall into overfitting scenario as the model learns the training data so good that it has problems to generalize to new unseen data.

It then examines all the features of the dataset to find the best possible result by splitting the data into smaller and smaller subgroups until the tree concludes.

#supervised-learning #regression #entropy #machine-learning #decision-tree #deep learning

Shreya kapoor

Shreya kapoor

1604946745

200 hour Yoga Teacher Training Course in Ghaziabad, India | Divyaa Yoga Institute

Yoga gives peace to the body and mind that helps in living a healthy & happy life. It comes with a lot of benefits for both mental and physical health. Meditation and Yoga can cure many diseases and after seeing the results across the world, people are getting more into meditation and yoga. Many of them are trying to motivate others for shifting towards yoga by saving a little bit of time from daily routine. It’s not a bad idea to start a carrier in yoga as a yoga trainer, teacher, consultant or Therapist. If you are interested in it and doing it for a longer period.

Divyaa yoga institute launched 200 yoga teacher training certification courses in Ghaziabad and come up as a world-class professional yoga institute in Delhi NCR for the people who love yoga and ready to make a carrier in it. This is the best yoga teacher training institute in India that provides group yoga classes, yoga certification courses, yoga workshops, and provides many other courses that can help in gaining professional knowledge.

200 hour yoga teacher training course in India facilitates a professional syllabus that starts from basic and goes to the advanced level. They provide personal female/ male yoga trainer to the students according to their requirements.

200 hour yoga teacher training course syllabus includes mantra chanting. It releases positive energy from your mind that helps in decreasing negative thoughts. The study of asana is one of the most important points in the syllabus. Their trainers take care of the proper posture and body alignment so that the risk of injury can be reduced.

When teachers teach, they want to be sure that every student is getting things properly. We provide personal yoga trainer on demand to balance the comfortability while doing yoga practice. When you will invest in yoga, it will make your life smoother and happier forever. Taking yoga as your carrier is an excellent option because in this journey you will give knowledge of being healthy, happy, and calm to others. You will feel great when you will be the reason for the happiness of thousands of people who come to you in search of stability and calmness in their life.

For beginners, it is very important to do pose carefully to avoid injury. Their trainers use props at early stages so that beginners can improve after a few days. Improvisation plays a crucial role and at Divyaa yoga institute, professional teachers take care of every little thing so that every single person gets satisfaction in terms of peace, happiness, and whatever their goal is after adding meditation and yoga to their life schedule.

On the launch of 200 hour yoga teacher training course, the owner of Divyaa yoga institute said that “Yoga is an ancient practice and meditation that is now on everyone’s tongue. People are getting familiar with yoga because of positive results all across the world. Yoga is come up as a treatment for heart and other health issues. We are trying to encourage people, to give your mind and body relaxation from the stress and tension that they have filled up in their life because of pressure and duties.”

He further adds about the course “We are offering 200 hour yoga teacher training course for the people who have an interest or have some experience in the yoga profession. Now, you can convert your interest into a profession by opting for our professional yoga courses in India. We have experienced professional yoga trainers at our institute from across the world and sharing their experience with the people who are willing or trying to join yoga for the rest of their life.”

About Divyaa yoga institute
Divyaa yoga institute is a leading international yoga school in Ghaziabad, that provides several yoga programs that include yoga workshops, group yoga classes, corporate yoga classes, private yoga classes, and stress management & spiritual classes in Ghaziabad.

If you are interested in yoga whether you have experience or not and want to take yoga as your profession then Divyaa yoga institute is the right place for your goal. They will give shape to your interest and develop your yoga skills in order to make you a professional yoga trainer. They offer courses like yoga for better living certification courses of 21 days, meditation certificate course, and 200 hour yoga teacher training course that we have talked about above. Join today if you have a spark in you, they will show you the path to a better life in yoga.

#200 hour yoga teacher training #200 hour yoga teacher training in ghaziabad #200 hour yoga teacher training in india #yoga teacher training course #yoga teacher training courses #teacher training courses