Agnes  Sauer

Agnes Sauer

1595995680

Email Spam Classifier Using Naive Bayes

If Any of you want to know about the Basic of Machine Learning . I have Written a post on this topic in a very very Simple Language with real World Example, and with easy explanation about all the term and classification .After reading my Post you can answer anyone about the Basic of Machine Learning.

Here is the Link below :-


Image for post

A Little Introduction About the Project:-

These Informations are Gathered from Different Sources:-

Spam Email , become a big trouble over the internet. Spam is waste of time, storage space and communication bandwidth. The problem of spam e-mail has been increasing for years. In recent statistics, 40% of all emails are spam which about 15.4 billion email per day and that cost internet users about $355 million per year. Knowledge engineering and machine learning are the two general approaches used in e-mail filtering. In knowledge engineering approach a set of rules has to be specified according to which emails are categorized as spam or ham.

Machine learning approach is more efficient than knowledge engineering approach; it does not require specifying any rules . Instead, a set of training samples, these samples is a set of pre classified e-mail messages. A specific algorithm is then used to learn the classification rules from these e-mail messages. Machine learning approach has been widely studied and there are lots of algorithms can be used in e-mail filtering. They include Naive Bayes, support vector machines, Neural Networks, K-nearest neighbour, Rough sets and the artificial immune system.


Why We Using Naive Bayes as an Algorithms for Filtering the Email:-

Naive Bayes work on dependent events and the probability of an event occurring in the future that can be detected from the previous occurring of the same event . This technique can be used to classify spam e-mails, words probabilities play the main rule here. If some words occur often in spam but not in ham, then this incoming e-mail is probably spam. Naive Bayes classifier technique has become a very popular method in mail filtering Email. Every word has certain probability of occurring in spam or ham email in its database. If the total of words probabilities exceeds a certain limit, the filter will mark the e-mail to either category. Here, only two categories are necessary: spam or ham.

Here are Some Calculation Which help you to Understand how it work.

The statistic we are mostly interested for a token T is its spamminess (spam rating), calculated as follows:-

Where CSpam(T) and CHam(T) are the number of spam or ham messages containing token T, respectively.

Where CSpam(T) and CHam(T) are the number of spam or ham messages containing token T, respectively. To calculate the possibility for a message M with tokens {T1,……,TN}, one needs to combine the individual token’s spamminess to evaluate the overall message spamminess. A simple way to make classifications is to calculate the product of individual token’s spamminess and compare it with the product of individual token’s hamminess

(H [M] = Π ( 1- S [T ]))

The message is considered spam if the overall spamminess product S[M] is larger than the hamminess product H[M].


All the Machine Learning Algorithms works on two stages:-

  1. Training Stage.
  2. Testing Stage.

So In the Training Stage Naive Bayes create a Lookup table in which they store all the possibility of probability which we are going to use in the Algorithm for predicting the result.

And In the testing phase let Suppose you have given a test point to the algorithm to predict the result , they fetch the values from the lookup table in which they store all the possibility of probability and use that value to predict the result .

Now Our Main Work on Email Spam Classifier Start:-

First of all I want to make you clear that we have a folder name “e-mail” in which we have about 5172 file and each file is one of the e-mail and on each e-mail they mentioned that particular e-mail is spam or ham.

Our first target is to make a list of all the word which are used in that 5172 Email. For this we have some step:

  1. Load the “e-mail” folder in Jupiter Notebook With the help of OS in which each file is one Email.
import os
folder='Desktop/e-mail/'
files=os.listdir(folder)
emails=[folder+file for file in files]
  1. Open each file with the help of f=open(e-mail)
  2. In this f=open (e-mail) if you have give one file in f=open() it open that file to read.
  3. Read the File.
  4. f.read() it read all the content of that email file and store in string format.
  5. Split the file with the spaces (“ “)and append in the list.
words=[]
for e-mail in e-mails:
 f=open(e-mail,encoding='latin-1')
 blob=f.read()
 words+=blob.split(" ")

In this time we have a list of Words in which we have all the words stored which are used in 5172 Email. But we don’t know which word occur how much time , for finding this we are going to import counter from collection ,this counter will give you the result that which word occur how much time

from collections import Counter

And pass the word list in counter it form a dictionary which show

which word occur how much time

#naive-bayes #machine-learning #email #deep learning

What is GEEK

Buddha Community

Email Spam Classifier Using Naive Bayes
Alec  Nikolaus

Alec Nikolaus

1596465840

The Ironic Sophistication of Naive Bayes Classifiers

Filtering spam with Multinomial Naive Bayes (From Scratch)

In the first half of 2020 more than 50% of all email traffic on the planet was spam. Spammers typically receive 1 reply for every 12,500,000 emails sent which doesn’t sound like much until you realize more than 15 billion spam emails are being sent each and every day. Spam is costing businesses 20–200 billion dollars per year and that number is only expected to grow.

Image for post

What can we do to save ourselves from spam???

Naive Bayes Classifiers

In probability theory and statistics, Bayes’ theorem (alternatively Bayes’s theoremBayes’s law or Bayes’s rule) describes the probability of an event, based on prior knowledge of conditions that might be related to the event.

For example, if the risk of developing health problems is known to increase with age, Bayes’s theorem allows the risk to an individual of a known age to be assessed more accurately than simply assuming that the individual is typical of the population as a whole.

Image for post

Bayes Theorem Explained

A Naive Bayes Classifier is a probabilistic classifier that uses Bayes theorem with strong independence (naive) assumptions between features.

  • Probabilistic classifier: a classifier that is able to predict, given an observation of an input, a probability distribution over a set of classes, rather than only outputting the most likely class that the observation should belong to.
  • Independence: Two events are **independent **if the occurrence of one does not affect the probability of occurrence of the other (equivalently, does not affect the odds). That assumption of independence of features is what makes Naive Bayes naive! In real world, the independence assumption is often violated, but naive Bayes classifiers still tend to perform very well.

#naive-bayes-classifier #python #naive-bayes #naive-bayes-from-scratch #naive-bayes-in-python

Agnes  Sauer

Agnes Sauer

1595995680

Email Spam Classifier Using Naive Bayes

If Any of you want to know about the Basic of Machine Learning . I have Written a post on this topic in a very very Simple Language with real World Example, and with easy explanation about all the term and classification .After reading my Post you can answer anyone about the Basic of Machine Learning.

Here is the Link below :-


Image for post

A Little Introduction About the Project:-

These Informations are Gathered from Different Sources:-

Spam Email , become a big trouble over the internet. Spam is waste of time, storage space and communication bandwidth. The problem of spam e-mail has been increasing for years. In recent statistics, 40% of all emails are spam which about 15.4 billion email per day and that cost internet users about $355 million per year. Knowledge engineering and machine learning are the two general approaches used in e-mail filtering. In knowledge engineering approach a set of rules has to be specified according to which emails are categorized as spam or ham.

Machine learning approach is more efficient than knowledge engineering approach; it does not require specifying any rules . Instead, a set of training samples, these samples is a set of pre classified e-mail messages. A specific algorithm is then used to learn the classification rules from these e-mail messages. Machine learning approach has been widely studied and there are lots of algorithms can be used in e-mail filtering. They include Naive Bayes, support vector machines, Neural Networks, K-nearest neighbour, Rough sets and the artificial immune system.


Why We Using Naive Bayes as an Algorithms for Filtering the Email:-

Naive Bayes work on dependent events and the probability of an event occurring in the future that can be detected from the previous occurring of the same event . This technique can be used to classify spam e-mails, words probabilities play the main rule here. If some words occur often in spam but not in ham, then this incoming e-mail is probably spam. Naive Bayes classifier technique has become a very popular method in mail filtering Email. Every word has certain probability of occurring in spam or ham email in its database. If the total of words probabilities exceeds a certain limit, the filter will mark the e-mail to either category. Here, only two categories are necessary: spam or ham.

Here are Some Calculation Which help you to Understand how it work.

The statistic we are mostly interested for a token T is its spamminess (spam rating), calculated as follows:-

Where CSpam(T) and CHam(T) are the number of spam or ham messages containing token T, respectively.

Where CSpam(T) and CHam(T) are the number of spam or ham messages containing token T, respectively. To calculate the possibility for a message M with tokens {T1,……,TN}, one needs to combine the individual token’s spamminess to evaluate the overall message spamminess. A simple way to make classifications is to calculate the product of individual token’s spamminess and compare it with the product of individual token’s hamminess

(H [M] = Π ( 1- S [T ]))

The message is considered spam if the overall spamminess product S[M] is larger than the hamminess product H[M].


All the Machine Learning Algorithms works on two stages:-

  1. Training Stage.
  2. Testing Stage.

So In the Training Stage Naive Bayes create a Lookup table in which they store all the possibility of probability which we are going to use in the Algorithm for predicting the result.

And In the testing phase let Suppose you have given a test point to the algorithm to predict the result , they fetch the values from the lookup table in which they store all the possibility of probability and use that value to predict the result .

Now Our Main Work on Email Spam Classifier Start:-

First of all I want to make you clear that we have a folder name “e-mail” in which we have about 5172 file and each file is one of the e-mail and on each e-mail they mentioned that particular e-mail is spam or ham.

Our first target is to make a list of all the word which are used in that 5172 Email. For this we have some step:

  1. Load the “e-mail” folder in Jupiter Notebook With the help of OS in which each file is one Email.
import os
folder='Desktop/e-mail/'
files=os.listdir(folder)
emails=[folder+file for file in files]
  1. Open each file with the help of f=open(e-mail)
  2. In this f=open (e-mail) if you have give one file in f=open() it open that file to read.
  3. Read the File.
  4. f.read() it read all the content of that email file and store in string format.
  5. Split the file with the spaces (“ “)and append in the list.
words=[]
for e-mail in e-mails:
 f=open(e-mail,encoding='latin-1')
 blob=f.read()
 words+=blob.split(" ")

In this time we have a list of Words in which we have all the words stored which are used in 5172 Email. But we don’t know which word occur how much time , for finding this we are going to import counter from collection ,this counter will give you the result that which word occur how much time

from collections import Counter

And pass the word list in counter it form a dictionary which show

which word occur how much time

#naive-bayes #machine-learning #email #deep learning

Hollie  Ratke

Hollie Ratke

1597626000

Best Practices for Running Your Own Email Server

Plesk Premium Email, powered by Kolab lets you become your own mail service provider in a few easy steps. It’s like creating a personal Gmail service, one that you control from top to bottom. Running the mail server allows you to store your own email, access the mail server’s logs, and access the raw email files in a user’s mailbox.

However, one key concern when running your own mail server is email deliverability. Without being able to effectively reach your customer base, you cannot do business. So, how do you ensure your emails do not end up as spam?

It’s important to follow common rules and best practices when operating a mail server to guarantee your emails always reach their destination. In this quick guide, we’ll walk you through a few things to consider, to make sure that your emails always end up where you intend.

Reputation Management

Much of email delivery depends on your reputation, which is attached to your IPs and domains.

Please note that there might be different types of setups where you can either influence these things or not:

  • If you’re **running your own server **(or VPS – virtual private server) or a bunch of servers with Plesk for shared hosting with WHMCS, you have full influence and control about the following settings.
  • If you’re an **end customer or reseller **of a service provider or hoster using Plesk, unfortunately only your hosting provider can do these modifications for you. In case you want to regain control of your environments, it’s time to move your shared hosting account to your own VPS!
  • If you run Plesk on one of the hyperscale cloud providers such as DigitalOcean, Linode, AWS/Lightsail, Azure, or Google, your default email / SMTP (Port 25 or not) might be blocked on the infrastructure level. If that’s the case, you might need to contact their support to unblock it. In addition, also check that you’re receiving a reverse DNS entry for your IP that is required for operating an email server properly.

The two key-factors that we can influence are:

**1. Ensure other servers can distinguish **between genuine email coming from your server and spam coming from other servers, pretending to come from your server. If you don’t, a spammer can burn your hard-earned reputation while delivering their spam.

You can ensure this by enabling DKIM/DMARC and SPF protection in Plesk under “Server-Wide Mail Settings”.

#plesk news and announcements #email #email server #kolab #plesk email security #plesk premium email #self-hosted email #spam

Arvel  Parker

Arvel Parker

1592882100

Naive Bayes Classifier

Introduction
Naïve Bayes algorithm is a machine learning supervised classification technique based on Bayes theorem with strong independence assumptions between the features. It is mainly used for binary or multi class classification and still remains one of the best method for Text categorization and document categorization.
For example, a vegetable may be considered to be tomato if it is red, round and 2 inches in diameter. A naive Bayes classifier considers each of these features to contribute independently to the probability that this Vegetable is a tomato, regardless of any possible correlations between the color, roundness, and diameter features.

#naive-bayes-in-python #machine-learning #artificial-intelligence #naive-bayes-classifier #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