Coder Social home page Coder Social logo

deguiyu / automaticai Goto Github PK

View Code? Open in Web Editor NEW

This project forked from czakozoltan08/automaticai

0.0 0.0 0.0 152 KB

A hybrid Particle Swarm Optimization - Simulated Annealing algorithm for automatic AI algorithm selection and hyperparameter tuning

License: MIT License

Python 7.84% Jupyter Notebook 92.16%

automaticai's Introduction

AutomaticAI - A Hybrid Approach for Automatic Artificial Intelligence Algorithm Selection and Hyperparameter Tuning

Introduction

This is method used for solving the problem of AI algorithm selection and hyperparameter tuning, without human intervention, in a fully automated way. The method is a hybrid approach, a combination between Particle Swarm Optimization and the Simulated Annealing.

Example Usage

from sklearn import datasets

from sklearn.model_selection import train_test_split

from sklearn.metrics import accuracy_score

from AutoAIAlgorithm.ParticleSwarmOptimization import PSO

def main(): # load the MNIST digits dataset

mnist = datasets.load_digits()

X = mnist.data

y = mnist.target

# Splitting the data into training set, test set and validation set

x_train, x_test, y_train, y_test = train_test_split(X, y)

num_particles=5

num_iterations=30

pso = PSO(particle_count=num_particles,
          distance_between_initial_particles=0.7,
          evaluation_metric=accuracy_score)

best_metric, best_model = pso.fit(X_train=x_train,
                                  X_test=x_test,
                                  Y_train=y_train,
                                  Y_test=y_test,
                                  maxiter=num_iterations,
                                  verbose=True,
                                  max_distance=0.05)
        
print(best_metric)
print(best_model)

if name == "main": main()

automaticai's People

Contributors

czakozoltan08 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.