Skip to content

Commit

Permalink
IGNITE-10380: Drop Multi-label Classification for
Browse files Browse the repository at this point in the history
Logistic Regression and SVM

This closes #5559
  • Loading branch information
zaleslaw authored and ybabak committed Dec 5, 2018
1 parent 46ff268 commit 098caf4
Show file tree
Hide file tree
Showing 34 changed files with 64 additions and 1,599 deletions.
Expand Up @@ -30,7 +30,7 @@
import org.apache.ignite.ml.nn.UpdatesStrategy; import org.apache.ignite.ml.nn.UpdatesStrategy;
import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate; import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate;
import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator; import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator;
import org.apache.ignite.ml.regressions.logistic.binomial.LogisticRegressionSGDTrainer; import org.apache.ignite.ml.regressions.logistic.LogisticRegressionSGDTrainer;
import org.apache.ignite.ml.selection.cv.CrossValidation; import org.apache.ignite.ml.selection.cv.CrossValidation;
import org.apache.ignite.ml.selection.scoring.metric.Accuracy; import org.apache.ignite.ml.selection.scoring.metric.Accuracy;
import org.apache.ignite.ml.trainers.DatasetTrainer; import org.apache.ignite.ml.trainers.DatasetTrainer;
Expand Down
Expand Up @@ -31,8 +31,8 @@
import org.apache.ignite.ml.nn.UpdatesStrategy; import org.apache.ignite.ml.nn.UpdatesStrategy;
import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate; import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDParameterUpdate;
import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator; import org.apache.ignite.ml.optimization.updatecalculators.SimpleGDUpdateCalculator;
import org.apache.ignite.ml.regressions.logistic.binomial.LogisticRegressionModel; import org.apache.ignite.ml.regressions.logistic.LogisticRegressionModel;
import org.apache.ignite.ml.regressions.logistic.binomial.LogisticRegressionSGDTrainer; import org.apache.ignite.ml.regressions.logistic.LogisticRegressionSGDTrainer;


/** /**
* Run logistic regression model based on <a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent"> * Run logistic regression model based on <a href="https://en.wikipedia.org/wiki/Stochastic_gradient_descent">
Expand Down

This file was deleted.

This file was deleted.

Expand Up @@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */


package org.apache.ignite.examples.ml.svm.binary; package org.apache.ignite.examples.ml.svm;


import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.util.Arrays; import java.util.Arrays;
Expand All @@ -28,11 +28,11 @@
import org.apache.ignite.examples.ml.util.MLSandboxDatasets; import org.apache.ignite.examples.ml.util.MLSandboxDatasets;
import org.apache.ignite.examples.ml.util.SandboxMLCache; import org.apache.ignite.examples.ml.util.SandboxMLCache;
import org.apache.ignite.ml.math.primitives.vector.Vector; import org.apache.ignite.ml.math.primitives.vector.Vector;
import org.apache.ignite.ml.svm.SVMLinearBinaryClassificationModel; import org.apache.ignite.ml.svm.SVMLinearClassificationModel;
import org.apache.ignite.ml.svm.SVMLinearBinaryClassificationTrainer; import org.apache.ignite.ml.svm.SVMLinearClassificationTrainer;


/** /**
* Run SVM binary-class classification model ({@link SVMLinearBinaryClassificationModel}) over distributed dataset. * Run SVM binary-class classification model ({@link SVMLinearClassificationModel}) over distributed dataset.
* <p> * <p>
* Code in this example launches Ignite grid and fills the cache with test data points (based on the * Code in this example launches Ignite grid and fills the cache with test data points (based on the
* <a href="https://en.wikipedia.org/wiki/Iris_flower_data_set"></a>Iris dataset</a>).</p> * <a href="https://en.wikipedia.org/wiki/Iris_flower_data_set"></a>Iris dataset</a>).</p>
Expand All @@ -57,9 +57,9 @@ public static void main(String[] args) throws FileNotFoundException {
IgniteCache<Integer, Vector> dataCache = new SandboxMLCache(ignite) IgniteCache<Integer, Vector> dataCache = new SandboxMLCache(ignite)
.fillCacheWith(MLSandboxDatasets.TWO_CLASSED_IRIS); .fillCacheWith(MLSandboxDatasets.TWO_CLASSED_IRIS);


SVMLinearBinaryClassificationTrainer trainer = new SVMLinearBinaryClassificationTrainer(); SVMLinearClassificationTrainer trainer = new SVMLinearClassificationTrainer();


SVMLinearBinaryClassificationModel mdl = trainer.fit( SVMLinearClassificationModel mdl = trainer.fit(
ignite, ignite,
dataCache, dataCache,
(k, v) -> v.copyOfRange(1, v.size()), (k, v) -> v.copyOfRange(1, v.size()),
Expand Down

This file was deleted.

0 comments on commit 098caf4

Please sign in to comment.