Click here to Skip to main content
15,885,546 members
Home / Discussions / Java
   

Java

 
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 
GeneralRe: Global variables are not supported in C# Pin
Member 145588955-Oct-19 18:16
Member 145588955-Oct-19 18:16 
GeneralRe: Global variables are not supported in C# Pin
Dr.Walt Fair, PE5-May-19 7:54
professionalDr.Walt Fair, PE5-May-19 7:54 
AnswerRe: Global variables are not supported in C# Pin
Maciej Los27-Mar-19 23:00
mveMaciej Los27-Mar-19 23:00 
GeneralRe: Global variables are not supported in C# Pin
Brian_TheLion27-Mar-19 23:35
Brian_TheLion27-Mar-19 23:35 
AnswerRe: Global variables are not supported in C# Pin
Dr.Walt Fair, PE5-May-19 7:50
professionalDr.Walt Fair, PE5-May-19 7:50 
QuestionHome automation using iot Pin
Member 1417643119-Mar-19 1:49
Member 1417643119-Mar-19 1:49 
AnswerRe: Home automation using iot Pin
OriginalGriff19-Mar-19 1:51
mveOriginalGriff19-Mar-19 1:51 

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.