多主體分析(Multi-Agent Analysis)是一種研究方法,用于分析由多個(gè)相互作用的智能體組成的系統(tǒng)。在這些系統(tǒng)中,每個(gè)智能體都具備一定的自主性和目標(biāo),可以執(zhí)行策略并影響其他智能體的行為。多主體分析主要用于社會(huì)科學(xué)、計(jì)算機(jī)科學(xué)、經(jīng)濟(jì)學(xué)、生物學(xué)等領(lǐng)域,以研究和理解復(fù)雜的社會(huì)、經(jīng)濟(jì)、生物系統(tǒng)等現(xiàn)象。
在多主體分析中,智能體可以是人、動(dòng)物、企業(yè)、國(guó)家或其他組織。智能體通過與其他智能體互動(dòng),形成一個(gè)復(fù)雜的網(wǎng)絡(luò)結(jié)構(gòu),以實(shí)現(xiàn)自身的目標(biāo)。通過研究這些系統(tǒng),我們可以更好地理解合作、競(jìng)爭(zhēng)、創(chuàng)新、博弈等現(xiàn)象,以及這些現(xiàn)象如何影響整個(gè)系統(tǒng)的行為和性能。
多主體分析的主要研究方法包括計(jì)算機(jī)模擬、形式模型和分析。計(jì)算機(jī)模擬可以幫助研究人員觀察系統(tǒng)在特定條件下的行為,而形式模型和分析則用于建立理論模型,對(duì)系統(tǒng)的行為和性能進(jìn)行分析和預(yù)測(cè)。
物流中心的選址是多主體的,物流配送中心選址近年來,隨著選址理論迅速發(fā)展,各種各樣的選址越來越多,層出不窮。
特別是計(jì)算機(jī)技術(shù)的發(fā)展與應(yīng)用,促進(jìn)了物流系統(tǒng)選址的理論發(fā)展
專家系統(tǒng)的多主體指什么?在人工智能領(lǐng)域,專家系統(tǒng)是一種基于知識(shí)庫和推理機(jī)制的智能系統(tǒng),用于模擬和實(shí)現(xiàn)人類專家在特定領(lǐng)域的決策和問題解決能力。而多主體系統(tǒng)則是指由多個(gè)智能個(gè)體組成的系統(tǒng),在其中每個(gè)個(gè)體都擁有自己的目標(biāo)、知識(shí)和行為能力。
將專家系統(tǒng)和多主體系統(tǒng)相結(jié)合,可以充分利用專家系統(tǒng)的知識(shí)表示和推理能力,同時(shí)結(jié)合多主體系統(tǒng)的分布式?jīng)Q策和協(xié)作能力,實(shí)現(xiàn)更加復(fù)雜和高效的智能決策和問題解決過程。
在實(shí)際應(yīng)用中,專家系統(tǒng)的多主體技術(shù)被廣泛運(yùn)用于各種領(lǐng)域,如醫(yī)療診斷、金融風(fēng)險(xiǎn)評(píng)估、交通管理和工程設(shè)計(jì)等。通過建立虛擬的專家團(tuán)隊(duì),系統(tǒng)可以更好地處理復(fù)雜問題并做出準(zhǔn)確的決策。
專家系統(tǒng)的多主體技術(shù)主要包括以下幾個(gè)關(guān)鍵原理:
將專家系統(tǒng)與多主體系統(tǒng)相結(jié)合,有以下優(yōu)勢(shì):
然而,專家系統(tǒng)的多主體技術(shù)也面臨一些挑戰(zhàn),如個(gè)體沖突、信息不對(duì)稱和系統(tǒng)穩(wěn)定性等問題,需要設(shè)計(jì)合適的機(jī)制來解決。
隨著人工智能技術(shù)的不斷發(fā)展,專家系統(tǒng)的多主體技術(shù)將在更多領(lǐng)域得到應(yīng)用,如智能交通系統(tǒng)、智能家居和智能城市管理等,為社會(huì)生活帶來更多便利和智能化。
1、砂漿墻面起泡:砂漿墻面起泡一般因?yàn)槭巧皾{面過于粗糙,刮膩?zhàn)訒r(shí)空氣無法有效排出,頂起膩?zhàn)痈囿w,形成氣泡。
2、基面氣眼起泡:批刮膩?zhàn)拥幕媸乾F(xiàn)澆板的水泥面,表面有脫模后留下的密集氣眼。在這樣的基面上批刮時(shí),氣眼被膩?zhàn)痈囿w密封,氣眼里的空氣被壓縮,膩?zhàn)痈囿w受到氣眼里被密封壓縮的空氣的反彈頂起,就形成了氣泡。
3、膩?zhàn)悠鹋荩涸诘谝坏滥佔(zhàn)邮┕r(shí)就沒有消除氣泡,刮第二道膩?zhàn)訒r(shí),在一個(gè)氣眼上繼續(xù)產(chǎn)生了一個(gè)新的氣泡。底層膩?zhàn)优浞讲缓线m,成型后表面有針眼,針眼上刮罩面膩?zhàn)雍苋菀拙蜁?huì)起泡。
多主體供給是新型住房制度在住房供給主體方面的基本要求,就是要打破以房地產(chǎn)企業(yè)為市場(chǎng)單一供應(yīng)者、為商品房銷售主體的傳統(tǒng)住房供應(yīng)體系,鼓勵(lì)市場(chǎng)供應(yīng)主體的多元化。
同時(shí)大力發(fā)展住房租賃市場(chǎng),允許和引導(dǎo)越來越多的諸如住房租賃企業(yè)、非營(yíng)利機(jī)構(gòu)、農(nóng)村集體組織、機(jī)構(gòu)投資者以及個(gè)人等新興主體在符合法律法規(guī)的條件下參與到住房供應(yīng)體系中來。
拼多主體信息審核的時(shí)間不是固定的,需要根據(jù)具體情況而定。通常來說,審核時(shí)間從提交資料開始算起,需要3-5個(gè)工作日左右。但是,如果提交信息存在不完整、不準(zhǔn)確或不符合拼多的要求等情況,審核時(shí)間可能會(huì)延長(zhǎng)。因此,建議在提交主體信息時(shí),認(rèn)真準(zhǔn)確地填寫相關(guān)資料,以加快審核速度。
摩爾多瓦全稱摩爾多瓦共和國(guó)(the Republic of Moldova),位于歐洲東南部多瑙河下游,面積3.38萬平方公里,摩爾多瓦人口268 萬,主體民族摩爾多瓦族占總?cè)丝诘?5.8%,烏克蘭族占8.4%,俄羅斯族占5.9%,加告茲族占4.4%,羅馬尼亞族占2.2%,保加利亞族占1.9%。98%的摩爾多瓦人信奉東正教。
官方語言為摩爾多瓦語,通用俄語
原因如下:會(huì)計(jì)主體與納稅主體是完全不同的兩個(gè)范疇,一個(gè)是會(huì)計(jì)上的,一個(gè)是稅法上的。會(huì)計(jì)主體不一定就是納稅主體,同樣,納稅主體也不一定就是會(huì)計(jì)主體。
不多,面試內(nèi)容大多數(shù)以田徑,體操,三大球?yàn)橹?/p>
之前看了Mahout官方示例 20news 的調(diào)用實(shí)現(xiàn);于是想根據(jù)示例的流程實(shí)現(xiàn)其他例子。網(wǎng)上看到了一個(gè)關(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
檢測(cè)數(shù)據(jù):
sunny,hot,high,weak
結(jié)果:
Yes=》 0.007039
No=》 0.027418
于是使用Java代碼調(diào)用Mahout的工具類實(shí)現(xiàn)分類。
基本思想:
1. 構(gòu)造分類數(shù)據(jù)。
2. 使用Mahout工具類進(jìn)行訓(xùn)練,得到訓(xùn)練模型。
3。將要檢測(cè)數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。
4. 分類器對(duì)vector數(shù)據(jù)進(jìn)行分類。
接下來貼下我的代碼實(shí)現(xiàn)=》
1. 構(gòu)造分類數(shù)據(jù):
在hdfs主要?jiǎng)?chuàng)建一個(gè)文件夾路徑 /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。將要檢測(cè)數(shù)據(jù)轉(zhuǎn)換成vector數(shù)據(jù)。
4. 分類器對(duì)vector數(shù)據(jù)進(jìn)行分類。
這三步,代碼我就一次全貼出來;主要是兩個(gè)類 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";
/*
* 測(cè)試代碼
*/
public static void main(String[] args) {
//將訓(xùn)練數(shù)據(jù)轉(zhuǎn)換成 vector數(shù)據(jù)
makeTrainVector();
//產(chǎn)生訓(xùn)練模型
makeModel(false);
//測(cè)試檢測(cè)數(shù)據(jù)
BayesCheckData.printResult();
}
public static void makeCheckVector(){
//將測(cè)試數(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(){
//將測(cè)試數(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)換成向量失?。?#34;);
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("檢測(cè)數(shù)據(jù)構(gòu)造成vectors初始化時(shí)報(bào)錯(cuò)。。。。");
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í)表示總文檔數(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("檢測(cè)所屬類別是:"+getCheckResult());
}
}