

{"id":69661,"date":"2019-09-16T09:18:41","date_gmt":"2019-09-16T03:48:41","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=69661"},"modified":"2025-07-29T18:28:31","modified_gmt":"2025-07-29T12:58:31","slug":"advanced-python-project-detecting-fake-news","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/","title":{"rendered":"Detecting Fake News with Python and Machine Learning"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1231,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1er9NJTLUA3qnRuyhfzuN0XUsoIC4a-_q\\\/view&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20240901224023\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1er9NJTLUA3qnRuyhfzuN0XUsoIC4a-_q\\\/view&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 04:14:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-12 04:19:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-15 04:42:03&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-18 04:49:21&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-21 05:07:43&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2025-12-24 05:23:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-27 05:27:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-30 05:47:58&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-02 05:57:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-05 06:30:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-08 06:33:35&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-11 06:41:53&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-14 06:49:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-17 07:21:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-20 07:30:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-23 07:56:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-26 08:06:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-29 08:40:01&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-01 09:27:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-04 09:30:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-07 09:34:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-10 09:35:29&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-13 09:49:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-16 09:49:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-19 09:53:51&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-22 10:07:20&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-25 10:13:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-28 10:37:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-03 10:43:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-06 10:49:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-09 11:52:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-12 11:53:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-15 12:12:05&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-18 12:40:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-21 13:00:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-24 13:08:16&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-27 13:50:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-30 14:26:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-02 14:26:22&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-05 14:30:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-08 14:51:52&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-11 16:10:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-14 16:24:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-17 16:28:10&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-20 16:32:06&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-23 16:37:50&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-26 17:18:57&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-29 17:30:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-02 17:30:47&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-05 17:47:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-08 18:04:12&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-11 18:15:15&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-14 18:33:43&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-17 22:32:05&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-20 23:12:03&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-24 02:13:37&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-27 02:35:14&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-30 03:54:28&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-02 04:41:08&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-05 04:50:56&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-08 06:08:51&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-11 06:33:28&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-11 06:33:28&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:1405,&quot;href&quot;:&quot;https:\\\/\\\/scikit-learn.org\\\/stable\\\/modules\\\/generated\\\/sklearn.feature_extraction.text.TfidfVectorizer.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251011133223\\\/https:\\\/\\\/scikit-learn.org\\\/stable\\\/modules\\\/generated\\\/sklearn.feature_extraction.text.TfidfVectorizer.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 06:31:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-12 07:00:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-15 07:06:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 07:22:41&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-21 10:16:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-24 11:02:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-27 12:29:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 12:42:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 12:46:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 13:56:09&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-08 14:12:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-11 15:27:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-14 16:17:29&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-17 17:52:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-20 18:04:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-23 18:39:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-26 18:52:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-29 22:07:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-02 00:03:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-05 01:02:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-08 02:27:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 04:15:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 04:49:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 05:57:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 07:19:48&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-02-23 07:30:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-26 07:50:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-01 07:51:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 09:01:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-07 10:35:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 10:37:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-13 14:08:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 14:10:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 14:47:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 14:47:58&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 15:02:25&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-28 16:12:47&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 19:06:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 03:42:46&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-07 03:50:31&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-10 04:41:45&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-13 05:12:23&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-16 05:27:12&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-19 06:45:37&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-22 07:17:55&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-04-25 08:36:20&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-28 08:36:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-01 08:43:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-04 09:09:33&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-07 10:13:40&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-10 10:17:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-13 12:26:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-16 19:20:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-19 20:35:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-23 05:44:31&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-05-26 07:03:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-29 07:47:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-01 07:56:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-04 08:00:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-07 08:42:11&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-06-10 08:52:54&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-10 08:52:54&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:1406,&quot;href&quot;:&quot;https:\\\/\\\/github.com\\\/GeorgeMcIntire\\\/fake_real_news_dataset&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20250627153320\\\/https:\\\/\\\/github.com\\\/GeorgeMcIntire\\\/fake_real_news_dataset&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 06:31:34&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-12 07:00:15&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-15 07:06:16&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-18 07:22:44&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-21 10:16:35&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-24 11:02:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-27 12:29:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2025-12-30 12:42:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-02 12:46:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-05 15:20:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-08 15:32:43&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-11 16:15:27&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-14 16:17:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-17 17:52:14&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-20 18:04:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-23 18:39:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-26 18:52:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-01-29 22:34:53&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-02 00:04:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-05 01:10:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-08 04:12:05&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-11 04:15:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 04:49:08&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 05:58:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 07:19:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-23 07:30:51&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-26 07:50:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-01 07:51:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 09:05:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-07 10:35:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-10 10:37:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-13 14:08:26&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-16 14:10:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 14:47:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 14:48:00&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-25 15:02:25&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 16:12:48&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-31 19:07:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 03:42:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 03:50:28&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-10 04:41:41&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-13 05:13:22&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-16 05:27:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-19 06:45:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-22 07:17:52&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-25 08:36:21&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-28 08:36:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-01 08:43:10&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-04 09:09:32&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-07 10:13:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-10 10:17:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-13 12:26:37&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-16 19:20:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-19 20:35:13&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-23 05:44:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-26 07:03:23&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-05-29 07:47:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-01 07:56:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-04 08:00:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-07 08:42:07&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-06-10 08:52:52&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-10 08:52:52&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>Do you trust all the news you hear from social media?<\/p>\n<p>All news are not real, right?<\/p>\n<p>How will you detect fake news?<\/p>\n<p>The answer is Python. By practicing this advanced python project of detecting fake news, you will easily make a difference between real and fake news.<\/p>\n<p>Before moving ahead in this machine learning project, get aware of the terms related to it like fake news, tfidfvectorizer, PassiveAggressive Classifier.<\/p>\n<p>Also, I like to add that DataFlair has published a <em><strong>series of machine learning Projects<\/strong><\/em> where you will get interesting and open-source advanced ml projects. Do check, and then share your experience through comments. Here is the list of top Python projects:<\/p>\n<ol>\n<li>Fake News Detection Python Project<\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-machine-learning-project-detecting-parkinson-disease\/\">Parkinson&#8217;s Disease Detection Python Project<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/project-in-python-colour-detection\/\">Color Detection Python Project<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-mini-project-speech-emotion-recognition\/\">Speech Emotion Recognition Python Project\u00a0<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/project-in-python-breast-cancer-classification\/\">Breast Cancer Classification Python Project<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-project-gender-age-detection\/\">Age and Gender Detection Python Project\u00a0<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-deep-learning-project-handwritten-digit-recognition\/\">Handwritten Digit Recognition Python Project<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-chatbot-project\/\">Chatbot Python Project<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-project-driver-drowsiness-detection-system\/\">Driver Drowsiness Detection Python Project<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-project-traffic-signs-recognition\/\">Traffic Signs Recognition Python Project<\/a><\/li>\n<li><a href=\"https:\/\/data-flair.training\/blogs\/python-based-project-image-caption-generator-cnn\/\">Image Caption Generator Python Project<\/a><\/li>\n<\/ol>\n<h3>What is Fake News?<\/h3>\n<p>A type of yellow journalism, fake news encapsulates pieces of news that may be hoaxes and is generally spread through social media and other online media. This is often done to further or impose certain ideas and is often achieved with political agendas. Such news items may contain false and\/or exaggerated claims, and may end up being viralized by algorithms, and users may end up in a filter bubble.<\/p>\n<h3>What is a TfidfVectorizer?<\/h3>\n<p><strong>TF (Term Frequency):<\/strong> The number of times a word appears in a document is its Term Frequency. A higher value means a term appears more often than others, and so, the document is a good match when the term is part of the search terms.<\/p>\n<p><strong>IDF (Inverse Document Frequency):<\/strong> Words that occur many times a document, but also occur many times in many others, may be irrelevant. IDF is a measure of how significant a term is in the entire corpus.<\/p>\n<p>The TfidfVectorizer converts a collection of raw documents into a matrix of TF-IDF features.<\/p>\n<h3>What is a PassiveAggressiveClassifier?<\/h3>\n<p>Passive Aggressive algorithms are online learning algorithms. Such an algorithm remains passive for a correct classification outcome, and turns aggressive in the event of a miscalculation, updating and adjusting. Unlike most other algorithms, it does not converge. Its purpose is to make updates that correct the loss, causing very little change in the norm of the weight vector.<\/p>\n<h3>Detecting Fake News with Python<\/h3>\n<p>To build a model to accurately classify a piece of news as REAL or FAKE.<\/p>\n<h3>About Detecting Fake News with Python<\/h3>\n<p>This advanced python project of detecting fake news deals with fake and real news. Using sklearn, we build a TfidfVectorizer on our dataset. Then, we initialize a PassiveAggressive Classifier and fit the model. In the end, the accuracy score and the confusion matrix tell us how well our model fares.<\/p>\n<h3>The fake news Dataset<\/h3>\n<p>The dataset we\u2019ll use for this python project- we\u2019ll call it news.csv. This dataset has a shape of 7796&#215;4. The first column identifies the news, the second and third are the title and text, and the fourth column has labels denoting whether the news is REAL or FAKE. The dataset takes up 29.2MB of space and you can<a href=\"https:\/\/drive.google.com\/file\/d\/1er9NJTLUA3qnRuyhfzuN0XUsoIC4a-_q\/view\"><em><strong> download it here<\/strong><\/em><\/a>.<\/p>\n<h3>Project Prerequisites<\/h3>\n<p>You\u2019ll need to install the following libraries with pip:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">pip install numpy pandas sklearn<\/pre>\n<p>You\u2019ll need to install Jupyter Lab to run your code. Get to your command prompt and run the following command:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">C:\\Users\\DataFlair&gt;jupyter lab<\/pre>\n<p>You\u2019ll see a new browser window open up; create a new console and use it to run your code. To run multiple lines of code at once, press Shift+Enter.<\/p>\n<h3>Steps for detecting fake news with Python<\/h3>\n<p>Follow the below steps for detecting fake news and complete your first advanced Python Project &#8211;<\/p>\n<p>1. Make necessary imports:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import numpy as np\r\nimport pandas as pd\r\nimport itertools\r\nfrom sklearn.model_selection import train_test_split\r\nfrom sklearn.feature_extraction.text import TfidfVectorizer\r\nfrom sklearn.linear_model import PassiveAggressiveClassifier\r\nfrom sklearn.metrics import accuracy_score, confusion_matrix<\/pre>\n<p><strong>Screenshot:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-imports-data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-69674 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-imports-data.png\" alt=\"importing data sets in python open source projects\" width=\"600\" height=\"363\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-imports-data.png 600w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-imports-data-150x91.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-imports-data-300x182.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-imports-data-520x315.png 520w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>2. Now, let\u2019s read the data into a DataFrame, and get the shape of the data and the first 5 records.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#Read the data\r\ndf=pd.read_csv('D:\\\\DataFlair\\\\news.csv')\r\n\r\n#Get shape and head\r\ndf.shape\r\ndf.head()<\/pre>\n<p><strong>Output Screenshot:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-read-data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-69677 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-read-data.png\" alt=\"interesting python projects - read data frame \" width=\"796\" height=\"304\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-read-data.png 796w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-read-data-150x57.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-read-data-300x115.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-read-data-768x293.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-read-data-520x199.png 520w\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" \/><\/a><\/p>\n<p>3. And get the labels from the DataFrame.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#DataFlair - Get the labels\r\nlabels=df.label\r\nlabels.head()<\/pre>\n<p><strong>Output Screenshot:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-get-labels-.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-69678 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-get-labels-.png\" alt=\"Python projects examples - get labels\" width=\"254\" height=\"188\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-get-labels-.png 254w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-get-labels--150x111.png 150w\" sizes=\"auto, (max-width: 254px) 100vw, 254px\" \/><\/a><\/p>\n<p>4. Split the dataset into training and testing sets.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#DataFlair - Split the dataset\r\nx_train,x_test,y_train,y_test=train_test_split(df['text'], labels, test_size=0.2, random_state=7)<\/pre>\n<p><strong>Screenshot:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/split-dataset-in-python-projects.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-69679 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/split-dataset-in-python-projects.png\" alt=\"Python data science projects - split data sets\" width=\"759\" height=\"55\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/split-dataset-in-python-projects.png 759w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/split-dataset-in-python-projects-150x11.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/split-dataset-in-python-projects-300x22.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/split-dataset-in-python-projects-520x38.png 520w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/a><\/p>\n<p>5. Let\u2019s initialize a <a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.feature_extraction.text.TfidfVectorizer.html\">TfidfVectorizer<\/a> with stop words from the English language and a maximum document frequency of 0.7 (terms with a higher document frequency will be discarded). Stop words are the most common words in a language that are to be filtered out before processing the natural language data. And a TfidfVectorizer turns a collection of raw documents into a matrix of TF-IDF features.<\/p>\n<p>Now, fit and transform the vectorizer on the train set, and transform the vectorizer on the test set.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#DataFlair - Initialize a TfidfVectorizer\r\ntfidf_vectorizer=TfidfVectorizer(stop_words='english', max_df=0.7)\r\n\r\n#DataFlair - Fit and transform train set, transform test set\r\ntfidf_train=tfidf_vectorizer.fit_transform(x_train) \r\ntfidf_test=tfidf_vectorizer.transform(x_test)<\/pre>\n<p><strong>Screenshot:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-tfidf.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-69682 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-tfidf.png\" alt=\"python data science projects\" width=\"536\" height=\"124\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-tfidf.png 536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-tfidf-150x35.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-tfidf-300x69.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-projects-tfidf-520x120.png 520w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<p>6. Next, we\u2019ll initialize a PassiveAggressiveClassifier. This is. We\u2019ll fit this on tfidf_train and y_train.<\/p>\n<p>Then, we\u2019ll predict on the <a href=\"https:\/\/github.com\/GeorgeMcIntire\/fake_real_news_dataset\">test set<\/a> from the TfidfVectorizer and calculate the accuracy with accuracy_score() from sklearn.metrics.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#DataFlair - Initialize a PassiveAggressiveClassifier\r\npac=PassiveAggressiveClassifier(max_iter=50)\r\npac.fit(tfidf_train,y_train)\r\n\r\n#DataFlair - Predict on the test set and calculate accuracy\r\ny_pred=pac.predict(tfidf_test)\r\nscore=accuracy_score(y_test,y_pred)\r\nprint(f'Accuracy: {round(score*100,2)}%')<\/pre>\n<p><strong>Output Screenshot:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/passive-aggressive-calssifier-in-python-projects.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-69685 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/passive-aggressive-calssifier-in-python-projects.png\" alt=\"python machine learning projects\" width=\"487\" height=\"182\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/passive-aggressive-calssifier-in-python-projects.png 487w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/passive-aggressive-calssifier-in-python-projects-150x56.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/passive-aggressive-calssifier-in-python-projects-300x112.png 300w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><\/a><\/p>\n<p>7. We got an accuracy of 92.82% with this model. Finally, let\u2019s print out a confusion matrix to gain insight into the number of false and true negatives and positives.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#DataFlair - Build confusion matrix\r\nconfusion_matrix(y_test,y_pred, labels=['FAKE','REAL'])<\/pre>\n<p><strong>Output Screenshot:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/confusion-matrix-python-projects.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-69688 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/confusion-matrix-python-projects.png\" alt=\"python projects - confusion matrix\" width=\"455\" height=\"159\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/confusion-matrix-python-projects.png 455w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/confusion-matrix-python-projects-150x52.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/confusion-matrix-python-projects-300x105.png 300w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/a><\/p>\n<p>So with this model, we have 589 true positives, 587 true negatives, 42 false positives, and 49 false negatives.<\/p>\n<h3>Summary<\/h3>\n<p>Fake news spreads quickly on the internet and can cause serious problems. It can confuse people, create panic, or spread lies. A Machine Learning project in Python can help solve this issue. Using Natural Language Processing (NLP), we can build a model that reads the news headline or article and predicts if it\u2019s real or fake. This project helps people and media companies check information before trusting it.<\/p>\n<p>Today, we learned to detect fake news with Python. We took a political dataset, implemented a TfidfVectorizer, initialized a PassiveAggressiveClassifier, and fit our model. We ended up obtaining an accuracy of 92.82% in magnitude.<\/p>\n<p>This project is very useful in today\u2019s digital world. You can also make a simple website using Flask where users paste a news headline and see if it\u2019s fake or not. It\u2019s a practical and timely project to learn NLP, text classification, and real-world machine learning. Plus, it helps make the internet a safer place for information sharing.<\/p>\n<p>Hope you enjoyed the fake news detection python project. Keep visiting DataFlair for more interesting python, data science, and machine learning projects.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you trust all the news you hear from social media? All news are not real, right? How will you detect fake news? The answer is Python. By practicing this advanced python project of&#46;&#46;&#46;<\/p>\n","protected":false},"author":6,"featured_media":69866,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[21075,21067,21066,21065,21064],"class_list":["post-69661","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machine-learning","tag-advanced-python-project","tag-python-data-science-projects","tag-python-machine-learning-projects","tag-python-mini-projects","tag-top-python-projects"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Detecting Fake News with Python and Machine Learning - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn to detect fake news with Python, build your fake news detection project. Get hands-on experience with python machine learning project\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Detecting Fake News with Python and Machine Learning - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn to detect fake news with Python, build your fake news detection project. Get hands-on experience with python machine learning project\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-16T03:48:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-29T12:58:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-project-detecting-fake-news.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"804\" \/>\n\t<meta property=\"og:image:height\" content=\"422\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Detecting Fake News with Python and Machine Learning - DataFlair","description":"Learn to detect fake news with Python, build your fake news detection project. Get hands-on experience with python machine learning project","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/","og_locale":"en_US","og_type":"article","og_title":"Detecting Fake News with Python and Machine Learning - DataFlair","og_description":"Learn to detect fake news with Python, build your fake news detection project. Get hands-on experience with python machine learning project","og_url":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2019-09-16T03:48:41+00:00","article_modified_time":"2025-07-29T12:58:31+00:00","og_image":[{"width":804,"height":422,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-project-detecting-fake-news.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89"},"headline":"Detecting Fake News with Python and Machine Learning","datePublished":"2019-09-16T03:48:41+00:00","dateModified":"2025-07-29T12:58:31+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/"},"wordCount":1040,"commentCount":195,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-project-detecting-fake-news.jpg","keywords":["Advanced python project","Python data science projects","python machine learning projects","python mini projects","Top Python Projects"],"articleSection":["Machine Learning Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/","url":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/","name":"Detecting Fake News with Python and Machine Learning - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-project-detecting-fake-news.jpg","datePublished":"2019-09-16T03:48:41+00:00","dateModified":"2025-07-29T12:58:31+00:00","description":"Learn to detect fake news with Python, build your fake news detection project. Get hands-on experience with python machine learning project","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-project-detecting-fake-news.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/09\/python-project-detecting-fake-news.jpg","width":804,"height":422,"caption":"detecting fake news"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/advanced-python-project-detecting-fake-news\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Machine Learning Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/machine-learning\/"},{"@type":"ListItem","position":3,"name":"Detecting Fake News with Python and Machine Learning"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/2c58ecb4f73a39f0ef993f1ddfcd7b89","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1ce4a0e3e542444fc73bbebf83e89e8b73e2d95ccb1fcee64da9945f078b97c5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team provides industry-driven content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our expert educators focus on delivering value-packed, easy-to-follow resources for tech enthusiasts and professionals.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam2\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/69661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=69661"}],"version-history":[{"count":35,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/69661\/revisions"}],"predecessor-version":[{"id":146318,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/69661\/revisions\/146318"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/69866"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=69661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=69661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=69661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}