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

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

Creates a new set of recommender configuration parameters.

```
init(algorithm: MLRecommender.ModelAlgorithmType = .itemSimilarity(.cosine), threshold: Double = 0.001, maxCount: Int = 64, nearestItemsDataFrame: DataFrame?, 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)