Skip to content

Projeto Trabalho para a disciplina de Inteligência Artificial do curso de Análise e Desenvolvimento de Sistemas da FATEC Praia Grande.

License

Notifications You must be signed in to change notification settings

githubforks/inteligencia-artificial-fatecpg

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Artificial Intelligence

Faculdade de Tecnologia de Praia Grande - São Paulo - Brazil

This project is an aplication of A.I. concepts using Weka for show the use of Nearest Neighbor and K-Nearest Neighbor algorithm.

Concepts you need know before enjoy this project.

An small explain about Weka...

Weka is a collection of machine learning algorithms for data mining tasks. The algorithms can either be applied directly to a dataset or called from your own Java code. Weka contains tools for data pre-processing, classification, regression, clustering, association rules, and visualization. It is also well-suited for developing new machine learning schemes.

Installation

This project requires JDK 8+,JRE 8+ and Java IDE, we recommend Eclipse to run.

After install this programs, clone our project and use the class CarroClassify.java to test our data source or use as an example to test any other.

In CarroClassify.java you can see this code to set parameters about your machine learning data

String dataSourceToLearn = "carro.arff";
String dataSourceToClassify = "carro-a-classificar.arff";
int classIndex = 6;
int classPossibilites = 4;
int partitions = 5;
int iterations = 5;

Questions about that variables? Consult the documentation about IBK implementations to understand these parameters

This code below is to apply the Nearest Neighbor algorithms in the base as you have been set in the parameters

NearestNeighbor nn;

System.out.println("==========Using Nearest Neighbor==========\n");
nn = new NearestNeighbor(dataSourceToLearn, dataSourceToClassify, classIndex, classPossibilites);
System.out.println(nn.getResults());

If you want to use K-Nearest Neighbor, use this code below

KNearestNeighbor knn;

System.out.println("\n=========Using K-NearestNeighbor=========\n");
knn = new KNearestNeighbor(partitions, iterations, dataSourceToLearn, classIndex, classPossibilites);
System.out.println(knn.getResults());

Libraries

Weka.jar file is disponible in the project root, if Eclipse acuses an error in this deppendence update the file path.

Development

Want to contribute? Great!

Send your commit and we'll see your code an answer!

License

Thank you for visiting and use this project as you want!

Free Software, Yeah!

About

Projeto Trabalho para a disciplina de Inteligência Artificial do curso de Análise e Desenvolvimento de Sistemas da FATEC Praia Grande.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%