Skip to content

Commit

Permalink
Fixed docs
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Jun 20, 2023
1 parent debffb1 commit 8b06c45
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@
"n_features_x",
"n_features_y",
"n_features_z",
'n_neighbors', 'one',
"n_neighbors",
"one",
}

# validation
Expand Down
20 changes: 11 additions & 9 deletions sktree/experimental/mutual_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ def mutual_info_ksg(
The number of neighbors to use in defining the radius, by default 0.2.
metric : str
Any distance metric accepted by :class:`sklearn.neighbors.NearestNeighbors`.
If 'forest' (default), then uses an :class:`UnsupervisedObliqueRandomForest`
to compute geodesic distances.
If 'forest' (default), then uses an
:class:`sktree.UnsupervisedObliqueRandomForest` to compute geodesic distances.
algorithm : str, optional
Method to use, by default 'knn'. Can be ('ball_tree', 'kd_tree', 'brute').
n_jobs : int, optional
Expand All @@ -190,14 +190,16 @@ def mutual_info_ksg(
4. Get the number of NN in Z subspace within radius 'r'
5. Apply analytic solution for KSG estimate
For MI :footcite:`Kraskov_2004`, the analytical solution is::
.. math::
For MI, the analytical solution is:
.. math::
\\psi(k) - E[(\\psi(n_x) + \\psi(n_y))] + \\psi(n)
For CMI :footcite:`Frenzel2007`m the analytical solution is::
.. math::
For CMI, the analytical solution is:
.. math::
\\psi(k) - E[(\\psi(n_{xz}) + \\psi(n_{yz}) - \\psi(n_{z}))]
where :math:`\\psi` is the DiGamma function, and each expectation term
Expand Down Expand Up @@ -372,8 +374,8 @@ def _compute_nn(
Method to use, by default 'knn'. Can be ('ball_tree', 'kd_tree', 'brute').
metric : str
Any distance metric accepted by :class:`sklearn.neighbors.NearestNeighbors`.
If 'forest', then uses an :class:`UnsupervisedObliqueRandomForest` to compute
geodesic distances.
If 'forest', then uses an :class:`sktree.UnsupervisedObliqueRandomForest`
to compute geodesic distances.
k : int, optional
The number of k-nearest neighbors to query, by default 1.
n_jobs : int,
Expand Down
2 changes: 1 addition & 1 deletion sktree/experimental/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def simulate_helix(
The value of the smallest radius, by default 0.0.
radius_b : int, optional
The value of the largest radius, by default 1.0
obs_noise_func : scipy.stats.distribution, optional
obs_noise_func : Callable, optional
By default None, which defaults to a Uniform distribution from
(-0.005, 0.005). If passed in, then must be a callable that when
called returns a random number denoting the noise.
Expand Down
2 changes: 1 addition & 1 deletion sktree/neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def fit(self, X, y=None):
Returns
-------
self : NearestNeighborsMetaEstimator
self : object
Fitted estimator.
"""
X, y = self._validate_data(X, y, accept_sparse="csc")
Expand Down

0 comments on commit 8b06c45

Please sign in to comment.