Code Monkey home page Code Monkey logo

inteligencia-artificial's Introduction

Artificial Intelligence

This repository contains code and resources related to the Inteligencia Artificial course at Universidad de Ibagué. This is a Python scripts that uses the Matplotlib and Scikit-learn libraries to visualize data from the sklearn datasets.

Dependencies

The script requires the following libraries to be installed:

  • Matplotlib
  • NumPy
  • SciPy
  • Scikit-learn

Scripts

bayesiano.py

After installing the dependencies, run the script bayesiano.py. The script reads the iris dataset from scikit-learn and computes the mean and standard deviation of each feature for each of the three iris species: setosa, versicolor, and virginica. It then plots the probability distributions for each feature using a normal distribution function.

important files

Bayesiano_cancer.py

This code is a simple implementation of Naive Bayes classifier to classify cancer tumors as malignant or benign. It uses breast cancer dataset from sklearn library.

The code first loads the breast cancer dataset and defines the five descriptors used for classification. Then, it calculates the mean and standard deviation for each descriptor and stores them in M1 and S1 arrays, respectively.

After that, the code loads the validation data and calculates the posterior probability for each validation sample of being malignant or benign. The evidence, posterior probabilities and target values are stored in the arrays 'evidencia', 'post_maligno', 'post_benigno' and 'TESTEO', respectively.

Finally, the code classifies each validation sample based on which posterior probability is greater and stores the classification result in the 'TESTEO' array.

perceptron_cancer.py

This script implements a logistic regression model for predicting whether a patient's breast tumor is malignant or benign, based on a set of five tumor descriptors. The model is trained on the Breast Cancer Wisconsin (Diagnostic) dataset from scikit-learn, and validated on a subset of the same dataset.

regresion.py

This code implements a linear regression model to fit data generated from a line with noise. The program generates random data points and plots them, along with the predicted line of best fit. The mean squared error is also calculated to evaluate the quality of the fit.

iris_plants.py

The script generates two types of plots for each of the four features of the three different types of Iris flowers. The first type of plot displays the feature values for each of the three types of Iris flowers. The second type of plot displays a histogram of the feature values for each of the three types of Iris flowers, along with a normal distribution curve fitted to the data.

inteligencia-artificial's People

Contributors

juancarlos-tiquerangel avatar

Watchers

James Cloos avatar  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.