<!--
{
  "availability" : [
    "macOS: 10.15.0 - 14.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLRecommender/ModelParameters-swift.struct/init(algorithm:threshold:maxCount:nearestItems:maxSimilarityIterations:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML13MLRecommenderV15ModelParametersV9algorithm9threshold8maxCount12nearestItems0H20SimilarityIterationsAeC0D13AlgorithmTypeO_SdSiAA11MLDataTableVSgSitcfc"
  },
  "title" : "init(algorithm:threshold:maxCount:nearestItems:maxSimilarityIterations:)"
}
-->

# init(algorithm:threshold:maxCount:nearestItems:maxSimilarityIterations:)

Creates a new set of recommender configuration parameters.

```
init(algorithm: MLRecommender.ModelAlgorithmType = .itemSimilarity(.cosine), threshold: Double = 0.001, maxCount: Int = 64, nearestItems: MLDataTable?, maxSimilarityIterations: Int = 1024)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)