Question: When I see machine learning, specially the classification, I find that some algorithm are designed to classify , for example, the Decision tree, to classify without the consideration as described next:

For a two categories problem, category A and B, people are interested in a special one, for example the category A. For this case, assume that we have 100 for A and 1000 for B. A good classify may have a result that mixed 100A and 100B as a part and let 900B another part. This is good for classify . But is there a algorithm can pick, for example , 50A and 5 B to a part and 50 A and 995 B for another part. This may not so good as a view of classify, but if some one is interested in category A, I think that next algorithm can give a more pure A result so it is better.

In short, it means is there a algorithm can pure a special category, not to classify them with no bias?

If scikit-learn have included this algorithm, it is be better.

Answer: 
I have no privilege to write comments, so can't estimate what you actually want. But the resulting effect may be the thing you want.

But have look up below examples ([live here](http://dilaraism.me.pn/test/36529547/index.html)). Enter a number then click button.

```
<!DOCTYPE html>
<html>
<head>
    <title></title>

</head>
<body>

<div id="image">
    <img src="salon1.jpg" id="fruit">
</div>
        <input type="number" id="inp">
        <input type="submit" id="btn1" onclick="showFruit('inp')">

<script type="text/javascript">

    makeImageFromNum = function (n) {
        var nr = document.getElementById(n).value;
        if (parseInt(nr)>5) {
            nr = 5;
        }
        else if (parseInt(nr)<1) {
            nr = 1;
        }
        return "salon"+nr+".jpg";
    }

    showFruit = function (n) {
        document.getElementById("fruit").src = makeImageFromNum(n);
    }

</script>
</body>
</html>

```

In below example ([live here](http://dilaraism.me.pn/test/36529547/index_2.html)) just change the number - no need to click a button, there is no any actually :)

```
<!DOCTYPE html>
<html>
<head>
    <title></title>

</head>
<body>

<div id="image">
    <img src="salon1.jpg" id="fruit">
</div>
        <input type="number" id="inp" onchange="showFruit(this.value)">

<script type="text/javascript">

    makeImageFromNum = function (nr) {
        if (parseInt(nr)>5) {
            nr = 5;
        }
        else if (parseInt(nr)<1) {
            nr = 1;
        }
        return "salon"+nr+".jpg";
    }

    showFruit = function (n) {
        document.getElementById("fruit").src = makeImageFromNum(n);
    }

</script>
</body>
</html>

```
Note that you're always assinging the first image in this line of code (the last Iine if your code)

```
fruitUrl = document.getElementById("fruitImg").src = "pics/fruit1.jpg";

```

So, you'll always see image one