Сделайте cactus
a prefab.
Затем создайте общедоступную переменную:
public GameObject cactus;
Затем перетащите префикс в переменную скрипта через редактор. Затем вы можете создать экземпляр.
if(cactus != null)
{
GameObject g = Instantiate(cactus, new Vector3(xCoB, childVector3.y, zCoB), randomRotation) as GameObject;
g.name = "cactus";
}
from pyspark.ml import Pipeline
from pyspark.ml.classification import RandomForestClassifier
from pyspark.ml.evaluation import BinaryClassificationEvaluator
from pyspark.ml.tuning import CrossValidator, ParamGridBuilder
rf = RandomForestClassifier(labelCol="indexedLabel", featuresCol="indexedFeatures", numTrees=10)
pipeline = Pipeline(stages=[rf])
paramGrid = ParamGridBuilder().addGrid(rf.numTrees, [10, 30]).build()
crossval = CrossValidator(estimator=pipeline,
estimatorParamMaps=paramGrid,
evaluator=BinaryClassificationEvaluator(),
numFolds=2)
cvModel = crossval.fit(training_df)
гиперпараметры и сетка определены в методе addGrid