Skip to content

Commit

Permalink
ENH updates for v2.2.0 (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr authored Jun 8, 2018
1 parent c7be547 commit a86fa34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
## [2.2.0] - 2018-06-07

### Added

- Added `prediction_gradient` method for understanding the impact of different
features in MLPs with dense inputs.
- Added support for SELU activations with alpha dropout.
- Added sample weights for the `FMClassifier`.
- Added `FMRegressor`.

### Fixed

- Exposed `muffnn.__version__`.
- Fixed bug in `FMClassifier` where it failed for predicting one example.
- Fixed ValueError for type of target in MLPClassifier and FMClassifier (#90).
- Fixed ValueError for type of target in `MLPClassifier` and `FMClassifier` (#90).

### Changed

Expand Down
2 changes: 1 addition & 1 deletion muffnn/mlp/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def _csr_data(X):
values : numpy array with shape (X.nnz)
describing the values at each index
"""
indices = np.zeros((X.nnz, 2))
indices = np.zeros((X.nnz, 2), dtype=np.int64)
values = np.zeros(X.nnz)
i = 0
for row_idx in range(X.shape[0]):
Expand Down
6 changes: 4 additions & 2 deletions muffnn/mlp/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def _init_model_objective_fn(self, t):
def test_make_feed_dict_csr():
X = scipy.sparse.csr_matrix((
np.array([1, 2, 3, 4, 5, 6]),
(np.array([0, 0, 1, 2, 2, 2]), np.array([0, 2, 2, 0, 1, 2]))),
(np.array([0, 0, 1, 2, 2, 2], dtype=np.int64),
np.array([0, 2, 2, 0, 1, 2], dtype=np.int64))),
shape=(3, 3))
y = np.array([1, 2, 3])

Expand All @@ -76,7 +77,8 @@ def test_make_feed_dict_csr():
def test_make_feed_dict_other():
X = scipy.sparse.coo_matrix((
np.array([1, 2, 3, 4, 5, 6]),
(np.array([0, 0, 1, 2, 2, 2]), np.array([0, 2, 2, 0, 1, 2]))),
(np.array([0, 0, 1, 2, 2, 2], dtype=np.int64),
np.array([0, 2, 2, 0, 1, 2], dtype=np.int64))),
shape=(3, 3))
y = np.array([1, 2, 3])

Expand Down
2 changes: 1 addition & 1 deletion muffnn/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Note that this file will be executed by setup.py.
__version__ = '2.1.0'
__version__ = '2.2.0'

0 comments on commit a86fa34

Please sign in to comment.