junku901 / machine_learning Goto Github PK
View Code? Open in Web Editor NEWMachine learning library for Node.js
Home Page: http://joonku.com/project/machine_learning
Machine learning library for Node.js
Home Page: http://joonku.com/project/machine_learning
Hi JoonKu,
Thank you for creating a great project! But it's sad to see not much update to the project anymore =(. I am a maintainer of https://github.com/machinelearnjs/machinelearnjs, and I propose we should merge these two projects, what do you think? Please let me know.
Cheers,
Jason
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.]));
My data have one output only, when i set the output to one , a error found :
throw new Error('Matrix mismatch.');
Is it the issue of hidden layer? And how to solve it ?
Hi,
How do you save and then re-open a trained network?
It doesn't seem to be explained anywhere in the doc.
Thanks.
I'm still getting the un-updated version when doing npm install machine_learning.
Thanks
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)
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 }
I see the example use SVM to classify points - two-category classification problem
May I know if the SVM algorithm could also handle classification for multi-category problem? Thanks.
For example,
x = [[0]];
y = [[0, 0]];
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.
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
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
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.
};
I love the lib and THANK YOU VERY MUCHHHHHHHH!
I like the visualization result in your website, and how can I also do this effect ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.