Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api/remove ml #431

Merged
merged 10 commits into from
Dec 12, 2019
4 changes: 2 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ignore:
- "heat/ml/regression/lasso/demo.py"
- "heat/ml/regression/lasso/plotfkt.py"
- "heat/core/regression/lasso/demo.py"
- "heat/core/regression/lasso/plotfkt.py"
- "heat/examples/*"
3 changes: 2 additions & 1 deletion heat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from . import core
from .core import *
from .core import __version__
from . import ml
from .core import cluster
from .core import regression
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ def test_fit_iris(self):

# fit the clusters
k = 3
kmeans = ht.ml.cluster.KMeans(n_clusters=k)
kmeans = ht.cluster.KMeans(n_clusters=k)
kmeans.fit(iris)

# check whether the results are correct
self.assertIsInstance(kmeans.cluster_centers_, ht.DNDarray)
self.assertEqual(kmeans.cluster_centers_.shape, (k, iris.shape[1]))
# same test with init=kmeans++
kmeans = ht.ml.cluster.KMeans(n_clusters=k, init="kmeans++")
kmeans = ht.cluster.KMeans(n_clusters=k, init="kmeans++")
kmeans.fit(iris)

# check whether the results are correct
Expand Down
File renamed without changes.
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_lasso(self):
X = X / ht.sqrt((ht.mean(X ** 2, axis=0)))
m, n = X.shape
# HeAT lasso instance
estimator = ht.ml.regression.lasso.HeatLasso(max_iter=100, tol=None)
estimator = ht.regression.lasso.HeatLasso(max_iter=100, tol=None)
# check whether the results are correct
self.assertEqual(estimator.lam, 0.1)
self.assertTrue(estimator.theta is None)
Expand Down Expand Up @@ -52,7 +52,7 @@ def test_lasso(self):
X = X / torch.sqrt((torch.mean(X ** 2, 0)))
m, n = X.shape

estimator = ht.ml.regression.lasso.PytorchLasso(max_iter=100, tol=None)
estimator = ht.regression.lasso.PytorchLasso(max_iter=100, tol=None)
# check whether the results are correct
self.assertEqual(estimator.lam, 0.1)
self.assertTrue(estimator.theta is None)
Expand Down Expand Up @@ -88,7 +88,7 @@ def test_lasso(self):
X = X / np.sqrt((np.mean(X ** 2, axis=0, keepdims=True)))
m, n = X.shape

estimator = ht.ml.regression.lasso.NumpyLasso(max_iter=100, tol=None)
estimator = ht.regression.lasso.NumpyLasso(max_iter=100, tol=None)
# check whether the results are correct
self.assertEqual(estimator.lam, 0.1)
self.assertTrue(estimator.theta is None)
Expand Down
2 changes: 0 additions & 2 deletions heat/ml/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

setup(
name="heat",
packages=["heat", "heat.core", "heat.ml", "heat.ml.cluster"],
packages=["heat", "heat.core"], # , "heat.core.cluster", "heat.core.regression"],
data_files=["README.md", "LICENSE"],
version=version.__version__,
description="A framework for high performance data analytics and machine learning.",
Expand Down