当前位置: 首页>>代码示例>>Java>>正文


Java SortedExampleSet.INCREASING属性代码示例

本文整理汇总了Java中com.rapidminer.example.set.SortedExampleSet.INCREASING属性的典型用法代码示例。如果您正苦于以下问题:Java SortedExampleSet.INCREASING属性的具体用法?Java SortedExampleSet.INCREASING怎么用?Java SortedExampleSet.INCREASING使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.rapidminer.example.set.SortedExampleSet的用法示例。


在下文中一共展示了SortedExampleSet.INCREASING属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doWork

@Override
public void doWork() throws OperatorException {
	ExampleSet requestSet = requestSetInput.getData(ExampleSet.class);
	ExampleSet documentSet = referenceSetInput.getData(ExampleSet.class);
	Tools.checkAndCreateIds(requestSet);
	Tools.checkAndCreateIds(documentSet);

	DistanceMeasure measure = DistanceMeasures.createMeasure(this);
	measure.init(requestSet.getAttributes(), documentSet.getAttributes());

	Attribute oldRequestId = requestSet.getAttributes().getId();
	Attribute oldDocumentId = documentSet.getAttributes().getId();

	// creating new exampleSet
	Attribute requestId = AttributeFactory.createAttribute("request", oldRequestId.getValueType());
	Attribute documentId = AttributeFactory.createAttribute("document", oldDocumentId.getValueType());
	Attribute distance = AttributeFactory.createAttribute("distance", Ontology.REAL);

	List<Attribute> newAttributes = new LinkedList<Attribute>();
	Collections.addAll(newAttributes, requestId, documentId, distance);
	MemoryExampleTable table = new MemoryExampleTable(newAttributes);

	double searchModeFactor = getParameterAsInt(PARAMETER_SEARCH_MODE) == MODE_FARTHEST ? -1d : 1d;
	boolean computeSimilarity = getParameterAsBoolean(PARAMETER_COMPUTE_SIMILARITIES);

	for (Example request : requestSet) {
		Collection<Tupel<Double, Double>> distances;
		if (getParameterAsBoolean(PARAMETER_USE_K)) {
			distances = new BoundedPriorityQueue<Tupel<Double, Double>>(getParameterAsInt(PARAMETER_K));
		} else {
			distances = new ArrayList<Tupel<Double, Double>>();
		}

		// calculating distance
		for (Example document : documentSet) {
			if (computeSimilarity) {
				distances.add(new Tupel<Double, Double>(measure.calculateSimilarity(request, document)
						* searchModeFactor, document.getValue(oldDocumentId)));
			} else {
				distances.add(new Tupel<Double, Double>(measure.calculateDistance(request, document) * searchModeFactor,
						document.getValue(oldDocumentId)));
			}
			checkForStop();
		}

		// writing into table
		DataRowFactory factory = new DataRowFactory(DataRowFactory.TYPE_DOUBLE_ARRAY, '.');
		double requestIdValue = request.getValue(oldRequestId);
		if (oldRequestId.isNominal()) {
			requestIdValue = requestId.getMapping().mapString(request.getValueAsString(oldRequestId));
		}

		for (Tupel<Double, Double> tupel : distances) {
			double documentIdValue = tupel.getSecond();
			if (oldDocumentId.isNominal()) {
				documentIdValue = documentId.getMapping().mapString(
						oldDocumentId.getMapping().mapIndex((int) documentIdValue));
			}
			DataRow row = factory.create(3);
			row.set(distance, tupel.getFirst() * searchModeFactor);
			row.set(requestId, requestIdValue);
			row.set(documentId, documentIdValue);
			table.addDataRow(row);
			checkForStop();
		}
	}

	// sorting set
	ExampleSet result = new SortedExampleSet(table.createExampleSet(), distance,
			searchModeFactor == -1d ? SortedExampleSet.DECREASING : SortedExampleSet.INCREASING);

	requestSetOutput.deliver(requestSet);
	referenceSetOutput.deliver(documentSet);
	resultSetOutput.deliver(result);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:75,代码来源:CrossDistancesOperator.java

示例2: getBestSplit

public Split getBestSplit(ExampleSet inputSet, Attribute attribute, String labelName) {
	SortedExampleSet exampleSet = new SortedExampleSet((ExampleSet) inputSet.clone(), attribute,
			SortedExampleSet.INCREASING);

	Attribute labelAttribute = exampleSet.getAttributes().getLabel();
	int labelIndex = labelAttribute.getMapping().mapString(labelName);

	double oldLabel = Double.NaN;
	double bestSplit = Double.NaN;
	double lastValue = Double.NaN;
	double bestBenefit = Double.NEGATIVE_INFINITY;
	double bestTotalWeight = 0;
	int bestSplitType = Split.LESS_SPLIT;

	// initiating online counting of benefit: only 2 Datascans needed then
	criterion.reinitOnlineCounting(exampleSet);
	for (Example e : exampleSet) {
		double currentValue = e.getValue(attribute);
		double label = e.getValue(labelAttribute);
		if ((Double.isNaN(oldLabel)) || (oldLabel != label) && (lastValue != currentValue)) {
			double splitValue = (lastValue + currentValue) / 2.0d;

			double[] benefits;
			if (labelName == null) {
				benefits = criterion.getOnlineBenefit(e);
			} else {
				benefits = criterion.getOnlineBenefit(e, labelIndex);
			}
			// online method returns both possible relations in one array(greater / smaller) in
			// one array
			if ((benefits[0] > minValue)
					&& (benefits[0] > 0)
					&& (benefits[1] > 0)
					&& ((benefits[0] > bestBenefit) || ((benefits[0] == bestBenefit) && (benefits[1] > bestTotalWeight)))) {
				bestBenefit = benefits[0];
				bestSplit = splitValue;
				bestTotalWeight = benefits[1];
				bestSplitType = Split.LESS_SPLIT;
			}
			if ((benefits[2] > minValue)
					&& (benefits[2] > 0)
					&& (benefits[3] > 0)
					&& ((benefits[2] > bestBenefit) || ((benefits[2] == bestBenefit) && (benefits[3] > bestTotalWeight)))) {
				bestBenefit = benefits[2];
				bestSplit = splitValue;
				bestTotalWeight = benefits[3];
				bestSplitType = Split.GREATER_SPLIT;
			}
			oldLabel = label;
		}
		lastValue = currentValue;
		criterion.update(e);
	}
	return new Split(bestSplit, new double[] { bestBenefit, bestTotalWeight }, bestSplitType);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:55,代码来源:NumericalSplitter.java

示例3: createPreprocessingModel

@Override
public PreprocessingModel createPreprocessingModel(ExampleSet exampleSet) throws OperatorException {
	HashMap<Attribute, double[]> ranges = new HashMap<Attribute, double[]>();
	// Get and check parametervalues
	boolean useSqrt = getParameterAsBoolean(PARAMETER_USE_SQRT_OF_EXAMPLES);
	int numberOfBins = 0;
	if (!useSqrt) {
		// if not automatic sizing of bins, use parametervalue
		numberOfBins = getParameterAsInt(PARAMETER_NUMBER_OF_BINS);
		if (numberOfBins >= (exampleSet.size() - 1)) {
			throw new UserError(this, 116, PARAMETER_NUMBER_OF_BINS,
					"number of bins must be smaller than number of examples (here: " + exampleSet.size() + ")");
		}
	} else {
		exampleSet.recalculateAllAttributeStatistics();
	}

	for (Attribute currentAttribute : exampleSet.getAttributes()) {
		if (useSqrt) {
			numberOfBins = (int) Math.round(Math.sqrt(exampleSet.size()
					- (int) exampleSet.getStatistics(currentAttribute, Statistics.UNKNOWN)));
		}
		double[] attributeRanges = new double[numberOfBins];
		ExampleSet sortedSet = new SortedExampleSet(exampleSet, currentAttribute, SortedExampleSet.INCREASING);

		// finding ranges
		double examplesPerBin = exampleSet.size() / (double) numberOfBins;
		double currentBinSpace = examplesPerBin;
		double lastValue = Double.NaN;
		int currentBin = 0;

		for (Example example : sortedSet) {
			double value = example.getValue(currentAttribute);
			if (!Double.isNaN(value)) {
				// change bin if full and not last
				if (currentBinSpace < 1 && currentBin < numberOfBins && value != lastValue) {
					if (!Double.isNaN(lastValue)) {
						attributeRanges[currentBin] = (lastValue + value) / 2;
						currentBin++;
						currentBinSpace += examplesPerBin; // adding because same values might
															// cause binspace to be negative
						if (currentBinSpace < 1) {
							throw new UserError(this, 944, currentAttribute.getName());
						}
					}
				}
				currentBinSpace--;
				lastValue = value;
			}
		}
		attributeRanges[numberOfBins - 1] = Double.POSITIVE_INFINITY;
		ranges.put(currentAttribute, attributeRanges);
	}
	DiscretizationModel model = new DiscretizationModel(exampleSet);

	// determine number of digits
	int numberOfDigits = -1;
	if (getParameterAsBoolean(PARAMETER_AUTOMATIC_NUMBER_OF_DIGITS) == false) {
		numberOfDigits = getParameterAsInt(PARAMETER_NUMBER_OF_DIGITS);
	}

	model.setRanges(ranges, "range", getParameterAsInt(PARAMETER_RANGE_NAME_TYPE), numberOfDigits);
	return model;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:64,代码来源:FrequencyDiscretization.java

示例4: doWork

@Override
public void doWork() throws OperatorException {
	ExampleSet requestSet = requestSetInput.getData(ExampleSet.class);
	ExampleSet documentSet = referenceSetInput.getData(ExampleSet.class);
	Tools.checkAndCreateIds(requestSet);
	Tools.checkAndCreateIds(documentSet);

	DistanceMeasure measure = DistanceMeasures.createMeasure(this);
	measure.init(requestSet.getAttributes(), documentSet.getAttributes());

	Attribute oldRequestId = requestSet.getAttributes().getId();
	Attribute oldDocumentId = documentSet.getAttributes().getId();

	// creating new exampleSet
	Attribute requestId = AttributeFactory.createAttribute("request", oldRequestId.getValueType());
	Attribute documentId = AttributeFactory.createAttribute("document", oldDocumentId.getValueType());
	Attribute distance = AttributeFactory.createAttribute("distance", Ontology.REAL);

	List<Attribute> newAttributes = new LinkedList<Attribute>();
	Collections.addAll(newAttributes, requestId, documentId, distance);
	ExampleSetBuilder builder = ExampleSets.from(newAttributes);

	double searchModeFactor = getParameterAsInt(PARAMETER_SEARCH_MODE) == MODE_FARTHEST ? -1d : 1d;
	boolean computeSimilarity = getParameterAsBoolean(PARAMETER_COMPUTE_SIMILARITIES);
	boolean useK = getParameterAsBoolean(PARAMETER_USE_K);
	int k = getParameterAsInt(PARAMETER_K);

	for (Example request : requestSet) {
		Collection<Tupel<Double, Double>> distances;
		if (useK) {
			distances = new BoundedPriorityQueue<Tupel<Double, Double>>(k);
		} else {
			distances = new ArrayList<Tupel<Double, Double>>();
		}

		// calculating distance
		for (Example document : documentSet) {
			if (computeSimilarity) {
				distances
						.add(new Tupel<Double, Double>(measure.calculateSimilarity(request, document) * searchModeFactor,
								document.getValue(oldDocumentId)));
			} else {
				distances.add(new Tupel<Double, Double>(measure.calculateDistance(request, document) * searchModeFactor,
						document.getValue(oldDocumentId)));
			}
			checkForStop();
		}

		// writing into table
		DataRowFactory factory = new DataRowFactory(DataRowFactory.TYPE_DOUBLE_ARRAY, '.');
		double requestIdValue = request.getValue(oldRequestId);
		if (oldRequestId.isNominal()) {
			requestIdValue = requestId.getMapping().mapString(request.getValueAsString(oldRequestId));
		}

		for (Tupel<Double, Double> tupel : distances) {
			double documentIdValue = tupel.getSecond();
			if (oldDocumentId.isNominal()) {
				documentIdValue = documentId.getMapping()
						.mapString(oldDocumentId.getMapping().mapIndex((int) documentIdValue));
			}
			DataRow row = factory.create(3);
			row.set(distance, tupel.getFirst() * searchModeFactor);
			row.set(requestId, requestIdValue);
			row.set(documentId, documentIdValue);
			builder.addDataRow(row);
			checkForStop();
		}
	}

	// sorting set
	ExampleSet result = new SortedExampleSet(builder.build(), distance,
			searchModeFactor == -1d ? SortedExampleSet.DECREASING : SortedExampleSet.INCREASING);

	requestSetOutput.deliver(requestSet);
	referenceSetOutput.deliver(documentSet);
	resultSetOutput.deliver(result);
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:78,代码来源:CrossDistancesOperator.java

示例5: getBestSplit

public Split getBestSplit(ExampleSet inputSet, Attribute attribute, String labelName) {
	SortedExampleSet exampleSet = new SortedExampleSet(inputSet, attribute, SortedExampleSet.INCREASING);

	Attribute labelAttribute = exampleSet.getAttributes().getLabel();
	int labelIndex = labelAttribute.getMapping().mapString(labelName);

	double oldLabel = Double.NaN;
	double bestSplit = Double.NaN;
	double lastValue = Double.NaN;
	double bestBenefit = Double.NEGATIVE_INFINITY;
	double bestTotalWeight = 0;
	int bestSplitType = Split.LESS_SPLIT;

	// initiating online counting of benefit: only 2 Datascans needed then
	criterion.reinitOnlineCounting(exampleSet);
	for (Example e : exampleSet) {
		double currentValue = e.getValue(attribute);
		double label = e.getValue(labelAttribute);
		if ((Double.isNaN(oldLabel)) || (oldLabel != label) && (lastValue != currentValue)) {
			double splitValue = (lastValue + currentValue) / 2.0d;

			double[] benefits;
			if (labelName == null) {
				benefits = criterion.getOnlineBenefit(e);
			} else {
				benefits = criterion.getOnlineBenefit(e, labelIndex);
			}
			// online method returns both possible relations in one array(greater / smaller) in
			// one array
			if ((benefits[0] > minValue)
					&& (benefits[0] > 0)
					&& (benefits[1] > 0)
					&& ((benefits[0] > bestBenefit) || ((benefits[0] == bestBenefit) && (benefits[1] > bestTotalWeight)))) {
				bestBenefit = benefits[0];
				bestSplit = splitValue;
				bestTotalWeight = benefits[1];
				bestSplitType = Split.LESS_SPLIT;
			}
			if ((benefits[2] > minValue)
					&& (benefits[2] > 0)
					&& (benefits[3] > 0)
					&& ((benefits[2] > bestBenefit) || ((benefits[2] == bestBenefit) && (benefits[3] > bestTotalWeight)))) {
				bestBenefit = benefits[2];
				bestSplit = splitValue;
				bestTotalWeight = benefits[3];
				bestSplitType = Split.GREATER_SPLIT;
			}
			oldLabel = label;
		}
		lastValue = currentValue;
		criterion.update(e);
	}
	return new Split(bestSplit, new double[] { bestBenefit, bestTotalWeight }, bestSplitType);
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:54,代码来源:NumericalSplitter.java

示例6: doWork

@Override
public void doWork() throws OperatorException {
    ExampleSet requestSet = requestSetInput.getData(ExampleSet.class);
    ExampleSet documentSet = referenceSetInput.getData(ExampleSet.class);
    Tools.checkAndCreateIds(requestSet);
    Tools.checkAndCreateIds(documentSet);

    DistanceMeasure measure = DistanceMeasures.createMeasure(this);
    measure.init(requestSet.getAttributes(), documentSet.getAttributes());

    Attribute oldRequestId = requestSet.getAttributes().getId();
    Attribute oldDocumentId = documentSet.getAttributes().getId();

    // creating new exampleSet
    Attribute requestId = AttributeFactory.createAttribute("request", oldRequestId.getValueType());
    Attribute documentId = AttributeFactory.createAttribute("document", oldDocumentId.getValueType());
    Attribute distance = AttributeFactory.createAttribute("distance", Ontology.REAL);

    List<Attribute> newAttributes = new LinkedList<Attribute>();
    Collections.addAll(newAttributes, requestId, documentId, distance);
    MemoryExampleTable table = new MemoryExampleTable(newAttributes);

    double searchModeFactor = getParameterAsInt(PARAMETER_SEARCH_MODE) == MODE_FARTHEST ? -1d : 1d;
    boolean computeSimilarity = getParameterAsBoolean(PARAMETER_COMPUTE_SIMILARITIES);

    for (Example request: requestSet) {
        Collection<Tupel<Double, Double>> distances;
        if (getParameterAsBoolean(PARAMETER_USE_K))
            distances = new BoundedPriorityQueue<Tupel<Double,Double>>(getParameterAsInt(PARAMETER_K));
        else
            distances = new ArrayList<Tupel<Double,Double>>();

        // calculating distance
        for (Example document: documentSet) {
            if (computeSimilarity)
                distances.add(new Tupel<Double, Double>(measure.calculateSimilarity(request, document) * searchModeFactor, document.getValue(oldDocumentId)));
            else
                distances.add(new Tupel<Double, Double>(measure.calculateDistance(request, document) * searchModeFactor, document.getValue(oldDocumentId)));
            checkForStop();
        }

        // writing into table
        DataRowFactory factory = new DataRowFactory(DataRowFactory.TYPE_DOUBLE_ARRAY, '.');
        double requestIdValue = request.getValue(oldRequestId);
        if (oldRequestId.isNominal())
            requestIdValue = requestId.getMapping().mapString(request.getValueAsString(oldRequestId));

        for (Tupel<Double, Double> tupel: distances) {
            double documentIdValue = tupel.getSecond();
            if (oldDocumentId.isNominal())
                documentIdValue = documentId.getMapping().mapString(oldDocumentId.getMapping().mapIndex((int) documentIdValue));
            DataRow row = factory.create(3);
            row.set(distance, tupel.getFirst() *  searchModeFactor);
            row.set(requestId, requestIdValue);
            row.set(documentId, documentIdValue);
            table.addDataRow(row);
            checkForStop();
        }
    }

    // sorting set
    ExampleSet result = new SortedExampleSet(table.createExampleSet(), distance, searchModeFactor == -1d ? SortedExampleSet.DECREASING : SortedExampleSet.INCREASING);

    requestSetOutput.deliver(requestSet);
    referenceSetOutput.deliver(documentSet);
    resultSetOutput.deliver(result);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:67,代码来源:CrossDistancesOperator.java

示例7: getBestSplit

public Split getBestSplit(ExampleSet inputSet, Attribute attribute, String labelName) {
    SortedExampleSet exampleSet = new SortedExampleSet((ExampleSet)inputSet.clone(), attribute, SortedExampleSet.INCREASING);
    
    Attribute labelAttribute = exampleSet.getAttributes().getLabel();
    int labelIndex = labelAttribute.getMapping().mapString(labelName);
    
    double oldLabel = Double.NaN;
    double bestSplit = Double.NaN;
    double lastValue = Double.NaN;
    double bestBenefit = Double.NEGATIVE_INFINITY;
    double bestTotalWeight = 0;
    int bestSplitType = Split.LESS_SPLIT;

    // initiating online counting of benefit: only 2 Datascans needed then
    criterion.reinitOnlineCounting(exampleSet);
    for (Example e : exampleSet) {
    	double currentValue = e.getValue(attribute);
    	double label = e.getValue(labelAttribute);            
    	if ((Double.isNaN(oldLabel)) || (oldLabel != label) && (lastValue != currentValue)) {
    		double splitValue = (lastValue + currentValue) / 2.0d;
   		
    		double[] benefits;
    		if (labelName == null) {
    			benefits = criterion.getOnlineBenefit(e);
    		} else {
    			benefits = criterion.getOnlineBenefit(e, labelIndex);
    		}
    		// online method returns both possible relations in one array(greater / smaller) in one array
            if ((benefits[0] > minValue) &&
                (benefits[0] > 0) && (benefits[1] > 0) &&
                ((benefits[0] > bestBenefit) || 
                ((benefits[0] == bestBenefit) && (benefits[1] > bestTotalWeight)))) {
    			bestBenefit = benefits[0];
    			bestSplit = splitValue;
    			bestTotalWeight = benefits[1];
    			bestSplitType = Split.LESS_SPLIT;
    		}
            if ((benefits[2] > minValue) &&
                (benefits[2] > 0) && (benefits[3] > 0) &&
                ((benefits[2] > bestBenefit) || 
                ((benefits[2] == bestBenefit) && (benefits[3] > bestTotalWeight)))) {
    			bestBenefit = benefits[2];
    			bestSplit = splitValue;
    			bestTotalWeight = benefits[3];
    			bestSplitType = Split.GREATER_SPLIT;
    		}
    		oldLabel = label;
    	}
        lastValue = currentValue;
    	criterion.update(e);
    }
    return new Split(bestSplit, new double[] { bestBenefit, bestTotalWeight }, bestSplitType);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:53,代码来源:NumericalSplitter.java

示例8: createPreprocessingModel

@Override
public PreprocessingModel createPreprocessingModel(ExampleSet exampleSet) throws OperatorException {
	HashMap<Attribute, double[]> ranges = new HashMap<Attribute, double[]>();
	// Get and check parametervalues
	boolean useSqrt = getParameterAsBoolean(PARAMETER_USE_SQRT_OF_EXAMPLES);
	int numberOfBins = 0;
	if (!useSqrt) {
		// if not automatic sizing of bins, use parametervalue
		numberOfBins = getParameterAsInt(PARAMETER_NUMBER_OF_BINS);
		if (numberOfBins >= (exampleSet.size() - 1)) {
			throw new UserError(this, 116, PARAMETER_NUMBER_OF_BINS, "number of bins must be smaller than number of examples (here: " + exampleSet.size() + ")");
		}
	} else {
		exampleSet.recalculateAllAttributeStatistics();
	}

	for (Attribute currentAttribute : exampleSet.getAttributes()) {
		if (useSqrt) {
			numberOfBins = (int)Math.round(Math.sqrt(exampleSet.size() - (int) exampleSet.getStatistics(currentAttribute, Statistics.UNKNOWN)));
		}
		double[] attributeRanges = new double[numberOfBins];
		ExampleSet sortedSet = new SortedExampleSet(exampleSet, currentAttribute, SortedExampleSet.INCREASING);

		// finding ranges
		double examplesPerBin = exampleSet.size() / (double) numberOfBins;
		double currentBinSpace = examplesPerBin;
		double lastValue = Double.NaN;
		int currentBin = 0;

		for (Example example : sortedSet) {
			double value = example.getValue(currentAttribute);
			if (!Double.isNaN(value)) {
				// change bin if full and not last
				if (currentBinSpace < 1 && currentBin < numberOfBins && value != lastValue) {
					if (!Double.isNaN(lastValue)) {
						attributeRanges[currentBin] = (lastValue + value) / 2;
						currentBin++;
						currentBinSpace += examplesPerBin; //adding because same values might cause binspace to be negative
						if (currentBinSpace < 1)
							throw new UserError(this, 944, currentAttribute.getName());
					}
				}
				currentBinSpace--;
				lastValue = value;
			}
		}
		attributeRanges[numberOfBins - 1] = Double.POSITIVE_INFINITY;
		ranges.put(currentAttribute, attributeRanges);
	}
	DiscretizationModel model = new DiscretizationModel(exampleSet);

	// determine number of digits
	int numberOfDigits = -1;
	if (getParameterAsBoolean(PARAMETER_AUTOMATIC_NUMBER_OF_DIGITS) == false) {
		numberOfDigits = getParameterAsInt(PARAMETER_NUMBER_OF_DIGITS);
	}

	model.setRanges(ranges, "range", getParameterAsInt(PARAMETER_RANGE_NAME_TYPE), numberOfDigits);
	return model;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:60,代码来源:FrequencyDiscretization.java


注:本文中的com.rapidminer.example.set.SortedExampleSet.INCREASING属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。