Click here to Skip to main content
15,915,873 members
Home / Discussions / Java
   

Java

 
GeneralRe: What database shoud i pick for my java app? Pin
Dr.Walt Fair, PE5-May-19 7:42
professionalDr.Walt Fair, PE5-May-19 7:42 
AnswerRe: What database shoud i pick for my java app? Pin
Kelly Ferguson19-May-19 22:57
Kelly Ferguson19-May-19 22:57 
AnswerRe: What database shoud i pick for my java app? Pin
remote4me21-Jun-19 2:40
remote4me21-Jun-19 2:40 
QuestionHow to add JMenu Pin
Member 1431822321-Apr-19 0:57
Member 1431822321-Apr-19 0:57 
AnswerRe: How to add JMenu Pin
Richard MacCutchan21-Apr-19 22:21
mveRichard MacCutchan21-Apr-19 22:21 
AnswerRe: How to add JMenu Pin
E2E Training Academy8-Aug-19 0:37
E2E Training Academy8-Aug-19 0:37 
Questionspeech recognition project in java for controlling your pc using voice java Pin
Member 1422299418-Apr-19 23:56
Member 1422299418-Apr-19 23:56 
AnswerRe: speech recognition project in java for controlling your pc using voice java Pin
Richard MacCutchan19-Apr-19 0:34
mveRichard MacCutchan19-Apr-19 0:34 
Questiong.drawString is not printing the correct value in Jpanel. Pin
chandra12212-Apr-19 5:01
chandra12212-Apr-19 5:01 
QuestionRe: g.drawString is not printing the correct value in Jpanel. Pin
Richard MacCutchan12-Apr-19 6:19
mveRichard MacCutchan12-Apr-19 6:19 
AnswerRe: g.drawString is not printing the correct value in Jpanel. Pin
chandra12212-Apr-19 18:58
chandra12212-Apr-19 18:58 
GeneralRe: g.drawString is not printing the correct value in Jpanel. Pin
Richard MacCutchan12-Apr-19 20:51
mveRichard MacCutchan12-Apr-19 20:51 
GeneralRe: g.drawString is not printing the correct value in Jpanel. Pin
chandra12212-Apr-19 22:57
chandra12212-Apr-19 22:57 
GeneralRe: g.drawString is not printing the correct value in Jpanel. Pin
Richard MacCutchan12-Apr-19 23:23
mveRichard MacCutchan12-Apr-19 23:23 
QuestionPreview implementing 10 cross validation Pin
Member 142144734-Apr-19 22:41
Member 142144734-Apr-19 22:41 
I am working in PSO for feature selection. I use KNN algorithm with 10 cross validation for the evaluation. before I use the 10cv the algorithm is quite cheap meaning no high computational cost has been faced, but after turning to 10cv the code is running too slow, sometimes for days. may I know if there is any problem in performing the 10cv. I use the following code to perform 10 cv:

dataset data = FileHandler.loadDataset(new File(dataSetFileName+".csv"), noFeatures, ","); 
                //crossvalidationmat
                  int[][] crossvalidationmat= { 
                    {1,2,3,4,5,6,7,8,9}, 
                    {0,2,3,4,5,6,7,8,9}, 
                    {0,1,3,4,5,6,7,8,9},
                    {0,1,2,4,5,6,7,8,9}, 
                    {0,1,2,3,5,6,7,8,9},
                    {0,1,2,3,4,6,7,8,9},
                    {0,1,2,3,4,5,7,8,9},
                    {0,1,2,3,4,5,6,8,9},
                    {0,1,2,3,4,5,6,7,9},
                    {0,1,2,3,4,5,6,7,8},
                    };
        Dataset[] folds = data.folds((10), new Random(1));
        Dataset training = new DefaultDataset();    //training, testing
        Dataset testing = new DefaultDataset();   
        int[] tr =new int[9];
        int[] te = new int[1]; 
for (int di = 0; di < crossvalidationmat.length; di++) { // start crossvalidation
       System.out.println(crossvalidationmat[di].length);
for (int xj = 0; xj < crossvalidationmat[di].length; xj++) { 
         tr[xj]=crossvalidationmat[di][xj];
         System.out.print(tr[xj]);
    }
    te[0]=di;
    System.out.println("\nTraing  te[0]=di here:  "+te[0]);
        for (int i = 0; i < tr.length; i++) {
            training.addAll(folds[tr[i]]);
        }
        for (int i = 0; i < te.length; i++) {
            testing.addAll(folds[te[i]]);
        }
 Dataset[] foldsTrain = training.folds(numFolds, new Random(1));
//other code
}

QuestionGlobal variables are not supported in C# Pin
Brian_TheLion27-Mar-19 21:04
Brian_TheLion27-Mar-19 21:04 
AnswerRe: Global variables are not supported in C# Pin
Richard MacCutchan27-Mar-19 22:26
mveRichard MacCutchan27-Mar-19 22:26 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion27-Mar-19 23:40
Brian_TheLion27-Mar-19 23:40 
GeneralRe: Global variables are not supported in C# Pin
Richard MacCutchan27-Mar-19 23:45
mveRichard MacCutchan27-Mar-19 23:45 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion27-Mar-19 23:58
Brian_TheLion27-Mar-19 23:58 
GeneralRe: Global variables are not supported in C# Pin
Richard MacCutchan28-Mar-19 0:03
mveRichard MacCutchan28-Mar-19 0:03 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion28-Mar-19 0:13
Brian_TheLion28-Mar-19 0:13 
GeneralRe: Global variables are not supported in C# Pin
Richard MacCutchan28-Mar-19 1:43
mveRichard MacCutchan28-Mar-19 1:43 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion28-Mar-19 2:02
Brian_TheLion28-Mar-19 2:02 
GeneralRe: Global variables are not supported in C# Pin
jschell13-Apr-19 6:42
jschell13-Apr-19 6:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.