Giter VIP home page Giter VIP logo

machine_learning's People

Contributors

junku901 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machine_learning's Issues

Only works with decimal numbers?

not classifier

my data is

x =[[0.4, 0.5, 0.5, 0., 0., 0.],
[0.5, 0.3, 0.5, 0., 0., 0.01],
[0.4, 0.8, 0.5, 0., 0.1, 0.2],
[1.4, 0.5, 0.5, 0., 0., 0.],
[1.5, 0.3, 0.5, 0., 0., 0.],
[0., 0.9, 1.5, 0., 0., 0.],
[0., 0.7, 1.5, 0., 0., 0.],
[0.5, 0.1, 0.9, 0., -1.8, 0.],
[0.8, 0.8, 0.5, 0., 0., 0.],
[0., 0.9, 0.5, 0.3, 0.5, 0.2],
[0., 0., 0.5, 0.4, 0.5, 0.],
[0., 0., 0.5, 0.5, 0.5, 0.],
[0.3, 0.6, 0.7, 1.7, 1.3, -0.7],
[0., 0., 0.5, 0.3, 0.5, 0.2],
[10., 10., 10.5, 10.4, 10.5, 10.1],
[10., 10., 10.5, 10.5, 10.5, 10.01],
[10.2, 10.01, 10.5, 10., 10., 10.9],
[10., 10., 10.5, 10.3, 0.5, -12.3],
[10., 10., 10.5, 10.4, 10.5, 14],
[10., 10., 10.5, 10.5, 10.5, -12],
[50, 40, 10, 22, 20, -10]
];

var y = [1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1];

console.log("Predict : ",svm.predict([0.4, 0.5, 0.5, 0., 0., 0.]));

Save and load?

Hi,

How do you save and then re-open a trained network?
It doesn't seem to be explained anywhere in the doc.

Thanks.

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

I installed via npm: npm install machine_learning

When I try to run Logistic Regression example with nodejs logis.js I'm getting this error:

/home/mertyildiran/Documents/npm/machine_learning/node_modules/machine_learning/lib/machine_learning.js:4
let ml = module.exports;
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/mertyildiran/Documents/npm/machine_learning/logis.js:1:72)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

Decision tree always outputs the same result

Considering your machine_learning/examples/DecisionTree.js, whatever the input, teh output is always the same:

> console.log("Classify : ", dt.classify(['(direct)','USA','yes',5]));
Classify :  { None: 6, Basic: 5 }
undefined
> console.log("Classify : ", dt.classify(['slashdot','USA','yes',18]));
Classify :  { None: 6, Basic: 5 }
undefined
> console.log("Classify : ", dt.classify(['kiwitobes','France','yes',23]));
Classify :  { None: 6, Basic: 5 }
undefined
>
> console.log("Classify : ", dt.classify(['(direct)','USA','yes',5]));
Classify :  { None: 6, Basic: 5 }
undefined
> console.log("Classify : ", dt.classify(['(direct)','USA','yes',500]));
Classify :  { None: 6, Basic: 5 }

knn problem

In the knn algorithm , the knn.predict method accept weightf argument , but i don't really know it's effect, if the result is string array, the algorithm can't work。
Another question is when characteristic value have different scope, it did't work right. It need a normalization function. But i am not sure that the weightf function can solve this or not.

math.js:264 missing 'var' for mat_T

Used your library under NodeJS and running under strict mode.
Encountered this error:
ReferenceError: mat_T is not defined

Added the var back and runs fine

RIP Joonku Kang, from your brother Minku Kang

I've never forgotten you when you write this code as a high school student in Seoul.

You got job offers from California
and some prominent tech companies from Korea when you were even a high schooler.

You had talked about your GitHub even though I did not know about the ABC of machine learning.

He passed away on 16 June 2018.
I miss you Joonku Kang so much.

Best regards,
Minku Kang

Cost function used in hillclimb.js

Is there a name for the cost function used in the hill-climbing example? I'm talking this:

var costf = function(vec) {
    var cost = 0;
    for(var i =0; i<14;i++) { // This example is using 15-dimensional input vector.
        cost += (0.5*i*vec[i]*Math.exp(-vec[i]+vec[i+1])/vec[i+1])
    }
    cost += (3.*vec[14]/vec[0]);
    return cost; // our goal is finding a vector which makes the cost value minimum.
};

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.