Solid

🎯 A comprehensive gradient-free optimization framework written in Python
Alternatives To Solid
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Ray25,7678019911 hours ago76June 09, 20222,839apache-2.0Python
Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a toolkit of libraries (Ray AIR) for accelerating ML workloads.
Deep Learning Drizzle10,767
5 months ago6HTML
Drench yourself in Deep Learning, Reinforcement Learning, Machine Learning, Computer Vision, and NLP by learning from these exciting lectures!!
Optuna8,132262142 days ago49June 13, 2022124otherPython
A hyperparameter optimization framework
Nebuly8,044
23 days ago95apache-2.0Python
The next-generation platform to monitor and optimize your AI costs in one place 🚀
Serve3,46911a day ago14May 13, 2022272apache-2.0Java
Serve, optimize and scale PyTorch models in production
Scikit Optimize2,5948013311 days ago19October 12, 2021301bsd-3-clausePython
Sequential model-based optimization with a `scipy.optimize` interface
Awesome Quantum Machine Learning2,206
3 months ago8cc0-1.0HTML
Here you can get all the Quantum Machine learning Basics, Algorithms ,Study Materials ,Projects and the descriptions of the projects around the web
Awesome System For Machine Learning1,940
2 months ago12mit
A curated list of research in machine learning systems (MLSys). Paper notes are also provided.
Awesome Robotics Libraries1,804
14 days ago2cc0-1.0
:sunglasses: A curated list of robotics libraries and software
Pennylane1,769102419 hours ago33June 20, 2022304apache-2.0Python
PennyLane is a cross-platform Python library for differentiable programming of quantum computers. Train a quantum computer the same way as a neural network.
Alternatives To Solid
Select To Compare


Alternative Project Comparisons
Readme

Build Status MIT License

Solid is a Python framework for gradient-free optimization.

It contains basic versions of many of the most common optimization algorithms that do not require the calculation of gradients, and allows for very rapid development using them.

It's a very versatile library that's great for learning, modifying, and of course, using out-of-the-box.

See the detailed documentation here.


Current Features:


Usage:

  • pip install solidpy
  • Import the relevant algorithm
  • Create a class that inherits from that algorithm, and that implements the necessary abstract methods
  • Call its .run() method, which always returns the best solution and its objective function value

Example:

from random import choice, randint, random
from string import lowercase
from Solid.EvolutionaryAlgorithm import EvolutionaryAlgorithm


class Algorithm(EvolutionaryAlgorithm):
    """
    Tries to get a randomly-generated string to match string "clout"
    """
    def _initial_population(self):
        return list(''.join([choice(lowercase) for _ in range(5)]) for _ in range(50))

    def _fitness(self, member):
        return float(sum(member[i] == "clout"[i] for i in range(5)))

    def _crossover(self, parent1, parent2):
        partition = randint(0, len(self.population[0]) - 1)
        return parent1[0:partition] + parent2[partition:]

    def _mutate(self, member):
        if self.mutation_rate >= random():
            member = list(member)
            member[randint(0,4)] = choice(lowercase)
            member = ''.join(member)
        return member


def test_algorithm():
    algorithm = Algorithm(.5, .7, 500, max_fitness=None)
    best_solution, best_objective_value = algorithm.run()


Testing

To run tests, look in the tests folder.

Use pytest; it should automatically find the test files.


Contributing

Feel free to send a pull request if you want to add any features or if you find a bug.

Check the issues tab for some potential things to do.

Popular Optimization Projects
Popular Machine Learning Projects
Popular Software Performance Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python
Machine Learning
Algorithms
Artificial Intelligence
Optimization
Gradient
Genetic Algorithm
Machine Learning Algorithms
Evolutionary Algorithm
Optimization Algorithms
Metaheuristics