Shark-ML / Shark

The Shark Machine Leaning Library. See more:
http://shark-ml.github.io/Shark/
GNU Lesser General Public License v3.0
493 stars 130 forks source link

KNN regression #269

Open cydcydcyd opened 5 years ago

cydcydcyd commented 5 years ago

hello, I refer to the example of KNN classification and use KNN for regression. here is my code: KDTree<RealVector> tree(data.inputs()); TreeNearestNeighbors<RealVector, RealVector> algo(data, &tree); const unsigned int K = 5; // number of neighbors for kNN NearestNeighborModel<RealVector, RealVector> KNN(&algo, K); Data<RealVector> testInputs = spAver.matToRealVector(fMat); Data<RealVector> pred = KNN(testInputs);

when prediction starts, some thing wrong happened: Exception thrown at 0x0000000000000274 in cellDemo.exe: 0xC0000005: Access violation executing location 0x0000000000000274. image

can me help me?thanks! @Ulfgard

cydcydcyd commented 5 years ago

another question. when I use EpsilonSvmTrainer, I got some errors in SvmProblems.h image image image

Ulfgard commented 5 years ago

could yo open another ticket for this?


From: cydcydcyd [notifications@github.com] Sent: Friday, April 26, 2019 9:28 AM To: Shark-ML/Shark Cc: Oswin Krause; Mention Subject: Re: [Shark-ML/Shark] KNN regression (#269)

another question. when I use EpsilonSvmTrainer, I got some errors in SvmProblems.h [image]https://user-images.githubusercontent.com/31031796/56790627-a7402680-6837-11e9-8919-186d93f3d058.png [image]https://user-images.githubusercontent.com/31031796/56790628-a7402680-6837-11e9-9819-672ae71770e7.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Shark-ML/Shark/issues/269#issuecomment-486956483, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADSZGBRUNKFKOJNRZ42AUW3PSKVIDANCNFSM4HISZWIA.

Ulfgard commented 5 years ago

thanks for reminding me of this. I have it already fixed, but am currently not at my work station. The errors are multi-thread related. Sorry for this.


From: cydcydcyd [notifications@github.com] Sent: Friday, April 26, 2019 8:19 AM To: Shark-ML/Shark Cc: Oswin Krause; Mention Subject: [Shark-ML/Shark] KNN regression (#269)

hello, I refer to the example of KNN classification and use KNN for regression. here is my code: KDTree tree(data.inputs()); TreeNearestNeighbors<RealVector, RealVector> algo(data, &tree); const unsigned int K = 5; // number of neighbors for kNN NearestNeighborModel<RealVector, RealVector> KNN(&algo, K); Data testInputs = spAver.matToRealVector(fMat); Data pred = KNN(testInputs);

when prediction starts, some thing wrong happened: Exception thrown at 0x0000000000000274 in cellDemo.exe: 0xC0000005: Access violation executing location 0x0000000000000274. [image]https://user-images.githubusercontent.com/31031796/56787169-48c27a80-682e-11e9-9aad-923139c40a93.png

can me help me?thanks! @Ulfgardhttps://github.com/Ulfgard

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Shark-ML/Shark/issues/269, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADSZGBU44S7HDDG4XOP6KRDPSKNIHANCNFSM4HISZWIA.

cydcydcyd commented 5 years ago

hello,have you fixed it now?

Ulfgard commented 5 years ago

I have just pushed a change to 4.1

cydcydcyd commented 5 years ago

thanks for your working

At 2019-05-03 15:13:18, "Oswin Krause" notifications@github.com wrote:

I have just pushed a change to 4.1

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.