Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

123
Views
Numerical input, categorial output in brain.js

Is there a way to use brain.js to give an array of numbers, and get a categorial output (preferably accompanied with a reliability value)

Suppose this code

const brain = require('brain.js');

const network = new brain.NeuralNetwork(); //IS THIS THE ONE?

network.train([
// [word count, characters, special characters]   =>  [rating]
        
  { input: [0.10, 0.20, 0.40], output: ['hard'] }, // 1 input
  { input: [0.10, 0.50, 0.50], output: ['intermediate'] }, // 2 input
  { input: [0.10, 0.40, 0.60], output: ['simple'] }, // 3 input
  { input: [0.10, 0.40, 0.50], output: ['hard'] }, // 4 input
  { input: [0.10, 0.30, 0.30], output: ['simple'] }, // 5 input
  { input: [0.10, 0.70, 0.30], output: ['hard'] }  // 6 input
]);

//Evaluate to get a difficulty rating
const output = network.run([0.10, 0.50, 0.60]);

console.log(output);

The desired output would be one of the three ratings with a reliability value (perhaps a percentage of certainty).

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!