### Install useful-math-functions Source: https://github.com/anselmoo/useful-math-functions/blob/main/README.md Install the package using pip. This is the basic installation command. ```bash pip install useful-math-functions ``` -------------------------------- ### Install useful-math-functions with Visualization Libraries Source: https://github.com/anselmoo/useful-math-functions/blob/main/README.md Install optional dependencies for visualization. Choose matplotlib, plotly, or all. ```bash pip install useful-math-functions[matplotlib] ``` ```bash pip install useful-math-functions[plotly] ``` ```bash pip install useful-math-functions[all] ``` -------------------------------- ### JSON Dataset Example Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/export/dataset_generation.md Example structure of the OptBench dataset when saved in JSON format. It contains arrays of numerical data. ```json { "x_0": [ [ -5.0, -4.9, -4.800000000000001, -4.700000000000001, -4.600000000000001, -4.500000000000002, -4.400000000000002, -4.3000000000000025, -4.200000000000003, -4.100000000000003, -4.0000000000000036, -3.900000000000004, -3.8000000000000043, -3.7000000000000046, -3.600000000000005, -3.5000000000000053, -3.4000000000000057, -3.300000000000006, -3.2000000000000064, -3.1000000000000068, -3.000000000000007, -2.9000000000000075, -2.800000000000008, -2.700000000000008, -2.6000000000000085, -2.500000000000009, -2.4000000000000092, -2.3000000000000096, -2.20000000000001, -2.1000000000000103, -2.0000000000000107, -1.900000000000011, -1.8000000000000114, -1.7000000000000117, -1.600000000000012, -1.5000000000000124, -1.4000000000000128, -1.3000000000000131, -1.2000000000000135, -1.1000000000000139, -1.0000000000000142, -0.9000000000000146, -0.8000000000000149, -0.7000000000000153, -0.6000000000000156, -0.500000000000016, -0.40000000000001634, -0.3000000000000167, -0.20000000000001705, -0.10000000000001741, -1.7763568394002505e-14, 0.09999999999998188, 0.19999999999998153, 0.29999999999998117, 0.3999999999999808, 0.49999999999998046, 0.5999999999999801, 0.6999999999999797, 0.7999999999999794, 0.899999999999979, 0.9999999999999787, 1.0999999999999783, 1.199999999999978, 1.2999999999999776, 1.3999999999999773, 1.499999999999977, 1.5999999999999766, 1.6999999999999762, 1.7999999999999758, 1.8999999999999755, 1.9999999999999751, 2.0999999999999748, 2.1999999999999744, 2.299999999999974, 2.3999999999999737, 2.4999999999999734, 2.599999999999973, 2.6999999999999726, 2.7999999999999723, 2.899999999999972, 2.9999999999999716, 3.0999999999999712, 3.199999999999971, 3.2999999999999705, 3.39999999999997, 3.49999999999997, 3.5999999999999694, 3.699999999999969, 3.7999999999999687, 3.8999999999999684, 3.999999999999968, 4.099999999999968, 4.199999999999967, 4.299999999999967, 4.399999999999967, 4.499999999999966, 4.599999999999966, 4.6999999999999655, 4.799999999999965, 4.899999999999965 ], ... ] } ``` -------------------------------- ### CSV Dataset Example Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/export/dataset_generation.md Example structure of the OptBench dataset when saved in CSV format. It shows comma-separated values for different variables. ```csv x_0,x_1,x_2 -5.000000,-5.000000,12.642411 -5.000000,-4.900000,12.816406 -5.000000,-4.800000,13.289395 -5.000000,-4.700000,13.727453 -5.000000,-4.600000,13.966601 -5.000000,-4.500000,13.993625 -5.000000,-4.400000,13.820456 -5.000000,-4.300000,13.435255 -5.000000,-4.200000,12.851327 -5.000000,-4.100000,12.232743 -5.000000,-4.000000,11.913518 -5.000000,-3.900000,12.089881 ...,...,... ``` -------------------------------- ### Create and Plot Optimization Benchmark Source: https://github.com/anselmoo/useful-math-functions/blob/main/README.md Import OptBench, create an optimization benchmark, set plot type, and render/save the plot. ```python from umf.core.create import OptBench res = OptBench(["DeJongN5Function"], dim=3) res.plot_type_3d = "plot_surface" res.plot() res.save_as_image() ``` -------------------------------- ### SphereFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md Provides an implementation of the Sphere function, a simple yet fundamental optimization test case. ```APIDOC ## SphereFunction ### Description This class implements the Sphere function, also known as the sum of squares function. It is a basic convex function widely used in optimization. ### Usage ```python from umf.functions.optimization.bowl_shaped import SphereFunction # Instantiate the function sphere_func = SphereFunction() # Evaluate the function at a point (e.g., [1, 1, 1]) # result = sphere_func([1, 1, 1]) ``` ### Parameters This function does not take any parameters upon instantiation. ``` -------------------------------- ### Generate Dataset as CSV Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/export/dataset_generation.md Use this method to save the generated dataset in CSV format. Specify the directory name where the file will be saved. ```python es.save_as_csv(dir_name="csv") ``` -------------------------------- ### Evaluate and Plot Himmelblau Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/README.md Import HimmelblauFunction, generate meshgrid data, evaluate the function, and plot its surface using matplotlib. ```python from umf.functions.optimization.special import HimmelblauFunction import numpy as np x = np.linspace(-5, 5, 100) y = np.linspace(-5, 5, 100) X, Y = np.meshgrid(x, y) Z = HimmelblauFunction(X, Y).__eval__ import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111, projection="3d") ax.plot_surface(X, Y, Z, cmap="viridis") plt.savefig("HimmelblauFunction.png", dpi=300, transparent=True) ``` -------------------------------- ### Generate Dataset as JSON Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/export/dataset_generation.md Use this method to save the generated dataset in JSON format. Specify the directory name where the file will be saved. ```python es.save_as_json(dir_name="json") ``` -------------------------------- ### SumOfDifferentPowersFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md Represents the Sum of Different Powers function, a common benchmark in optimization. ```APIDOC ## SumOfDifferentPowersFunction ### Description This class implements the Sum of Different Powers function, a mathematical function often used for testing optimization algorithms. ### Usage ```python from umf.functions.optimization.bowl_shaped import SumOfDifferentPowersFunction # Instantiate the function sum_diff_pow_func = SumOfDifferentPowersFunction() # Evaluate the function at a point (e.g., [1, 2, 3]) # result = sum_diff_pow_func([1, 2, 3]) ``` ### Parameters This function does not take any parameters upon instantiation. ``` -------------------------------- ### Generalized Extreme-Value Distribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/continuous_variable_support.md Provides access to the Probability Density Function (PDF) and Cumulative Distribution Function (CDF) for the Generalized Extreme-Value Distribution. ```APIDOC ## Generalized Extreme-Value Distribution ### Description This section details the Probability Density Function (PDF) and Cumulative Distribution Function (CDF) for the Generalized Extreme-Value Distribution. ### Probability Density Function ![GeneralizedExtremeValueDistribution](../../../extra/images/GeneralizedExtremeValueDistribution.png) ### Cumulative Distribution Function ![GeneralizedExtremeValueDistribution-CML](../../../extra/images/GeneralizedExtremeValueDistribution-cml.png) ``` -------------------------------- ### Griewank Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Griewank function is a popular benchmark for optimization algorithms due to its numerous local minima and a single global minimum at the origin. It is sensitive to scaling. ```APIDOC ## Griewank Function This function is characterized by a large number of local minima, making it difficult for simple optimization methods. ### Usage ```python from umf.functions.optimization.many_local_minima import GriewankFunction # Instantiate the function griewank = GriewankFunction() # Evaluate the function at a point (e.g., [x1, x2, ..., xn]) value = griewank([1.0, 2.0, 3.0]) print(f"The value of the Griewank function at [1.0, 2.0, 3.0] is: {value}") ``` ### Mathematical Definition (Image of the GriewankFunction is available in the documentation, showing its visual representation.) ``` -------------------------------- ### Generalized Pareto Distribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/continuous_variable_support.md Provides access to the Probability Density Function (PDF) and Cumulative Distribution Function (CDF) for the Generalized Pareto Distribution. ```APIDOC ## Generalized Pareto Distribution ### Description This section details the Probability Density Function (PDF) and Cumulative Distribution Function (CDF) for the Generalized Pareto Distribution. ### Probability Density Function ![GeneralizedParetoDistribution](../../../extra/images/GeneralizedParetoDistribution.png) ### Cumulative Distribution Function ![GeneralizedParetoDistribution-CML](../../../extra/images/GeneralizedParetoDistribution-cml.png) ``` -------------------------------- ### Softplus Symmetric Line Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Describes the Softplus Symmetric Line Function, used in optimization. The documentation includes a visual aid for understanding the function. ```APIDOC ## Softplus Symmetric Line Function ::: umf.functions.optimization.line_shaped.SoftplusSymmetricLineFunction options: show_bases: false show_source: true show_inherited_members: false allow_inspection: false inheritance_graph: false heading_level: 0 | | | :---------------------------------------------------------------------------------------: | | ![SoftplusSymmetricLineFunction](../../../extra/images/SoftplusSymmetricLineFunction.png) | ``` -------------------------------- ### Drops and Steps Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/optimization.md A function characterized by sudden drops and step-like changes, posing challenges for gradient-based optimizers. ```APIDOC ## Drops and Steps Function ### Description Features abrupt drops and step-like discontinuities, making it difficult for some optimization methods. ### Usage ```python import umf.functions.optimization # Example usage (specific parameters depend on the function's signature) # result = umf.functions.optimization.drops_steps(x) ``` ``` -------------------------------- ### Additional Optimization Functions Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/optimization.md Provides access to other optimization-related functions not categorized above. ```APIDOC ## Additional Optimization Functions ### Description Includes supplementary optimization functions that may be useful for specific applications or advanced testing. ### Usage ```python import umf.functions.optimization # Example usage (specific parameters depend on the function's signature) # result = umf.functions.optimization.additional(x) ``` ``` -------------------------------- ### ZirilliFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md Implements the Zirilli function, another standard test function for optimization. ```APIDOC ## ZirilliFunction ### Description This class represents the Zirilli function, a benchmark function used in numerical optimization. ### Usage ```python from umf.functions.optimization.bowl_shaped import ZirilliFunction # Instantiate the function zirilli_func = ZirilliFunction() # Evaluate the function at a point (e.g., [0.5, -0.5]) # result = zirilli_func([0.5, -0.5]) ``` ### Parameters This function does not take any parameters upon instantiation. ``` -------------------------------- ### Binomial Distribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/discrete_finite_support.md The Binomial distribution is a discrete probability distribution that expresses the probability of k successes in a fixed number of independent Bernoulli trials, each with probability p of success. ```APIDOC ## BinomialDistribution ### Description Represents a Binomial distribution. ### Probability Mass Function ![BinomialDistribution](../../../extra/images/BinomialDistribution.png) ### Cumulative Density Function ![BinomialDistribution-CML](../../../extra/images/BinomialDistribution-cml.png) ``` -------------------------------- ### Absolute Line Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md API documentation for the Absolute Line Function. ```APIDOC ## Absolute Line Function ### Description API documentation for the Absolute Line Function. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Evaluate and Plot Rosenbrock Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/README.md Import Rosenbrock2DFunction, generate meshgrid data, evaluate the function, and plot its surface using matplotlib. ```python from umf.functions.optimization.valley_shaped import Rosenbrock2DFunction import numpy as np x = np.linspace(-2, 2, 100) y = np.linspace(-1, 3, 100) X, Y = np.meshgrid(x, y) Z = RosenbrockFunction(X, Y).__eval__ import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111, projection="3d") ax.plot_surface(X, Y, Z, cmap="viridis") plt.savefig("RosenbrockFunction.png", dpi=300, transparent=True) ``` -------------------------------- ### Log Cosh Line Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Details the Log Cosh Line Function, another function applicable to optimization tasks. A diagram illustrating the function is provided. ```APIDOC ## Log Cosh Line Function ::: umf.functions.optimization.line_shaped.LogCoshLineFunction options: show_bases: false show_source: true show_inherited_members: false allow_inspection: false inheritance_graph: false heading_level: 0 | | | :-------------------------------------------------------------------: | | ![LogCoshLineFunction](../../../extra/images/LogCoshLineFunction.png) | ``` -------------------------------- ### Menger Sponge Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/fractal_set/geometric_fractals.md Represents the Menger Sponge fractal. This class allows for the generation and visualization of the Menger Sponge. ```APIDOC ## Menger Sponge ### Description Represents the Menger Sponge fractal. This class allows for the generation and visualization of the Menger Sponge. ### Class `umf.functions.fractal_set.geometric.MengerSponge` ``` -------------------------------- ### Drop Wave Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Drop Wave function is a multi-modal function with many local minima. It is often used to test the ability of optimization algorithms to escape local optima and find the global minimum. ```APIDOC ## Drop Wave Function This function is characterized by its complex landscape with numerous local minima. ### Usage ```python from umf.functions.optimization.many_local_minima import DropWaveFunction # Instantiate the function drop_wave = DropWaveFunction() # Evaluate the function at a point (e.g., [x, y]) value = drop_wave([1.0, 2.0]) print(f"The value of the Drop Wave function at [1.0, 2.0] is: {value}") ``` ### Mathematical Definition (Image of the DropWaveFunction is available in the documentation, showing its visual representation.) ``` -------------------------------- ### Branin Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/special.md The Branin function is a multi-modal function used for testing global optimization algorithms. It has three local minima and one global minimum. ```APIDOC ## BraninFunction ### Description Represents the Branin function, a popular benchmark for global optimization due to its multiple local minima. ### Class umf.functions.optimization.special.BraninFunction ``` -------------------------------- ### Hyperbolic Isometry Functions Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/hyperbolic.md Provides functions for hyperbolic isometries (transformations that preserve distance). ```APIDOC ## Hyperbolic Isometry Functions This module includes functions representing isometries in hyperbolic geometry, which are transformations that preserve distances. ### Functions - `umf.functions.hyperbolic.isometry.translate(p, v)`: Translates a point by a vector. - `umf.functions.hyperbolic.isometry.rotate(p, center, angle)`: Rotates a point around a center by a given angle. - `umf.functions.hyperbolic.isometry.reflect(p, line)`: Reflects a point across a line. ``` -------------------------------- ### Pythagoras Tree Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/fractal_set/geometric_fractals.md Represents the Pythagoras Tree fractal. This class allows for the generation and visualization of the Pythagoras Tree. ```APIDOC ## Pythagoras Tree ### Description Represents the Pythagoras Tree fractal. This class allows for the generation and visualization of the Pythagoras Tree. ### Class `umf.functions.fractal_set.geometric.PythagorasTree` ``` -------------------------------- ### CauchyLossLineFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Provides a Cauchy loss shaped function for line-shaped optimization. ```APIDOC ## CauchyLossLineFunction This class represents a Cauchy loss shaped function, which is applicable to line-shaped optimization. It offers a robust alternative for objective functions that may be sensitive to outliers. ### Class `umf.functions.optimization.line_shaped.CauchyLossLineFunction` ``` -------------------------------- ### LevyFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Levy function is a popular test function in the field of numerical optimization, characterized by its rugged terrain with many local minima, making it challenging for optimization algorithms. ```APIDOC ## LevyFunction ### Description Represents the Levy function, a benchmark for global optimization with a challenging landscape featuring many local minima. ### Class umf.functions.optimization.many_local_minima.LevyFunction ### Image ![LevyFunction](../../../extra/images/LevyFunction.png) ``` -------------------------------- ### Hyperbolic Distance Functions Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/hyperbolic.md Provides functions for calculating distances in hyperbolic spaces. ```APIDOC ## Hyperbolic Distance Functions This module offers functions to compute distances between points in hyperbolic geometry. ### Functions - `umf.functions.hyperbolic.distance.point_to_point(p1, p2)`: Calculates the hyperbolic distance between two points. - `umf.functions.hyperbolic.distance.point_to_line(p, l)`: Calculates the hyperbolic distance from a point to a line. ``` -------------------------------- ### HolderTableFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Holder Table function is a benchmark function used in global optimization. It is known for its complex structure with many local minima. ```APIDOC ## HolderTableFunction ### Description Represents the Holder Table function, a benchmark for global optimization with a complex landscape. ### Class umf.functions.optimization.many_local_minima.HolderTableFunction ### Image ![HolderTableFunction](../../../extra/images/HolderTableFunction.png) ``` -------------------------------- ### Hyperbolic Geodesic Functions Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/hyperbolic.md Provides functions related to geodesics in hyperbolic geometry. ```APIDOC ## Hyperbolic Geodesic Functions This module deals with geodesics (shortest paths) in hyperbolic spaces. ### Functions - `umf.functions.hyperbolic.geodesic.line_through_points(p1, p2)`: Returns the geodesic line passing through two points. - `umf.functions.hyperbolic.geodesic.parallel_to_line(p, l)`: Returns a geodesic line parallel to a given line passing through a point. ``` -------------------------------- ### Bukin Function N. 6 Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Bukin N. 6 function is a two-dimensional function with a global minimum. It is often used to test the ability of optimization algorithms to handle functions with many local minima and steep gradients. ```APIDOC ## BukinN6Function ### Description Represents the Bukin N. 6 function, a two-dimensional test function with a global minimum. It is known for its complex landscape featuring many local minima and sharp ridges, making it a good benchmark for optimization algorithms. ### Class umf.functions.optimization.many_local_minima.BukinN6Function ### Example ```python from umf.functions.optimization.many_local_minima import BukinN6Function # Instantiate the Bukin N. 6 function bukin_func = BukinN6Function() # Evaluate the function at a point (e.g., [-1.2, 1]) value = bukin_func([-1.2, 1]) print(f"Value at [-1.2, 1]: {value}") ``` ``` -------------------------------- ### Cross-in-Tray Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Cross-in-Tray function is a multimodal function with multiple local minima and four global minima. It is frequently used in the field of global optimization. ```APIDOC ## CrossInTrayFunction ### Description Represents the Cross-in-Tray function, a multimodal function characterized by four global minima and numerous local minima. It serves as a challenging benchmark for global optimization techniques. ### Class umf.functions.optimization.many_local_minima.CrossInTrayFunction ### Example ```python from umf.functions.optimization.many_local_minima import CrossInTrayFunction # Instantiate the Cross-in-Tray function cross_tray_func = CrossInTrayFunction() # Evaluate the function at a point (e.g., [0, 0]) value = cross_tray_func([0, 0]) print(f"Value at [0, 0]: {value}") ``` ``` -------------------------------- ### Schwefel Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Schwefel function is a common benchmark for numerical optimization. It is a multi-modal function with many local minima, making it challenging for optimization algorithms. ```APIDOC ## SchwefelFunction ### Description Represents the Schwefel function, a benchmark for numerical optimization known for its many local minima. ### Usage ```python from umf.functions.optimization.many_local_minima import SchwefelFunction # Instantiate the function schwefel = SchwefelFunction() # Evaluate the function at a point (e.g., a list or numpy array) value = schwefel([1, 2, 3]) print(value) ``` ### Parameters This function typically takes a list or array of numbers as input, representing the coordinates in the search space. ``` -------------------------------- ### Egg Holder Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Egg Holder function is a challenging multi-modal function with a deep global minimum and many local minima. It is frequently used to benchmark optimization algorithms. ```APIDOC ## Egg Holder Function A highly multimodal function known for its sharp, deep global minimum surrounded by many local minima. ### Usage ```python from umf.functions.optimization.many_local_minima import EggHolderFunction # Instantiate the function egg_holder = EggHolderFunction() # Evaluate the function at a point (e.g., [x, y]) value = egg_holder([512, 404.23]) print(f"The value of the Egg Holder function at [512, 404.23] is: {value}") ``` ### Mathematical Definition (Image of the EggHolderFunction is available in the documentation, showing its visual representation.) ``` -------------------------------- ### Cross Quadratic Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md The Cross Quadratic Function is another benchmark function for optimization, featuring a shape that can present difficulties for gradient-based methods. ```APIDOC ## CrossQuadraticFunction ### Description Represents the Cross Quadratic Function. ### Class umf.functions.optimization.bowl_shaped.CrossQuadraticFunction ### Usage ```python # Example usage (assuming the class is imported) # cross_quadratic = CrossQuadraticFunction() # result = cross_quadratic.evaluate(x, y) ``` ``` -------------------------------- ### Hyperbolic Angle Functions Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/hyperbolic.md Provides functions for calculating and manipulating hyperbolic angles. ```APIDOC ## Hyperbolic Angle Functions This module contains functions related to hyperbolic angles. ### Functions - `umf.functions.hyperbolic.angle.sinh(x)`: Calculates the hyperbolic sine of x. - `umf.functions.hyperbolic.angle.cosh(x)`: Calculates the hyperbolic cosine of x. - `umf.functions.hyperbolic.angle.tanh(x)`: Calculates the hyperbolic tangent of x. - `umf.functions.hyperbolic.angle.asinh(x)`: Calculates the inverse hyperbolic sine of x. - `umf.functions.hyperbolic.angle.acosh(x)`: Calculates the inverse hyperbolic cosine of x. - `umf.functions.hyperbolic.angle.atanh(x)`: Calculates the inverse hyperbolic tangent of x. ``` -------------------------------- ### RationalBowlLineFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Represents a rational bowl shaped function for line-shaped optimization. ```APIDOC ## RationalBowlLineFunction This class implements a rational bowl shaped function suitable for line-shaped optimization tasks. It provides a specific mathematical form that can be beneficial in certain optimization scenarios. ### Class `umf.functions.optimization.line_shaped.RationalBowlLineFunction` ``` -------------------------------- ### Many Local Minima Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/optimization.md A function with numerous local minima, designed to test the ability of an optimizer to find the global minimum. ```APIDOC ## Many Local Minima Function ### Description Contains a large number of local minima, challenging algorithms to escape suboptimal solutions and find the global optimum. ### Usage ```python import umf.functions.optimization # Example usage (specific parameters depend on the function's signature) # result = umf.functions.optimization.many_local_minima(x) ``` ``` -------------------------------- ### ElasticNetLineFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Represents the Elastic Net line function, a component used in optimization algorithms. ```APIDOC ## ElasticNetLineFunction ### Description Represents the Elastic Net line function. ### Usage This class is intended for use within optimization routines. ### Source Code ```python class ElasticNetLineFunction: pass ``` ``` -------------------------------- ### De Jong N. 5 Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/drops_steps.md The De Jong N. 5 function is a multi-modal function used for testing optimization algorithms. It is characterized by its many local minima. ```APIDOC ## De Jong N. 5 Function ::: umf.functions.optimization.drops_steps.DeJongN5Function options: show_bases: false show_source: true show_inherited_members: false allow_inspection: false inheritance_graph: false heading_level: 0 | | | :-------------------------------------------------------------: | | ![DeJongN5Function](../../../extra/images/DeJongN5Function.png) | ``` -------------------------------- ### Uniform Mass Center Triangle Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/fractal_set/geometric_fractals.md Represents the Uniform Mass Center Triangle fractal. This class allows for the generation and visualization of this specific triangle fractal. ```APIDOC ## Uniform Mass Center Triangle ### Description Represents the Uniform Mass Center Triangle fractal. This class allows for the generation and visualization of this specific triangle fractal. ### Class `umf.functions.fractal_set.geometric.UniformMassCenterTriangle` ``` -------------------------------- ### Bernoulli Distribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/discrete_finite_support.md The Bernoulli distribution is a discrete probability distribution of a random variable that takes the value 1 (with probability p) and the value 0 (with probability 1-p). ```APIDOC ## BernoulliDistribution ### Description Represents a Bernoulli distribution. ### Probability Mass Function ![BernoulliDistribution](../../../extra/images/BernoulliDistribution.png) ``` -------------------------------- ### Hyperbolic Area Functions Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/hyperbolic.md Provides functions for calculating areas within hyperbolic geometry. ```APIDOC ## Hyperbolic Area Functions This module provides functions for calculating areas in hyperbolic spaces. ### Functions - `umf.functions.hyperbolic.area.triangle_area(a, b, c)`: Calculates the area of a hyperbolic triangle given its side lengths. - `umf.functions.hyperbolic.area.sector_area(r, theta)`: Calculates the area of a hyperbolic sector. ``` -------------------------------- ### Michalewicz Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/drops_steps.md The Michalewicz function is a multi-modal function that is widely used in the field of evolutionary computation. It is known for its complex landscape with many local optima. ```APIDOC ## Michalewicz Function ::: umf.functions.optimization.drops_steps.MichalewiczFunction options: show_bases: false show_source: true show_inherited_members: false allow_inspection: false inheritance_graph: false heading_level: 0 | | | :-------------------------------------------------------------------: | | ![MichalewiczFunction](../../../extra/images/MichalewiczFunction.png) | ``` -------------------------------- ### Styblinski-Tang Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/special.md The Styblinski-Tang function is a non-convex, multi-modal function with many local minima, posing a significant challenge for optimization algorithms. ```APIDOC ## StyblinskiTangFunction ### Description Represents the Styblinski-Tang function, a challenging benchmark with numerous local minima for optimization. ### Class umf.functions.optimization.special.StyblinskiTangFunction ``` -------------------------------- ### RotatedHyperEllipseFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md API documentation for the Rotated Hyper-Ellipsoid function. ```APIDOC ## RotatedHyperEllipseFunction ### Description API documentation for the Rotated Hyper-Ellipsoid function. ### Method Not specified (likely a callable function or method) ### Endpoint Not applicable (SDK/library function) ### Parameters Not specified in the source. ### Request Example Not specified in the source. ### Response Not specified in the source. ``` -------------------------------- ### AbsoluteBowlFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md Represents an absolute value-based bowl function for optimization. ```APIDOC ## AbsoluteBowlFunction ### Description Represents a bowl-shaped function defined using absolute values. This function is characterized by its sharp V-shaped valleys. ### Usage ```python from umf.functions.optimization.bowl_shaped import AbsoluteBowlFunction # Instantiate the function absolute_bowl = AbsoluteBowlFunction() # Evaluate the function at a point (e.g., [x, y]) # result = absolute_bowl.evaluate([x, y]) ``` ### Parameters This class does not take any parameters during initialization. ``` -------------------------------- ### Shubert Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Shubert function is another multi-modal test function with a known global minimum. It is characterized by its numerous local minima. ```APIDOC ## ShubertFunction ### Description Represents the Shubert function, a test function with many local minima and a known global minimum. ### Usage ```python from umf.functions.optimization.many_local_minima import ShubertFunction # Instantiate the function shubert = ShubertFunction() # Evaluate the function at a point (e.g., a list or numpy array) value = shubert([1, 2]) print(value) ``` ### Parameters This function typically takes a list or array of numbers as input, representing the coordinates in the search space. ``` -------------------------------- ### Shifted Identity Square Line Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md API documentation for the Shifted Identity Square Line Function. ```APIDOC ## Shifted Identity Square Line Function ### Description API documentation for the Shifted Identity Square Line Function. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Cosine Mixture Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Cosine Mixture function is designed to have a complex, rugged landscape with many local minima, posing a significant challenge for optimization algorithms. ```APIDOC ## CosineMixtureFunction ### Description Represents the Cosine Mixture function, characterized by a rugged landscape with numerous local minima. ### Usage ```python from umf.functions.optimization.many_local_minima import CosineMixtureFunction # Instantiate the function cosine_mixture = CosineMixtureFunction() # Evaluate the function at a point (e.g., a list or numpy array) value = cosine_mixture([0.5, -1.5]) print(value) ``` ### Parameters This function typically takes a list or array of numbers as input, representing the coordinates in the search space. ``` -------------------------------- ### Himmelblau Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/special.md The Himmelblau function is a multi-modal function with four local minima, often used to test the ability of algorithms to find global optima. ```APIDOC ## HimmelblauFunction ### Description Represents the Himmelblau function, known for its multiple local minima, making it a good test case for global optimization. ### Class umf.functions.optimization.special.HimmelblauFunction ``` -------------------------------- ### Exponential Square Line Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Represents the Exponential Square Line Function, a component used in optimization algorithms. It includes a visual representation of the function's shape. ```APIDOC ## Exponential Square Line Function ::: umf.functions.optimization.line_shaped.ExponentialSquareLineFunction options: show_bases: false show_source: true show_inherited_members: false allow_inspection: false inheritance_graph: false heading_level: 0 | | | :---------------------------------------------------------------------------------------: | | ![ExponentialSquareLineFunction](../../../extra/images/ExponentialSquareLineFunction.png) | ``` -------------------------------- ### Easom Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/drops_steps.md The Easom function is a highly multimodal function with a single global minimum. It is often used to test the ability of optimization algorithms to escape local minima. ```APIDOC ## Easom Function ::: umf.functions.optimization.drops_steps.EasomFunction options: show_bases: false show_source: true show_inherited_members: false allow_inspection: false inheritance_graph: false heading_level: 0 | | | :-------------------------------------------------------: | | ![EasomFunction](../../../extra/images/EasomFunction.png) | ``` -------------------------------- ### RippleBowlFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md Represents a ripple-shaped bowl function used in optimization. ```APIDOC ## RippleBowlFunction ### Description Represents a ripple-shaped bowl function. This function is often used as a test case in optimization algorithms due to its complex landscape. ### Usage ```python from umf.functions.optimization.bowl_shaped import RippleBowlFunction # Instantiate the function ripple_bowl = RippleBowlFunction() # Evaluate the function at a point (e.g., [x, y]) # result = ripple_bowl.evaluate([x, y]) ``` ### Parameters This class does not take any parameters during initialization. ``` -------------------------------- ### EllipticAbsoluteRootFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md Represents an elliptic bowl function incorporating absolute values and roots. ```APIDOC ## EllipticAbsoluteRootFunction ### Description Represents an elliptic bowl function that includes absolute value and root operations. This function provides a more complex optimization landscape. ### Usage ```python from umf.functions.optimization.bowl_shaped import EllipticAbsoluteRootFunction # Instantiate the function elliptic_root_bowl = EllipticAbsoluteRootFunction() # Evaluate the function at a point (e.g., [x, y]) # result = elliptic_root_bowl.evaluate([x, y]) ``` ### Parameters This class does not take any parameters during initialization. ``` -------------------------------- ### Sierpinski Carpet Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/fractal_set/geometric_fractals.md Represents the Sierpinski Carpet fractal. This class allows for the generation and visualization of the Sierpinski Carpet. ```APIDOC ## Sierpinski Carpet ### Description Represents the Sierpinski Carpet fractal. This class allows for the generation and visualization of the Sierpinski Carpet. ### Class `umf.functions.fractal_set.geometric.SierpinskiCarpet` ``` -------------------------------- ### Goldstein-Price Log Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/special.md A logarithmic variant of the Goldstein-Price function, potentially offering different numerical properties for optimization. ```APIDOC ## GoldsteinPriceLogFunction ### Description Represents the logarithmic version of the Goldstein-Price function. ### Class umf.functions.optimization.special.GoldsteinPriceLogFunction ``` -------------------------------- ### Identity Square Line Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md API documentation for the Identity Square Line Function. ```APIDOC ## Identity Square Line Function ### Description API documentation for the Identity Square Line Function. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### BohachevskyFunctionType1 Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md API documentation for Bohachevsky Function Type 1. ```APIDOC ## BohachevskyFunctionType1 ### Description API documentation for Bohachevsky Function Type 1. ### Method Not specified (likely a callable function or method) ### Endpoint Not applicable (SDK/library function) ### Parameters Not specified in the source. ### Request Example Not specified in the source. ### Response Not specified in the source. ``` -------------------------------- ### LangermannFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Langermann function is a multi-dimensional function often used to test the capabilities of optimization algorithms, particularly in finding global optima within complex search spaces. ```APIDOC ## LangermannFunction ### Description Represents the Langermann function, a benchmark for global optimization known for its numerous local minima. ### Class umf.functions.optimization.many_local_minima.LangermannFunction ### Image ![LangermannFunction](../../../extra/images/LangermannFunction.png) ``` -------------------------------- ### BohachevskyFunctionType2 Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md API documentation for Bohachevsky Function Type 2. ```APIDOC ## BohachevskyFunctionType2 ### Description API documentation for Bohachevsky Function Type 2. ### Method Not specified (likely a callable function or method) ### Endpoint Not applicable (SDK/library function) ### Parameters Not specified in the source. ### Request Example Not specified in the source. ### Response Not specified in the source. ``` -------------------------------- ### plot.save_gif Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/export/gifs.md Saves the current plot as an animated GIF. This method allows for exporting dynamic visualizations. ```APIDOC ## plot.save_gif ### Description Saves the plot as an animated GIF. ### Method `plot.save_gif` ### Parameters This method does not explicitly list parameters in the provided documentation, but it is called on a plot object. ### Request Example ```python # Assuming 'plot' is an instance of a plot object plot.save_gif() ``` ### Response This method does not return a value but saves a file. #### Success Response - A GIF file is generated and saved to disk. #### Response Example No specific response body is detailed, but the output is a GIF file. ``` -------------------------------- ### Maxwell-Boltzmann Distribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/discrete_infinite_support.md The Maxwell-Boltzmann distribution is a discrete probability distribution. This section provides its Probability Mass Function (PMF) and Cumulative Density Function (CDF). ```APIDOC ## Maxwell-Boltzmann Distribution ### Description The Maxwell-Boltzmann distribution is a discrete probability distribution. This documentation provides its Probability Mass Function (PMF) and Cumulative Density Function (CDF). ### Probability Mass Function (PMF) ![MaxwellBoltzmannDistribution](../../../extra/images/MaxwellBoltzmannDistribution.png) ### Cumulative Density Function (CDF) ![MaxwellBoltzmannDistribution-CML](../../../extra/images/MaxwellBoltzmannDistribution-cml.png) ``` -------------------------------- ### Boltzmann Distribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/discrete_infinite_support.md The Boltzmann distribution is a discrete probability distribution used in statistical mechanics. This section provides its Probability Mass Function (PMF). ```APIDOC ## Boltzmann Distribution ### Description The Boltzmann distribution is a discrete probability distribution. This documentation provides its Probability Mass Function (PMF). ### Probability Mass Function (PMF) ![BoltzmannDistribution](../../../extra/images/BoltzmannDistribution.png) ``` -------------------------------- ### ArctanSquareLineFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Implements an arctangent square shaped function for line-shaped optimization. ```APIDOC ## ArctanSquareLineFunction This class defines an arctangent square shaped function, designed for use in line-shaped optimization problems. Its properties make it useful for modeling specific types of objective functions. ### Class `umf.functions.optimization.line_shaped.ArctanSquareLineFunction` ``` -------------------------------- ### GaussianValleyLineFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Represents the Gaussian Valley line function, suitable for specific optimization landscapes. ```APIDOC ## GaussianValleyLineFunction ### Description Represents the Gaussian Valley line function. ### Usage This class is intended for use within optimization routines. ### Source Code ```python class GaussianValleyLineFunction: pass ``` ``` -------------------------------- ### Elliptic Paraboloid Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/bowl_shaped.md Represents the Elliptic Paraboloid Function, a simple quadratic bowl-shaped function. ```APIDOC ## EllipticParaboloidFunction ### Description Represents the Elliptic Paraboloid Function. ### Class umf.functions.optimization.bowl_shaped.EllipticParaboloidFunction ``` -------------------------------- ### Gaus Kuzmin Distribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/discrete_infinite_support.md The Gaus-Kuzmin distribution is a discrete probability distribution. This section provides its Probability Mass Function (PMF) and Cumulative Density Function (CDF). ```APIDOC ## Gaus Kuzmin Distribution ### Description The Gaus-Kuzmin distribution is a discrete probability distribution. This documentation provides its Probability Mass Function (PMF) and Cumulative Density Function (CDF). ### Probability Mass Function (PMF) ![GausKuzminDistribution](../../../extra/images/GausKuzminDistribution.png) ### Cumulative Density Function (CDF) ![GausKuzminDistribution-CML](../../../extra/images/GausKuzminDistribution-cml.png) ``` -------------------------------- ### Ackley Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/many_local_minima.md The Ackley function is a non-convex function that has a global minimum at (0,0) and is used for testing optimization algorithms. It is characterized by many local minima. ```APIDOC ## AckleyFunction ### Description Represents the Ackley function, known for its numerous local minima and a single global minimum at the origin. Useful for evaluating the performance of optimization algorithms. ### Class umf.functions.optimization.many_local_minima.AckleyFunction ### Example ```python from umf.functions.optimization.many_local_minima import AckleyFunction # Instantiate the Ackley function ackley_func = AckleyFunction() # Evaluate the function at a point (e.g., [0, 0]) value = ackley_func([0, 0]) print(f"Value at [0, 0]: {value}") ``` ``` -------------------------------- ### ShiftedElasticLineFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Represents the Shifted Elastic line function, a variation of the Elastic Net line function. ```APIDOC ## ShiftedElasticLineFunction ### Description Represents the Shifted Elastic line function. ### Usage This class is intended for use within optimization routines. ### Source Code ```python class ShiftedElasticLineFunction: pass ``` ``` -------------------------------- ### WrappedAsymLaplaceDistribution Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/distributions/continuous_2pi_interval.md Represents the Wrapped Asymmetric Laplace Distribution, a circular distribution derived from the asymmetric Laplace distribution. It is defined over the interval [0, 2π). ```APIDOC ## WrappedAsymLaplaceDistribution ### Description Represents the Wrapped Asymmetric Laplace Distribution, a circular distribution derived from the asymmetric Laplace distribution. It is defined over the interval [0, 2π). ### Probability Density Function ![WrappedAsymmetricLaplaceDistribution](../../../extra/images/WrappedAsymLaplaceDistribution.png) ``` -------------------------------- ### Beale Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/special.md The Beale function is a non-convex function used for testing optimization algorithms. It has a global minimum at (3, 0.5). ```APIDOC ## BealeFunction ### Description Represents the Beale function, a common benchmark for non-convex optimization. ### Class umf.functions.optimization.special.BealeFunction ``` -------------------------------- ### Bowl Shaped Function Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/api/optimization.md Represents a simple bowl-shaped function, often used as a basic test case for optimization algorithms. ```APIDOC ## Bowl Shaped Function ### Description Provides a basic bowl-shaped function for optimization testing. ### Usage ```python import umf.functions.optimization # Example usage (specific parameters depend on the function's signature) # result = umf.functions.optimization.bowl_shaped(x) ``` ``` -------------------------------- ### TiltedParabolaRippleLineFunction Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/optimization/line_shaped.md Represents a Tilted Parabola Ripple function for line-shaped optimization. It is defined by the `umf.functions.optimization.line_shaped.TiltedParabolaRippleLineFunction` class. ```APIDOC ## TiltedParabolaRippleLineFunction ### Description Represents a Tilted Parabola Ripple function for line-shaped optimization. ### Class umf.functions.optimization.line_shaped.TiltedParabolaRippleLineFunction ``` -------------------------------- ### Sierpinski Triangle Source: https://github.com/anselmoo/useful-math-functions/blob/main/docs/modules/functions/fractal_set/geometric_fractals.md Represents the Sierpinski Triangle fractal. This class allows for the generation and visualization of the Sierpinski Triangle. ```APIDOC ## Sierpinski Triangle ### Description Represents the Sierpinski Triangle fractal. This class allows for the generation and visualization of the Sierpinski Triangle. ### Class `umf.functions.fractal_set.geometric.SierpinskiTriangle` ```