Code Monkey home page Code Monkey logo

ai_project's Introduction

(EN) Project for Artificial Intelligence course

Project for the teaching of Artificial Intelligence, computer science degree course (Padua, Italy)

The project involved the implementation of a spam filter. This was done using Python using the following libraries:

  1. Keras definition of the neural network and its training;
  2. Pandas: conversion of the dataset into .csv format;
  3. scikit-learn: data pre-processing and use of the LogisticRegression algorithm;

The dataset used for the project can be found at the following link: Spam Collection Dataset.

The purpose of the project and the tool we have used are explained inside the report.

How to run it

To run the project it is suggested to lean on the platform Google Colab which already has the integrated version of TensorFlow 2.0.0.

To import the project into your personal Colab platform, you need to log in to your Colab account and click on Upload notebook and load the previously downloaded notebook.

Download dataset

You must have the credentials of a Kaggle account from which you can download the dataset using a personal KAGGLE_KEY, see API Credentials for more info.

Once the Kaggle key is obtained, it is necessary to perform the following operations in the first cell of the files you want to execute:

  1. Save the key obtained in the key field;
  2. Write your personal Kaggle username in the username field.

If everything has been set correctly, the cell automatically downloads the dataset from Kaggle and saves it in .zip format to then decompress it in .csv format which is used for neural network training.

(IT) Progetto di Intelligenza Artificiale

Progetto per l'insegnamento di Intelligenza artificiale, corso di laurea in Informatica (Padova, Italia).

Il progetto prevedeva l'implementazione di uno spam filter. Questo è stato realizzato tramite Python utilizzando la seguenti librerie:

  1. Keras: definizione della rete neurale e training di essa, questa è stata importata da Tensorflow, che dalla versione 2.0.0 la contiene al suo interno;
  2. Pandas: conversione del dataset in formato .csv;
  3. scikit-learn: pre-processing dei dati e utilizzo dell'algoritmo di LogisticRegression;
  4. Kaggle API: scaricamento del dataset in formato .zip.

Il dataset utilizzato per il progetto è reperibile al seguente link: Spam Collection Dataset.

Lo scopo del progetto e gli strumenti che abbiamo utilizzato sono spiegati all'interno della relazione.

Come eseguirlo

Per eseguire il progetto si suggerisce di appoggiarsi alla piattaforma Google Colab la quale presenta già la versione di TensorFlow 2.0.0 integrata.

Per importare il progetto nella propria piattaforma Colab personale è necessario accedere al proprio account Colab e cliccare sulla voce Upload notebook e caricare il notebook precedentemente scaricato.

Scaricamento dataset

È necessario possedere le credenziali di un account Kaggle dal quale poter scaricare il dataset tramite l'utilizzo di una KAGGLE_KEY personale, vedi API Credentials per maggiori info.
Una volta ottenuta la chiave di Kaggle è necessario effettuare le seguenti operazioni nella prima cella dei file che si vogliono eseguire:

  1. Salvare la chiave ottenuta nel campo key;
  2. Scrivere nel campo username il proprio username personale di Kaggle.

Se tutto è stato settato correttamente la cella scarica automaticamente il dataset da Kaggle e lo salva in formato .zip per poi scomprimerlo in formato .csv che viene utilizzato per il training della rete neurale.

ai_project's People

Contributors

fracorti avatar giovannisorice avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.