国内精品久久久久_亚洲区手机在线中文无码播放_国内精品久久久久影院一蜜桃_日韩内射激情视频在线播放免费

      公安部地址?

      時間:2024-09-01 01:47 人氣:0 編輯:招聘街

      一、公安部地址?

      中華人民共和國公安部的地址:北京市東

      城區(qū)東長安街14號;郵編:100741;電

      話:010-66262114。也可直接登陸下方

      的網(wǎng)址訪問公安部官網(wǎng)。

      二、公安部門編制?

      公安局有事業(yè)編制人員。公安局的正式事業(yè)編制的工勤人員屬于待入警人員,并不是公務(wù)員,不享有執(zhí)法權(quán)。一般都在非執(zhí)法崗位,如110接警中心等。工勤人員無警銜和警服,享受人民警察待遇,工資相比少了個警銜津貼。公安局工勤編制就是公安里的職工,不是公務(wù)員編制。比協(xié)警強點,可以享受公安人員的工資和其它待遇,比如養(yǎng)老和住房工基金,理論上說是沒有警銜的,如同國企里的工人,稱之為事業(yè)單位在編人員,不是干部或公務(wù)員。

      三、中央公安部網(wǎng)站?

      公安網(wǎng)分為內(nèi)網(wǎng)和外網(wǎng)。內(nèi)網(wǎng)只有公安機關(guān)工作人員可以瀏覽。

      普通公民只能瀏覽公安部及其下屬公安局網(wǎng)站。如,公安部的官方網(wǎng)站為http://www.mps.gov.cn。在公安系統(tǒng)查詢個人信息:1,支付寶首頁打開市民中心。2在市民中心辦事大廳里,選擇公安交管,然后點擊個人信息查詢。3仔細(xì)閱讀公安系統(tǒng)的查詢須知,然后點擊同意。4.輸入個人信息查詢的申請信息,點擊提交就可以了,結(jié)果會在幾個工作日內(nèi)發(fā)到你的郵箱。

      四、公安部欠薪規(guī)定?

      根據(jù)《公安部關(guān)于加強支付離休干部報銷及工資支付工作的規(guī)定》(公安部令第32號),公安部規(guī)定,工資應(yīng)及時正常支付,未及時發(fā)放工資的,應(yīng)當(dāng)正常發(fā)放補發(fā)工資,不得征收不正當(dāng)手續(xù)費,也不得把未發(fā)工資算作未發(fā)補貼、公積金等。

      五、公安部報案平臺?

      有因為公安部設(shè)有“110接警平臺”和“公安部網(wǎng)絡(luò)違法犯罪舉報網(wǎng)站”,可供民眾使用。 110接警平臺是公安機關(guān)接受警情和求助的電話平臺,是全國統(tǒng)一的警務(wù)電話,撥打110可以報警和求助;同時,公安部網(wǎng)絡(luò)違法犯罪舉報網(wǎng)站也提供了方便快捷的網(wǎng)絡(luò)舉報渠道,民眾可以通過該網(wǎng)站進(jìn)行網(wǎng)絡(luò)違法犯罪的舉報和投訴,包括網(wǎng)絡(luò)詐騙、色情等行為。為民眾提供了一個安全、便捷的報案渠道,讓民眾可以更及時有效地保護自己的合法權(quán)益。

      六、公安部 工資

      在中國,公安部門是負(fù)責(zé)維護社會安全和治安秩序的重要組織。作為執(zhí)行國家法律和保護人民生命財產(chǎn)安全的機構(gòu),公安部門的工作任務(wù)非常繁重和關(guān)鍵。而公安部門的工資待遇也一直備受關(guān)注,因為它直接關(guān)系到公安機關(guān)的工作積極性和效率。

      作為國家機關(guān)工作人員,公安部門的工資待遇由一系列因素決定,主要包括職位等級、工作年限和績效表現(xiàn)。公安部門中分為許多職位,從普通警員到高級警官,每個職位對應(yīng)的工資水平都有所不同。

      職位等級

      在公安部門,警員的職位等級可以根據(jù)其實際職位、職責(zé)和資歷來劃分。普通警員大多數(shù)是從基層干部逐漸晉升而來,他們的工資水平相對較低。而隨著職位的晉升,警員將逐漸獲得更高的職位等級和相應(yīng)的工資待遇。

      高級職位的公安人員,如警督、警司等,通常需要具備更高的學(xué)歷和豐富的經(jīng)驗。他們在公安工作中承擔(dān)著更多的責(zé)任和管理職責(zé),因此他們的工資待遇相對較高。

      工作年限

      工作年限也是影響公安部門工資的重要因素之一。隨著工作年限的增加,警員的經(jīng)驗和實際工作能力會得到提高,因此工資待遇也會逐步增加。

      同時,公安部門通常設(shè)有一些晉升渠道,通過參加培訓(xùn)和考試,公安人員可以獲得更高的職位和更高的工資待遇。

      績效表現(xiàn)

      績效表現(xiàn)是公安部門工資待遇的重要考量因素之一。公安人員的工作表現(xiàn)將直接關(guān)系到工資的增長和晉升的機會。

      公安部門通常會根據(jù)警員的勤勉程度、案件偵破率、榮譽表彰等因素評估績效。表現(xiàn)優(yōu)秀的警員將有較高的機會得到晉升和加薪。

      工資待遇的透明性

      公安部門工資待遇的透明性是一個受到關(guān)注的問題。對于公眾來說,了解公安人員的工資待遇情況有助于增強對公安部門的信任。

      一些地方政府已經(jīng)開始提倡公安工資的公開透明化。通過公開公安人員的工資等信息,可以方便公眾監(jiān)督和評估公安工作。

      努力提高公安人員工資待遇的必要性

      提高公安人員工資待遇是一個關(guān)系到公安工作質(zhì)量和效率的重要問題。公安人員承擔(dān)著維護社會穩(wěn)定和保護公民安全的重任,應(yīng)該得到合理的回報和激勵。

      適當(dāng)提高公安人員的工資待遇可以激勵他們更加投入地履行職責(zé),提高工作積極性和干勁。

      另外,與其他行業(yè)相比,公安部門的工作壓力較大,工作環(huán)境較為復(fù)雜和危險。因此,提高公安人員的工資待遇可以提升其工作積極性和幸福感,避免高壓環(huán)境下的人才流失。

      結(jié)論

      公安部門工資待遇是公安人員關(guān)注的焦點之一,它直接影響到公安機關(guān)的工作效率和公民對公安部門的信任。因此,政府應(yīng)該重視公安人員的工資待遇問題,并采取措施提高其工資水平。

      公安部門也應(yīng)該通過透明化公安工資待遇,增加公眾對公安工作的理解和支持。

      七、公安部退休規(guī)定?

      一、警察退休年齡新規(guī)定

      公安民警的退休政策應(yīng)和普通公務(wù)員有所區(qū)別,可實施彈性退休政策,民警從警年限滿25年的,本人自愿提出申請,可以提前退休。

      國家規(guī)定的退休年齡:

      《國務(wù)院關(guān)于安置老弱病殘干部的暫行辦法》和《國務(wù)院關(guān)于工人退休、退職的暫行辦法》(國發(fā)〔1978〕104號)文件所規(guī)定的退休年齡。即:全民所有制企業(yè)、事業(yè)單位和黨政機關(guān)、群眾團體的工人:

      (一)男年滿六十周歲,女年滿五十周歲,并且連續(xù)工齡滿十年的;

      (二)男年滿五十五周歲、女年滿四十五周歲,連續(xù)工齡滿十年的,從事井下、高空、高溫、特別繁重體力勞動或其他有害身體健康的工作;

      (三)男年滿五十周歲,女年滿四十五周歲,連續(xù)工齡滿十年,由醫(yī)院證明,并經(jīng)勞動鑒定委員會確認(rèn),完全喪失勞動能力的應(yīng)當(dāng)準(zhǔn)予退休。

      二、警察退休金怎么計算

      人民警察基本退休金計算辦法如下:

      基本退休金=基礎(chǔ)養(yǎng)老金+過渡性養(yǎng)老金+個人賬戶養(yǎng)老金+人民警察警銜津貼

      1、基礎(chǔ)養(yǎng)老金=退休時全省上年度在崗職工月平均工資×(1+本人平均繳費工資指數(shù))÷2×繳費年限×1%。

      其中,本人平均繳費工資指數(shù)=(視同繳費指數(shù)×視同繳費年限+實際平均繳費指數(shù)×實際繳費年限)÷繳費年限。

      2、個人賬戶養(yǎng)老金=退休時本人基本養(yǎng)老保險個人賬戶累計儲存額÷計發(fā)月數(shù)。

      3、過渡性養(yǎng)老金=退休時全省上年度在崗職工月平均工資×本人視同繳費指數(shù)×視同繳費年限×過渡系數(shù)(1.2%)。

      4、人民警察警銜津貼標(biāo)準(zhǔn)是按銜級執(zhí)行相應(yīng)的津貼標(biāo)準(zhǔn)。各銜級每月的警銜津貼標(biāo)準(zhǔn)為:二級警員64元,一級警員68元;三級警司72元,二級警司76元,一級警司80元;三級警督85元,二級警督90元;一級警督95元;三級警監(jiān)100元,二級警監(jiān)105元,一級警監(jiān)110元;副總警監(jiān)116元,總警監(jiān)123元。

      八、公安部怎么考入?

      等公安部招考的時候,符合條件即可去報名,若能夠通過筆試、面試、體檢就行了。

      九、公安部網(wǎng)站備案?

      網(wǎng)站公安備案的目的就是受當(dāng)?shù)鼐W(wǎng)警監(jiān)管,一起維護互聯(lián)網(wǎng)信息安全。

      附上備案網(wǎng)址:http://www.beian.gov.cn/portal/index.do

      網(wǎng)站備案的速度和網(wǎng)站類型有關(guān)。

      一、非交互型的網(wǎng)站,如:企業(yè)官網(wǎng)等只是為了展示的網(wǎng)站,由于沒有提供用戶「發(fā)言」等交互的入口,是相對安全的,備案很快。

      二、交互型的網(wǎng)站,特別是含有:發(fā)帖、發(fā)文章、發(fā)表評論等功能的網(wǎng)站,備案就會相對嚴(yán)格些。

      因為交互型網(wǎng)站的運營需要有嚴(yán)格的章程,來保證這個網(wǎng)站不會展示和幫助非法信息傳播。

      交互型網(wǎng)站公安備案的流程如下:

      1、建立網(wǎng)絡(luò)安全管理制度(制度文件打印簽字蓋章)

      2、負(fù)責(zé)人寫互聯(lián)網(wǎng)信息安全承諾書(承諾書文件打印簽字蓋章)

      3、保證網(wǎng)管24小時監(jiān)管網(wǎng)站

      4、保證網(wǎng)站已導(dǎo)入下發(fā)的屏蔽關(guān)鍵詞

      5、在線提交互聯(lián)網(wǎng)安全評估報告

      6、在線提交備案申請

      完成以上,一般在線申請的就會通過了。最直接的辦法是,如果當(dāng)?shù)鼐W(wǎng)警短信通知,未通過,又不知道原因的情況沒,就在其工作時間回電話過去詢問即可,一般都會告知的。因為他們也不是每天都有很多很多的備案申請,是記得當(dāng)天拒絕的這份申請的原因是什么的。

      十、mahout面試題?

      之前看了Mahout官方示例 20news 的調(diào)用實現(xiàn);于是想根據(jù)示例的流程實現(xiàn)其他例子。網(wǎng)上看到了一個關(guān)于天氣適不適合打羽毛球的例子。

      訓(xùn)練數(shù)據(jù):

      Day Outlook Temperature Humidity Wind PlayTennis

      D1 Sunny Hot High Weak No

      D2 Sunny Hot High Strong No

      D3 Overcast Hot High Weak Yes

      D4 Rain Mild High Weak Yes

      D5 Rain Cool Normal Weak Yes

      D6 Rain Cool Normal Strong No

      D7 Overcast Cool Normal Strong Yes

      D8 Sunny Mild High Weak No

      D9 Sunny Cool Normal Weak Yes

      D10 Rain Mild Normal Weak Yes

      D11 Sunny Mild Normal Strong Yes

      D12 Overcast Mild High Strong Yes

      D13 Overcast Hot Normal Weak Yes

      D14 Rain Mild High Strong No

      檢測數(shù)據(jù):

      sunny,hot,high,weak

      結(jié)果:

      Yes=》 0.007039

      No=》 0.027418

      于是使用Java代碼調(diào)用Mahout的工具類實現(xiàn)分類。

      基本思想:

      1. 構(gòu)造分類數(shù)據(jù)。

      2. 使用Mahout工具類進(jìn)行訓(xùn)練,得到訓(xùn)練模型。

      3。將要檢測數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。

      4. 分類器對vector數(shù)據(jù)進(jìn)行分類。

      接下來貼下我的代碼實現(xiàn)=》

      1. 構(gòu)造分類數(shù)據(jù):

      在hdfs主要創(chuàng)建一個文件夾路徑 /zhoujainfeng/playtennis/input 并將分類文件夾 no 和 yes 的數(shù)據(jù)傳到hdfs上面。

      數(shù)據(jù)文件格式,如D1文件內(nèi)容: Sunny Hot High Weak

      2. 使用Mahout工具類進(jìn)行訓(xùn)練,得到訓(xùn)練模型。

      3。將要檢測數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。

      4. 分類器對vector數(shù)據(jù)進(jìn)行分類。

      這三步,代碼我就一次全貼出來;主要是兩個類 PlayTennis1 和 BayesCheckData = =》

      package myTesting.bayes;

      import org.apache.hadoop.conf.Configuration;

      import org.apache.hadoop.fs.FileSystem;

      import org.apache.hadoop.fs.Path;

      import org.apache.hadoop.util.ToolRunner;

      import org.apache.mahout.classifier.naivebayes.training.TrainNaiveBayesJob;

      import org.apache.mahout.text.SequenceFilesFromDirectory;

      import org.apache.mahout.vectorizer.SparseVectorsFromSequenceFiles;

      public class PlayTennis1 {

      private static final String WORK_DIR = "hdfs://192.168.9.72:9000/zhoujianfeng/playtennis";

      /*

      * 測試代碼

      */

      public static void main(String[] args) {

      //將訓(xùn)練數(shù)據(jù)轉(zhuǎn)換成 vector數(shù)據(jù)

      makeTrainVector();

      //產(chǎn)生訓(xùn)練模型

      makeModel(false);

      //測試檢測數(shù)據(jù)

      BayesCheckData.printResult();

      }

      public static void makeCheckVector(){

      //將測試數(shù)據(jù)轉(zhuǎn)換成序列化文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"testinput";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-test-seq";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SequenceFilesFromDirectory sffd = new SequenceFilesFromDirectory();

      String[] params = new String[]{"-i",input,"-o",output,"-ow"};

      ToolRunner.run(sffd, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("文件序列化失敗!");

      System.exit(1);

      }

      //將序列化文件轉(zhuǎn)換成向量文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"tennis-test-seq";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-test-vectors";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SparseVectorsFromSequenceFiles svfsf = new SparseVectorsFromSequenceFiles();

      String[] params = new String[]{"-i",input,"-o",output,"-lnorm","-nv","-wt","tfidf"};

      ToolRunner.run(svfsf, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("序列化文件轉(zhuǎn)換成向量失敗!");

      System.out.println(2);

      }

      }

      public static void makeTrainVector(){

      //將測試數(shù)據(jù)轉(zhuǎn)換成序列化文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"input";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-seq";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SequenceFilesFromDirectory sffd = new SequenceFilesFromDirectory();

      String[] params = new String[]{"-i",input,"-o",output,"-ow"};

      ToolRunner.run(sffd, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("文件序列化失敗!");

      System.exit(1);

      }

      //將序列化文件轉(zhuǎn)換成向量文件

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"tennis-seq";

      String output = WORK_DIR+Path.SEPARATOR+"tennis-vectors";

      Path in = new Path(input);

      Path out = new Path(output);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      SparseVectorsFromSequenceFiles svfsf = new SparseVectorsFromSequenceFiles();

      String[] params = new String[]{"-i",input,"-o",output,"-lnorm","-nv","-wt","tfidf"};

      ToolRunner.run(svfsf, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("序列化文件轉(zhuǎn)換成向量失敗!");

      System.out.println(2);

      }

      }

      public static void makeModel(boolean completelyNB){

      try {

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String input = WORK_DIR+Path.SEPARATOR+"tennis-vectors"+Path.SEPARATOR+"tfidf-vectors";

      String model = WORK_DIR+Path.SEPARATOR+"model";

      String labelindex = WORK_DIR+Path.SEPARATOR+"labelindex";

      Path in = new Path(input);

      Path out = new Path(model);

      Path label = new Path(labelindex);

      FileSystem fs = FileSystem.get(conf);

      if(fs.exists(in)){

      if(fs.exists(out)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(out, true);

      }

      if(fs.exists(label)){

      //boolean參數(shù)是,是否遞歸刪除的意思

      fs.delete(label, true);

      }

      TrainNaiveBayesJob tnbj = new TrainNaiveBayesJob();

      String[] params =null;

      if(completelyNB){

      params = new String[]{"-i",input,"-el","-o",model,"-li",labelindex,"-ow","-c"};

      }else{

      params = new String[]{"-i",input,"-el","-o",model,"-li",labelindex,"-ow"};

      }

      ToolRunner.run(tnbj, params);

      }

      } catch (Exception e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("生成訓(xùn)練模型失敗!");

      System.exit(3);

      }

      }

      }

      package myTesting.bayes;

      import java.io.IOException;

      import java.util.HashMap;

      import java.util.Map;

      import org.apache.commons.lang.StringUtils;

      import org.apache.hadoop.conf.Configuration;

      import org.apache.hadoop.fs.Path;

      import org.apache.hadoop.fs.PathFilter;

      import org.apache.hadoop.io.IntWritable;

      import org.apache.hadoop.io.LongWritable;

      import org.apache.hadoop.io.Text;

      import org.apache.mahout.classifier.naivebayes.BayesUtils;

      import org.apache.mahout.classifier.naivebayes.NaiveBayesModel;

      import org.apache.mahout.classifier.naivebayes.StandardNaiveBayesClassifier;

      import org.apache.mahout.common.Pair;

      import org.apache.mahout.common.iterator.sequencefile.PathType;

      import org.apache.mahout.common.iterator.sequencefile.SequenceFileDirIterable;

      import org.apache.mahout.math.RandomAccessSparseVector;

      import org.apache.mahout.math.Vector;

      import org.apache.mahout.math.Vector.Element;

      import org.apache.mahout.vectorizer.TFIDF;

      import com.google.common.collect.ConcurrentHashMultiset;

      import com.google.common.collect.Multiset;

      public class BayesCheckData {

      private static StandardNaiveBayesClassifier classifier;

      private static Map<String, Integer> dictionary;

      private static Map<Integer, Long> documentFrequency;

      private static Map<Integer, String> labelIndex;

      public void init(Configuration conf){

      try {

      String modelPath = "/zhoujianfeng/playtennis/model";

      String dictionaryPath = "/zhoujianfeng/playtennis/tennis-vectors/dictionary.file-0";

      String documentFrequencyPath = "/zhoujianfeng/playtennis/tennis-vectors/df-count";

      String labelIndexPath = "/zhoujianfeng/playtennis/labelindex";

      dictionary = readDictionnary(conf, new Path(dictionaryPath));

      documentFrequency = readDocumentFrequency(conf, new Path(documentFrequencyPath));

      labelIndex = BayesUtils.readLabelIndex(conf, new Path(labelIndexPath));

      NaiveBayesModel model = NaiveBayesModel.materialize(new Path(modelPath), conf);

      classifier = new StandardNaiveBayesClassifier(model);

      } catch (IOException e) {

      // TODO Auto-generated catch block

      e.printStackTrace();

      System.out.println("檢測數(shù)據(jù)構(gòu)造成vectors初始化時報錯。。。。");

      System.exit(4);

      }

      }

      /**

      * 加載字典文件,Key: TermValue; Value:TermID

      * @param conf

      * @param dictionnaryDir

      * @return

      */

      private static Map<String, Integer> readDictionnary(Configuration conf, Path dictionnaryDir) {

      Map<String, Integer> dictionnary = new HashMap<String, Integer>();

      PathFilter filter = new PathFilter() {

      @Override

      public boolean accept(Path path) {

      String name = path.getName();

      return name.startsWith("dictionary.file");

      }

      };

      for (Pair<Text, IntWritable> pair : new SequenceFileDirIterable<Text, IntWritable>(dictionnaryDir, PathType.LIST, filter, conf)) {

      dictionnary.put(pair.getFirst().toString(), pair.getSecond().get());

      }

      return dictionnary;

      }

      /**

      * 加載df-count目錄下TermDoc頻率文件,Key: TermID; Value:DocFreq

      * @param conf

      * @param dictionnaryDir

      * @return

      */

      private static Map<Integer, Long> readDocumentFrequency(Configuration conf, Path documentFrequencyDir) {

      Map<Integer, Long> documentFrequency = new HashMap<Integer, Long>();

      PathFilter filter = new PathFilter() {

      @Override

      public boolean accept(Path path) {

      return path.getName().startsWith("part-r");

      }

      };

      for (Pair<IntWritable, LongWritable> pair : new SequenceFileDirIterable<IntWritable, LongWritable>(documentFrequencyDir, PathType.LIST, filter, conf)) {

      documentFrequency.put(pair.getFirst().get(), pair.getSecond().get());

      }

      return documentFrequency;

      }

      public static String getCheckResult(){

      Configuration conf = new Configuration();

      conf.addResource(new Path("/usr/local/hadoop/conf/core-site.xml"));

      String classify = "NaN";

      BayesCheckData cdv = new BayesCheckData();

      cdv.init(conf);

      System.out.println("init done...............");

      Vector vector = new RandomAccessSparseVector(10000);

      TFIDF tfidf = new TFIDF();

      //sunny,hot,high,weak

      Multiset<String> words = ConcurrentHashMultiset.create();

      words.add("sunny",1);

      words.add("hot",1);

      words.add("high",1);

      words.add("weak",1);

      int documentCount = documentFrequency.get(-1).intValue(); // key=-1時表示總文檔數(shù)

      for (Multiset.Entry<String> entry : words.entrySet()) {

      String word = entry.getElement();

      int count = entry.getCount();

      Integer wordId = dictionary.get(word); // 需要從dictionary.file-0文件(tf-vector)下得到wordID,

      if (StringUtils.isEmpty(wordId.toString())){

      continue;

      }

      if (documentFrequency.get(wordId) == null){

      continue;

      }

      Long freq = documentFrequency.get(wordId);

      double tfIdfValue = tfidf.calculate(count, freq.intValue(), 1, documentCount);

      vector.setQuick(wordId, tfIdfValue);

      }

      // 利用貝葉斯算法開始分類,并提取得分最好的分類label

      Vector resultVector = classifier.classifyFull(vector);

      double bestScore = -Double.MAX_VALUE;

      int bestCategoryId = -1;

      for(Element element: resultVector.all()) {

      int categoryId = element.index();

      double score = element.get();

      System.out.println("categoryId:"+categoryId+" score:"+score);

      if (score > bestScore) {

      bestScore = score;

      bestCategoryId = categoryId;

      }

      }

      classify = labelIndex.get(bestCategoryId)+"(categoryId="+bestCategoryId+")";

      return classify;

      }

      public static void printResult(){

      System.out.println("檢測所屬類別是:"+getCheckResult());

      }

      }

      相關(guān)資訊
      熱門頻道

      Copyright © 2024 招聘街 滇ICP備2024020316號-38

      国内精品久久久久_亚洲区手机在线中文无码播放_国内精品久久久久影院一蜜桃_日韩内射激情视频在线播放免费

        新和县| 抚宁县| 宁城县| 丁青县| 海安县| 类乌齐县| 遵义市| 尖扎县| 民丰县| 泗水县| 乌什县| 博湖县| 宽甸| 白水县| 新竹市| 伊吾县| 醴陵市| 大石桥市| 贺州市| 米泉市| 桦川县| 台前县| 大厂| 绥江县| 兰坪| 时尚| 镇沅| 莱州市| 南安市| 普陀区| 临安市| 中超| 泰和县| 务川| 宜黄县| 米脂县| 甘德县| 合江县| 武山县| 香港| 封开县|