Skip to content

Commit

Permalink
renamed namespace to mlrose_hiive
Browse files Browse the repository at this point in the history
  • Loading branch information
hiive committed Feb 17, 2020
1 parent 032ae20 commit 2840992
Show file tree
Hide file tree
Showing 92 changed files with 207 additions and 207 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__pycache__/*
tests/__pycache__/*
mlrose/__pycache__/*
mlrose_hiive/__pycache__/*

build/*
mlrose.egg-info/*
Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# -- Project information -----------------------------------------------------

project = 'mlrose'
project = 'mlrose_hiive'
copyright = '2019, Genevieve Hayes'
author = 'Genevieve Hayes'

Expand Down Expand Up @@ -140,7 +140,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'mlrose.tex', 'mlrose Documentation',
(master_doc, 'mlrose_hiive.tex', 'mlrose_hiive Documentation',
'Genevieve Hayes', 'manual'),
]

Expand All @@ -150,7 +150,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'mlrose', 'mlrose Documentation',
(master_doc, 'mlrose_hiive', 'mlrose_hiive Documentation',
[author], 1)
]

Expand All @@ -161,8 +161,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'mlrose', 'mlrose Documentation',
author, 'mlrose', 'One line description of project.',
(master_doc, 'mlrose_hiive', 'mlrose_hiive Documentation',
author, 'mlrose_hiive', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from mlrose.algorithms.crossovers._crossover_base import _CrossOverBase
from mlrose_hiive.algorithms.crossovers._crossover_base import _CrossOverBase


class OnePointCrossOver(_CrossOverBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import numpy as np

from mlrose.algorithms.crossovers._crossover_base import _CrossOverBase
from mlrose_hiive.algorithms.crossovers._crossover_base import _CrossOverBase


class TSPCrossOver(_CrossOverBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from mlrose.algorithms.crossovers._crossover_base import _CrossOverBase
from mlrose_hiive.algorithms.crossovers._crossover_base import _CrossOverBase


class UniformCrossOver(_CrossOverBase):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class ArithDecay:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> schedule = mlrose.ArithDecay(init_temp=10, decay=0.95, min_temp=1)
>>> import mlrose_hiive
>>> schedule = mlrose_hiive.ArithDecay(init_temp=10, decay=0.95, min_temp=1)
>>> schedule.evaluate(5)
5.25
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ class CustomSchedule:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> def custom(t, c): return t + c
>>> kwargs = {'c': 10}
>>> schedule = mlrose.CustomSchedule(custom, **kwargs)
>>> schedule = mlrose_hiive.CustomSchedule(custom, **kwargs)
>>> schedule.evaluate(5)
15
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class ExpDecay:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> schedule = mlrose.ExpDecay(init_temp=10, exp_const=0.05, min_temp=1)
>>> import mlrose_hiive
>>> schedule = mlrose_hiive.ExpDecay(init_temp=10, exp_const=0.05, min_temp=1)
>>> schedule.evaluate(5)
7.78800...
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class GeomDecay:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> schedule = mlrose.GeomDecay(init_temp=10, decay=0.95, min_temp=1)
>>> import mlrose_hiive
>>> schedule = mlrose_hiive.GeomDecay(init_temp=10, decay=0.95, min_temp=1)
>>> schedule.evaluate(5)
7.73780...
"""
Expand Down
2 changes: 1 addition & 1 deletion mlrose/algorithms/ga.py → mlrose_hiive/algorithms/ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from mlrose.decorators import short_name
from mlrose_hiive.decorators import short_name


def _get_hamming_distance_default(population, p1):
Expand Down
4 changes: 2 additions & 2 deletions mlrose/algorithms/gd.py → mlrose_hiive/algorithms/gd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import numpy as np

from mlrose.decorators import short_name
from mlrose.neural.utils import flatten_weights
from mlrose_hiive.decorators import short_name
from mlrose_hiive.neural.utils import flatten_weights


@short_name('gd')
Expand Down
2 changes: 1 addition & 1 deletion mlrose/algorithms/hc.py → mlrose_hiive/algorithms/hc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from mlrose.decorators import short_name
from mlrose_hiive.decorators import short_name


@short_name('hc')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from mlrose.decorators import short_name
from mlrose_hiive.decorators import short_name


@short_name('mimic')
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License: BSD 3 clause
import numpy as np

from mlrose.algorithms.mutators._mutator_base import _MutatorBase
from mlrose_hiive.algorithms.mutators._mutator_base import _MutatorBase


class ChangeOneMutator(_MutatorBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License: BSD 3 clause
import numpy as np

from mlrose.algorithms.mutators._mutator_base import _MutatorBase
from mlrose_hiive.algorithms.mutators._mutator_base import _MutatorBase


class DiscreteMutator(_MutatorBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License: BSD 3 clause
import numpy as np

from mlrose.algorithms.mutators._mutator_base import _MutatorBase
from mlrose_hiive.algorithms.mutators._mutator_base import _MutatorBase


class ShiftOneMutator(_MutatorBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License: BSD 3 clause
import numpy as np

from mlrose.algorithms.mutators._mutator_base import _MutatorBase
from mlrose_hiive.algorithms.mutators._mutator_base import _MutatorBase


class SwapMutator(_MutatorBase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np

from mlrose.decorators import short_name
from mlrose_hiive.decorators import short_name


@short_name('rhc')
Expand Down
6 changes: 3 additions & 3 deletions mlrose/algorithms/sa.py → mlrose_hiive/algorithms/sa.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import numpy as np

from mlrose.algorithms.decay import GeomDecay
from mlrose.decorators import short_name
from mlrose_hiive.algorithms.decay import GeomDecay
from mlrose_hiive.decorators import short_name


@short_name('sa')
Expand All @@ -23,7 +23,7 @@ def simulated_annealing(problem, schedule=GeomDecay(), max_attempts=10,
Object containing fitness function optimization problem to be solved.
For example, :code:`DiscreteOpt()`, :code:`ContinuousOpt()` or
:code:`TSPOpt()`.
schedule: schedule object, default: :code:`mlrose.GeomDecay()`
schedule: schedule object, default: :code:`mlrose_hiive.GeomDecay()`
Schedule used to determine the value of the temperature parameter.
max_attempts: int, default: 10
Maximum number of attempts to find a better neighbor at each step.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ class ContinuousPeaks:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> fitness = mlrose.ContinuousPeaks(t_pct=0.15)
>>> fitness = mlrose_hiive.ContinuousPeaks(t_pct=0.15)
>>> state = np.array([0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1])
>>> fitness.evaluate(state)
17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ class CustomFitness:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> def cust_fn(state, c): return c*np.sum(state)
>>> kwargs = {'c': 10}
>>> fitness = mlrose.CustomFitness(cust_fn, **kwargs)
>>> fitness = mlrose_hiive.CustomFitness(cust_fn, **kwargs)
>>> state = np.array([1, 2, 3, 4, 5])
>>> fitness.evaluate(state)
150
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ class FlipFlop:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> fitness = mlrose.FlipFlop()
>>> fitness = mlrose_hiive.FlipFlop()
>>> state = np.array([0, 1, 0, 1, 1, 1, 1])
>>> fitness.evaluate(state)
3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np

from mlrose.fitness._discrete_peaks_base import _DiscretePeaksBase
from mlrose_hiive.fitness._discrete_peaks_base import _DiscretePeaksBase


class FourPeaks(_DiscretePeaksBase):
Expand Down Expand Up @@ -35,9 +35,9 @@ class FourPeaks(_DiscretePeaksBase):
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> fitness = mlrose.FourPeaks(t_pct=0.15)
>>> fitness = mlrose_hiive.FourPeaks(t_pct=0.15)
>>> state = np.array([1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0])
>>> fitness.evaluate(state)
16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ class Knapsack:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> weights = [10, 5, 2, 8, 15]
>>> values = [1, 2, 3, 4, 5]
>>> max_weight_pct = 0.6
>>> fitness = mlrose.Knapsack(weights, values, max_weight_pct)
>>> fitness = mlrose_hiive.Knapsack(weights, values, max_weight_pct)
>>> state = np.array([1, 0, 2, 1, 0])
>>> fitness.evaluate(state)
11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ class MaxKColor:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> edges = [(0, 1), (0, 2), (0, 4), (1, 3), (2, 0), (2, 3), (3, 4)]
>>> fitness = mlrose.MaxKColor(edges)
>>> fitness = mlrose_hiive.MaxKColor(edges)
>>> state = np.array([0, 1, 0, 1, 1])
>>> fitness.evaluate(state)
3
Expand Down
4 changes: 2 additions & 2 deletions mlrose/fitness/one_max.py → mlrose_hiive/fitness/one_max.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class OneMax:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> fitness = mlrose.OneMax()
>>> fitness = mlrose_hiive.OneMax()
>>> state = np.array([0, 1, 0, 1, 1, 1, 1])
>>> fitness.evaluate(state)
5
Expand Down
4 changes: 2 additions & 2 deletions mlrose/fitness/queens.py → mlrose_hiive/fitness/queens.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class Queens:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> fitness = mlrose.Queens()
>>> fitness = mlrose_hiive.Queens()
>>> state = np.array([1, 4, 1, 3, 5, 5, 2, 7])
>>> fitness.evaluate(state)
6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np

from mlrose.fitness._discrete_peaks_base import _DiscretePeaksBase
from mlrose_hiive.fitness._discrete_peaks_base import _DiscretePeaksBase


class SixPeaks(_DiscretePeaksBase):
Expand Down Expand Up @@ -36,9 +36,9 @@ class SixPeaks(_DiscretePeaksBase):
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> fitness = mlrose.SixPeaks(t_pct=0.15)
>>> fitness = mlrose_hiive.SixPeaks(t_pct=0.15)
>>> state = np.array([0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1])
>>> fitness.evaluate(state)
12
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ class TravellingSales:
.. highlight:: python
.. code-block:: python
>>> import mlrose
>>> import mlrose_hiive
>>> import numpy as np
>>> coords = [(0, 0), (3, 0), (3, 2), (2, 4), (1, 3)]
>>> dists = [(0, 1, 3), (0, 2, 5), (0, 3, 1), (0, 4, 7), (1, 3, 6),
(4, 1, 9), (2, 3, 8), (2, 4, 2), (3, 2, 8), (3, 4, 4)]
>>> fitness_coords = mlrose.TravellingSales(coords=coords)
>>> fitness_coords = mlrose_hiive.TravellingSales(coords=coords)
>>> state = np.array([0, 1, 4, 3, 2])
>>> fitness_coords.evaluate(state)
13.86138...
>>> fitness_dists = mlrose.TravellingSales(distances=dists)
>>> fitness_dists = mlrose_hiive.TravellingSales(distances=dists)
>>> fitness_dists.evaluate(state)
29
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import numpy as np

from mlrose import FlipFlopOpt
from mlrose_hiive import FlipFlopOpt


class FlipFlopGenerator:
Expand Down
Loading

0 comments on commit 2840992

Please sign in to comment.