Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Java³ÌÐòͨ¹ýwekaµ÷ÓÃlibsvmºÍliblinearµÄ·½·¨

¡¶Java³ÌÐòͨ¹ýwekaµ÷ÓÃlibsvmµÄ·½·¨¡·Ò»ÎIJûÊöÁ˵÷ÓÃLibSVMµÄ¼òµ¥·½·¨£¬ÕâÀïÖ÷Òª²¹³äËĵ㣺
1.       LibSVMÔÚweka3.5°æÒԺ󶼼¯³ÉÁË°ü×°£¬ÎÞÐëÔÙʹÓÃWLSVM£¬ËùÒÔÉÏÎÄÖеÄWLSVMÏà¹ØµÄÄÚÈÝ¿ÉÒÔÈ¥³ý£¬¶øÀàÐÍWLSVM¿ÉÒÔ»»³ÉLibSVM£¬ÐèÒªÌí¼Ó°ü
import weka.classifiers.functions.LibSVM;
ÎÞÐëÔÙʹÓÃimport wlsvm.WLSVM;
2.       LibLINEARÕ¼ÓÃÄÚ´æС£¬¿ÉÒÔÔÚ´óÊý¾Ý¼¯´óÌØÕ÷Á¿µÄÇé¿öÏÂʹÓ㬵÷Ó÷½·¨ÓëLibSVMÏàͬ£¬²»Í¬µÄ¾ÍÊÇ°ÑÀàLibSVM»»³ÉLibLINEAR£¨Í¬Ê±£¬¼ÓÔصÄjar°üΪLibLINEAR£¬¼ÓÔØ·½·¨¼û¡¶ÔÚeclipseÏÂʹÓÃjavaµ÷ÓÃweka¡·ÏÂÔصØÖ·£ºhttp://download.csdn.net/source/1998016£©¡£
3.       ²ÎÊýÉèÖÃ
ÔÚ
m_classifier.buildClassifier(instancesTrain); //ѵÁ·
Ç°Ìí¼Ó£º
String[] options=weka.core.Utils.splitOptions("-S 0 -K 2 -D 3 -G 0.0 -R 0.0 -N 0.5 -M 40.0 -C 1.0 -E 0.0010 -P 0.1 -B 0");
m_classifier.setOptions(options);
4.       ·ÖÀàÆ÷ÐòÁл¯Óë·´ÐòÁл¯£¨±£´æÓë¶ÁÈ¡£©
wekaÄÚÖÃÁËÐòÁл¯Àֻ࣬ҪʹÓãº
weka.core.SerializationHelper.write(“E:\model”, m_classifier);
¾Í¿ÉÒÔ±£´æÄ£ÐÍÁË£¬Ê¹ÓÃʱֻҪÔÙʹÓÃÏÂÃæÓï¾ä¶ÁÈ¡³öÀ´£¨ÒÔLibSVMΪÀý£©£º
Classifier classifier=(LibSVM)weka.core.SerializationHelper.read(“E:\model”);
 


Ïà¹ØÎĵµ£º

Effective Java ѧϰ±Ê¼Ç£¨2£©

 ÓÐʱ£¬ÎÒÃÇÔÚдһ¸ö¹¹Ô캯Êýʱ£¬¾­³£ÒòΪËü°üº¬ÖÚ¶àµÄ²ÎÊý¶ø¿àÄÕ,Õâʱ¿ÉÒÔ¿¼ÂÇÓÃBuilderģʽÀ´´´½¨¶ÔÏó¡£
È磬ÎÒÃÇÒªÉè¼ÆÒ»¸öÓªÑø³É·ÝµÄÀ࣬°üº¬ÄÜÁ¿£¬µ°°×ÖÊ£¬Ö¬·¾£¬¸Æ£¬Ìú£¬Ð¿£¬Î¬ÉúËØA, άÉúËØB1 ... µÈ£¬µ«ÔÚ¹¹ÔìµÄʱºò£¬²»Ò»¶¨Ã¿´Î¶¼ÐèÒªÕâЩ²ÎÊý£¬Èç¸Æ£¬Ìú£¬Ð¿ºÍάÉúËصÈÊÇ¿ÉÑ¡µÄ£¬ÎªÁËÊÊÓ¦¶àÖÖ¿ÉÄܵĴîÅ䣬±È ......

JAVA¹æ·¶Ñ§Ï°——String×ÖÃæ³£Á¿

package testPackage;
class Test {
public static void main(String[] args) {
String hello = "Hello", lo = "lo";
System.out.print((hello == "Hello") + " ");
System.out.print((Other.hello == hello) + " ");
System.out.print((other.Other.hello == hello) + " ");
System.out.print((hello == ("Hel"+"lo ......

arcgis server9.3 for java °²×°

   ArcGIS Server9.3ÍêÕûÇåÎú°²×°Á÷³Ì
ÒÔϵÄArcGIS Server9.3°²×°Á÷³ÌÊÇÎÒ¸öÈË×ܽá³öÀ´µÄ£¬ÔÚwindowXP2Ñé֤ͨ¹ý£¬ÐèÒªµÄ»°£¬Ï£ÍûÓõÄ×Å¡£
    Ò»¡¢ArcGIS Server²úÆ·°üÀ¨Á½¸ö²¿·Ö£º
     1¡¢GIS Server£¬ËüÊÇÒ»¸öÌṩGIS·þÎñµÄ·þÎñÆ÷Èí¼þ²úÆ·£¬°üÀ¨Ò»ÏµÁкËÐÄAO¿âºÍÒ»¸ö¹ ......

°³¾­ÀúµÄJavaÃæÊÔÌâÄ¿

ÌâÄ¿¶¼ºÜ¼òµ¥,µ«ÓÐʱºòÈÃÄãÓñÊÍêÕûµÄд³öÀ´È´²»ÄÇôÈÝÒ×ÁË.
1.±éÀúÎļþ¼Ð(±»Õâ¸öÌâÄ¿¿¼ÁËÁ½´Î)
import java.io.File;
public class ListFile {
public static void main(String[] args) {
// TODO Auto-generated method stub
String path = "C:/Inetpub";
File f = new File(path);
list(f);
}
publ ......

Java Read()×èÈûµÄÒ»ÖÖ´¦Àí·½Ê½

java.io.InputStreamµÄread()·½·¨ÃèÊö£º
        If no byte is available because the end of the stream has been reached, the value -1 is returned.
        µ½´ïÁ÷µÄĩβÕæ»á·Å»Ø-1Âð£¿
        ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ