{
  "id": "task_libraries:machine-learning/python",
  "path": "/exapedia/python-machine-learning-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python machine learning libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python machine learning libraries train models that make predictions from data. These libraries train the models behind forecasts, recommendations, fraud checks, and classification in apps."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python machine learning libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#scikit-learn",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F172"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pytorch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F188"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xgboost",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#lightgbm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F220"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jax",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F236"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F240"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tensorflow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F254"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#keras",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F270"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F279"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F274"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#catboost",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F288"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F289"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F295"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F292"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F290"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "PyPI"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#scikit-learn",
          "label": [
            {
              "t": "fact",
              "fact": "F172"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most installs, while "
        },
        {
          "t": "link",
          "href": "#tensorflow",
          "label": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most GitHub stars."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "GPU training",
            "Early stopping"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#scikit-learn",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F172"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#pytorch",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F188"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#xgboost",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#lightgbm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F220"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jax",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F236"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#tensorflow",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F254"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#keras",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F270"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F280"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F281"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#catboost",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F288"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F296"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F297"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "scikit-learn",
          "name": [
            {
              "t": "fact",
              "fact": "F172"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/scikit-learn/scikit-learn"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/scikit-learn"
            },
            {
              "label": "Docs",
              "href": "https://scikit-learn.org/stable/getting_started.html"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "scikit-learn is a machine learning module for Python built on NumPy and SciPy, which pip installs alongside it. Every model is an estimator with the same two methods. "
            },
            {
              "t": "code",
              "text": "fit"
            },
            {
              "t": "text",
              "text": " trains the estimator on rows of data, while "
            },
            {
              "t": "code",
              "text": "predict"
            },
            {
              "t": "text",
              "text": " returns its answers for new rows. Classification, regression, clustering, and preprocessing tools all share that interface. A "
            },
            {
              "t": "code",
              "text": "Pipeline"
            },
            {
              "t": "text",
              "text": " uses it to chain a scaler and a model into one estimator that cross-validation can score."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://scikit-learn.org/stable/getting_started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F172"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F186"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def fit(\n    self,\n    X,\n    y,\n    sample_weight=None,\n    X_validation=None,\n    y_validation=None,\n    sample_weight_validation=None,\n    log_to_file=None,\n    max_time=None,\n):\n    rows_count = len(X) + (len(X_validation) if X_validation is not None else 0)\n    n_estimators = self.tree_count(rows_count)\n    # Validation labels do not select the forest size. Disable warm start\n    # so fitting the same learner again cannot retain trees from old data.\n    self.model.set_params(n_estimators=n_estimators, warm_start=False)\n    with warnings.catch_warnings():\n        warnings.simplefilter(action=\"ignore\")\n        self.model.fit(X, np.ravel(y), sample_weight=sample_weight)\n    self.params[\"n_estimators\"] = n_estimators\n\n    if log_to_file is not None:\n        train_score = self.log_metric(\n            y, self.predict_function(self.model, X), sample_weight=sample_weight\n        )\n        validation_score = np.nan\n        if X_validation is not None and y_validation is not None:\n            validation_score = self.log_metric(\n                y_validation,\n                self.predict_function(self.model, X_validation),\n                sample_weight=sample_weight_validation,\n            )\n        # Log the final forest only; there is no selected validation peak.\n        df_result = pd.DataFrame({\n            \"iteration\": [n_estimators - 1],\n            \"train\": [train_score],\n            \"validation\": [validation_score],\n        })\n        if self.log_metric.is_negative():\n            df_result[\"train\"] *= -1.0\n            df_result[\"validation\"] *= -1.0\n        df_result.to_csv(log_to_file, index=False, header=False)\n\n    if self.params.get(\"ml_task\") != REGRESSION:\n        self.classes_ = self.model.classes_\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised/blob/c4c26aa0d7d974e4b04007535b3b45cbd00b05bf/supervised/algorithms/sklearn.py#L99-L143",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20scikit-learn&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F172"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from sklearn.ensemble import RandomForestClassifier\nclf = RandomForestClassifier(random_state=0)\nX = [[ 1,  2,  3],  # 2 samples, 3 features\n     [11, 12, 13]]\ny = [0, 1]  # classes of each sample\nclf.fit(X, y)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://scikit-learn.org/stable/getting_started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting_started.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "pytorch",
          "name": [
            {
              "t": "fact",
              "fact": "F188"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pytorch/pytorch"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/torch"
            },
            {
              "label": "Docs",
              "href": "https://docs.pytorch.org/tutorials/beginner/examples_nn/polynomial_nn.html"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "PyTorch pairs a tensor library with GPU support and an automatic differentiation engine, "
            },
            {
              "t": "code",
              "text": "torch.autograd"
            },
            {
              "t": "text",
              "text": ". The engine records operations as code runs and replays them backward to compute gradients. Neural network layers come from "
            },
            {
              "t": "code",
              "text": "torch.nn"
            },
            {
              "t": "text",
              "text": ", while "
            },
            {
              "t": "code",
              "text": "DataLoader"
            },
            {
              "t": "text",
              "text": " in "
            },
            {
              "t": "code",
              "text": "torch.utils"
            },
            {
              "t": "text",
              "text": " feeds batches during training. A model can change its structure from one input to the next, which the README contrasts with frameworks that fix a network before training. The install command differs for CUDA, ROCm, and CPU builds, so a selector on the PyTorch site generates it."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.pytorch.org/tutorials/beginner/examples_nn/polynomial_nn.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F188"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Layers and loops only"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "Training loops, early stopping, and checkpointing are written by hand or added through a library such as Lightning."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/sentence-transformers",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F202"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def cos_sim(a: list | np.ndarray | Tensor, b: list | np.ndarray | Tensor) -> Tensor:\n    \"\"\"\n    Computes the cosine similarity between two tensors.\n\n    Args:\n        a (Union[list, np.ndarray, Tensor]): The first tensor.\n        b (Union[list, np.ndarray, Tensor]): The second tensor.\n\n    Returns:\n        Tensor: Matrix with res[i][j] = cos_sim(a[i], b[j])\n    \"\"\"\n    a = _convert_to_batch_tensor(a)\n    b = _convert_to_batch_tensor(b)\n\n    a_norm = normalize_embeddings(a)\n    b_norm = normalize_embeddings(b)\n    return torch.mm(a_norm, b_norm.transpose(0, 1)).to_dense()\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/huggingface/sentence-transformers/blob/8809a890afdd79b40a384a595452f24289ea34ea/sentence_transformers/util/similarity.py#L59-L75",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20torch&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F188"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import torch\n\ndata = [[1, 2],[3, 4]]\nx_data = torch.tensor(data)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/pytorch/tutorials/main/beginner_source/basics/tensorqs_tutorial.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "tensorqs_tutorial.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F193"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "xgboost",
          "name": [
            {
              "t": "fact",
              "fact": "F204"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/dmlc/xgboost"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/xgboost"
            },
            {
              "label": "Docs",
              "href": "https://xgboost.readthedocs.io/en/stable/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "XGBoost trains gradient-boosted decision trees on one machine or across Kubernetes, Hadoop, Dask, or Spark. "
            },
            {
              "t": "code",
              "text": "XGBClassifier"
            },
            {
              "t": "text",
              "text": " and "
            },
            {
              "t": "code",
              "text": "XGBRegressor"
            },
            {
              "t": "text",
              "text": " follow the scikit-learn "
            },
            {
              "t": "code",
              "text": "fit"
            },
            {
              "t": "text",
              "text": " and "
            },
            {
              "t": "code",
              "text": "predict"
            },
            {
              "t": "text",
              "text": " interface, so they work inside scikit-learn pipelines. Tree boosters learn which branch missing values take during training, so gaps in the data need no filling first. Like "
            },
            {
              "t": "link",
              "href": "#lightgbm",
              "label": [
                {
                  "t": "text",
                  "text": "LightGBM"
                }
              ]
            },
            {
              "t": "text",
              "text": ", XGBoost builds trees from histograms of each feature when "
            },
            {
              "t": "code",
              "text": "tree_method"
            },
            {
              "t": "text",
              "text": " is set to "
            },
            {
              "t": "code",
              "text": "hist"
            },
            {
              "t": "text",
              "text": "."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://xgboost.readthedocs.io/en/stable/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F63"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F218"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def predict(self, X):\n    self.reload()\n\n    if self.model is None:\n        raise XgbAlgorithmException(\"Xgboost model is None\")\n\n    dtrain = xgb.DMatrix(\n        X.values if isinstance(X, pd.DataFrame) else X, missing=np.nan\n    )\n    # xgboost > 2.0.0 version\n    if hasattr(self.model, \"best_iteration\"):\n        a = self.model.predict(\n            dtrain, iteration_range=(0, self.model.best_iteration + 1)\n        )\n    else:\n        a = self.model.predict(dtrain)\n\n    return a\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised/blob/c4c26aa0d7d974e4b04007535b3b45cbd00b05bf/supervised/algorithms/xgboost.py#L338-L355",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20xgboost&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from sklearn.datasets import load_breast_cancer\nfrom sklearn.model_selection import train_test_split\n\nimport xgboost as xgb\n\nX, y = load_breast_cancer(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=94)\n\n# Use \"hist\" for constructing the trees, with early stopping enabled.\nclf = xgb.XGBClassifier(tree_method=\"hist\", early_stopping_rounds=2)\n# Fit the model, test sets are used for early stopping.\nclf.fit(X_train, y_train, eval_set=[(X_test, y_test)])\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://xgboost.readthedocs.io/en/stable/python/sklearn_estimator.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "sklearn_estimator.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F209"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "lightgbm",
          "name": [
            {
              "t": "fact",
              "fact": "F220"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/lightgbm-org/LightGBM"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/lightgbm"
            },
            {
              "label": "Docs",
              "href": "https://lightgbm.readthedocs.io/en/stable/Features.html"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "LightGBM is a gradient boosting framework, first released by Microsoft and now maintained at lightgbm-org. Before searching for splits, the library buckets each feature's values into histograms to lower memory use. Trees grow one leaf at a time, choosing the leaf with the largest drop in loss. On small datasets that growth can overfit, so the docs suggest capping "
            },
            {
              "t": "code",
              "text": "max_depth"
            },
            {
              "t": "text",
              "text": ". In Python, "
            },
            {
              "t": "code",
              "text": "lgb.Dataset"
            },
            {
              "t": "text",
              "text": " wraps the training arrays and labels, with categorical columns kept as integer codes instead of one-hot columns."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://lightgbm.readthedocs.io/en/stable/Features.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F220"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def fit(\n    self,\n    X,\n    y,\n    sample_weight=None,\n    X_validation=None,\n    y_validation=None,\n    sample_weight_validation=None,\n    log_to_file=None,\n    max_time=None,\n):\n    lgb_train = lgb.Dataset(\n        X.values if isinstance(X, pd.DataFrame) else X,\n        y,\n        weight=sample_weight,\n    )\n    valid_sets = None\n    if self.early_stopping_rounds == 0:\n        self.model = lgb.train(\n            self.learner_params,\n            lgb_train,\n            num_boost_round=self.rounds,\n            init_model=self.model,\n        )\n    else:\n        valid_names = None\n        esr = None\n        if X_validation is not None and y_validation is not None:\n            valid_sets = [\n                lgb_train,\n                lgb.Dataset(\n                    (\n                        X_validation.values\n                        if isinstance(X_validation, pd.DataFrame)\n                        else X_validation\n                    ),\n                    y_validation,\n                    weight=sample_weight_validation,\n                ),\n            ]\n            valid_names = [\"train\", \"validation\"]\n            esr = self.early_stopping_rounds\n        evals_result = {}\n\n        # disable for now ...\n        # boosting_rounds = self.get_boosting_rounds(lgb_train, valid_sets, esr, max_time)\n\n        self.model = lgb.train(\n            self.learner_params,\n            lgb_train,\n            num_boost_round=self.rounds,\n            valid_sets=valid_sets,\n            valid_names=valid_names,\n            feval=self.custom_eval_metric,\n            callbacks=[\n                lgb.early_stopping(esr, verbose=False),\n                lgb.record_evaluation(evals_result),\n            ],\n        )\n\n        del lgb_train\n        if valid_sets is not None:\n            del valid_sets[0]\n            del valid_sets\n\n        if log_to_file is not None:\n            metric_name = list(evals_result[\"train\"].keys())[0]\n            result = pd.DataFrame(\n                {\n                    \"iteration\": range(len(evals_result[\"train\"][metric_name])),\n                    \"train\": evals_result[\"train\"][metric_name],\n                    \"validation\": evals_result[\"validation\"][metric_name],\n                }\n            )\n            result.to_csv(log_to_file, index=False, header=False)\n\n        if self.params[\"ml_task\"] != REGRESSION:\n            self.classes_ = np.unique(y)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised/blob/c4c26aa0d7d974e4b04007535b3b45cbd00b05bf/supervised/algorithms/lightgbm.py#L199-L276",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20lightgbm&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F220"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import lightgbm as lgb\n\nimport numpy as np\n\nrng = np.random.default_rng()\ndata = rng.uniform(size=(500, 10))  # 500 entities, each contains 10 features\nlabel = rng.integers(low=0, high=2, size=(500, ))  # binary target\ntrain_data = lgb.Dataset(data, label=label)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://lightgbm.readthedocs.io/en/stable/Python-Intro.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "Python-Intro.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F225"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "jax",
          "name": [
            {
              "t": "fact",
              "fact": "F236"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/jax-ml/jax"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/jax"
            },
            {
              "label": "Docs",
              "href": "https://docs.jax.dev/en/latest/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "JAX runs NumPy-style array code on CPUs, GPUs, and TPUs and transforms Python functions. Three transformations do most of the work. "
            },
            {
              "t": "code",
              "text": "jax.grad"
            },
            {
              "t": "text",
              "text": " returns a function's gradient, "
            },
            {
              "t": "code",
              "text": "jax.jit"
            },
            {
              "t": "text",
              "text": " compiles a function with XLA, a compiler for accelerators, and "
            },
            {
              "t": "code",
              "text": "jax.vmap"
            },
            {
              "t": "text",
              "text": " maps a function over a batch dimension. Because the transformations compose, "
            },
            {
              "t": "code",
              "text": "jax.jit(jax.grad(loss))"
            },
            {
              "t": "text",
              "text": " is a compiled gradient function. GPU and TPU builds install as extras of the "
            },
            {
              "t": "code",
              "text": "jax"
            },
            {
              "t": "text",
              "text": " package."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.jax.dev/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F236"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F312"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F313"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F314"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F315"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F316"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F317"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F318"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F319"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/google-deepmind/dm-haiku",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F252"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def loss(params: hk.Params, batch: Batch) -> jax.Array:\n  \"\"\"Cross-entropy classification loss, regularised by L2 weight decay.\"\"\"\n  batch_size, *_ = batch.image.shape\n  logits = network.apply(params, batch.image)\n  labels = jax.nn.one_hot(batch.label, NUM_CLASSES)\n\n  l2_regulariser = 0.5 * sum(\n      jnp.sum(jnp.square(p)) for p in jax.tree.leaves(params)\n  )\n  log_likelihood = jnp.sum(labels * jax.nn.log_softmax(logits))\n\n  return -log_likelihood / batch_size + 1e-4 * l2_regulariser\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/google-deepmind/dm-haiku/blob/4ec60bb58723d5db5aa11c12b3fc6374b5b01726/examples/mnist.py#L76-L87",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F251"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=jax%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F236"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import jax\nimport jax.numpy as jnp\n\ndef tanh(x):\n  y = jnp.exp(-2.0 * x)\n  return (1.0 - y) / (1.0 + y)\n\ngrad_tanh = jax.grad(tanh)\nprint(grad_tanh(1.0))\n# prints 0.4199743\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/jax-ml/jax/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F241"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "tensorflow",
          "name": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/tensorflow/tensorflow"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/tensorflow"
            },
            {
              "label": "Docs",
              "href": "https://www.tensorflow.org/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "TensorFlow is a machine learning platform first built by the Google Brain team, with stable Python and C++ APIs. "
            },
            {
              "t": "code",
              "text": "pip install tensorflow"
            },
            {
              "t": "text",
              "text": " includes CUDA support for NVIDIA GPUs. A smaller package, "
            },
            {
              "t": "code",
              "text": "tensorflow-cpu"
            },
            {
              "t": "text",
              "text": ", leaves GPU support out. Trained models export as a SavedModel for serving, and LiteRT runs them on Android. Models are usually built with "
            },
            {
              "t": "link",
              "href": "#keras",
              "label": [
                {
                  "t": "text",
                  "text": "Keras"
                }
              ]
            },
            {
              "t": "text",
              "text": ", which runs on TensorFlow as one of its backends."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F255"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.tensorflow.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F254"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F114"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F115"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F116"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F117"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F118"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F119"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/serengil/deepface",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F268"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def ResNet34() -> Model:\n    \"\"\"\n    ResNet34 model\n    Returns:\n        model (Model)\n    \"\"\"\n    img_input = Input(shape=(112, 112, 3))\n\n    x = ZeroPadding2D(padding=1, name=\"conv1_pad\")(img_input)\n    x = Conv2D(\n        64, 3, strides=1, use_bias=False, kernel_initializer=\"glorot_normal\", name=\"conv1_conv\"\n    )(x)\n    x = BatchNormalization(axis=3, epsilon=2e-5, momentum=0.9, name=\"conv1_bn\")(x)\n    x = PReLU(shared_axes=[1, 2], name=\"conv1_prelu\")(x)\n    x = stack_fn(x)\n\n    model = Model(img_input, x, name=\"ResNet34\")\n\n    return model\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/serengil/deepface/blob/ce9ad19055c5671258f20a0abb07bd2ca86f5f42/deepface/models/facial_recognition/tf/ArcFace.py#L98-L116",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F267"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20tensorflow&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F254"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import tensorflow as tf\nmnist = tf.keras.datasets.mnist\n\n(x_train, y_train),(x_test, y_test) = mnist.load_data()\nx_train, x_test = x_train / 255.0, x_test / 255.0\n\nmodel = tf.keras.models.Sequential([\n  tf.keras.layers.Flatten(input_shape=(28, 28)),\n  tf.keras.layers.Dense(128, activation='relu'),\n  tf.keras.layers.Dropout(0.2),\n  tf.keras.layers.Dense(10, activation='softmax')\n])\n\nmodel.compile(optimizer='adam',\n  loss='sparse_categorical_crossentropy',\n  metrics=['accuracy'])\n\nmodel.fit(x_train, y_train, epochs=5)\nmodel.evaluate(x_test, y_test)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.tensorflow.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "tensorflow.org"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F259"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "keras",
          "name": [
            {
              "t": "fact",
              "fact": "F270"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/keras-team/keras"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/keras"
            },
            {
              "label": "Docs",
              "href": "https://keras.io/about/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Keras is a deep learning API that runs on JAX, TensorFlow, or PyTorch, and on OpenVINO for inference only. The backend comes from the "
            },
            {
              "t": "code",
              "text": "KERAS_BACKEND"
            },
            {
              "t": "text",
              "text": " environment variable or the "
            },
            {
              "t": "code",
              "text": "keras.json"
            },
            {
              "t": "text",
              "text": " config file. Models are built from layers, for example with "
            },
            {
              "t": "code",
              "text": "keras.Sequential"
            },
            {
              "t": "text",
              "text": ". Training goes through "
            },
            {
              "t": "code",
              "text": "fit"
            },
            {
              "t": "text",
              "text": ", which accepts "
            },
            {
              "t": "code",
              "text": "tf.data"
            },
            {
              "t": "text",
              "text": " datasets, PyTorch "
            },
            {
              "t": "code",
              "text": "DataLoader"
            },
            {
              "t": "text",
              "text": " objects, and NumPy arrays. Code written for "
            },
            {
              "t": "code",
              "text": "tf.keras"
            },
            {
              "t": "text",
              "text": " runs on Keras when models are saved in the "
            },
            {
              "t": "code",
              "text": ".keras"
            },
            {
              "t": "text",
              "text": " format."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F279"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F273"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://keras.io/about/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F270"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F321"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F322"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F323"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F324"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F325"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F326"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F327"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F328"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "text",
                  "text": "Windows through WSL"
                }
              ],
              "body": [
                {
                  "t": "text",
                  "text": "The README supports Linux and macOS and recommends the Windows Subsystem for Linux on Windows."
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F286"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F287"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/keras-team/keras-io",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F286"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def create_mlp(hidden_units, dropout_rate, activation, normalization_layer, name=None):\n    mlp_layers = []\n    for units in hidden_units:\n        mlp_layers.append(normalization_layer())\n        mlp_layers.append(layers.Dense(units, activation=activation))\n        mlp_layers.append(layers.Dropout(dropout_rate))\n\n    return keras.Sequential(mlp_layers, name=name)\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/keras-team/keras-io/blob/f5891b3cd4df69f6bd5a3c26ea92310f3a973626/examples/structured_data/tabtransformer.py#L328-L335",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F285"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=keras%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F270"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"\nimport keras\n\nmodel = keras.Sequential()\nmodel.add(keras.Input(shape=(16,)))\nmodel.add(keras.layers.Dense(8))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://keras.io/getting_started/",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting_started"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F275"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "catboost",
          "name": [
            {
              "t": "fact",
              "fact": "F288"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/catboost/catboost"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/catboost"
            },
            {
              "label": "Docs",
              "href": "https://catboost.ai/docs/en/features/categorical-features"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "CatBoost is Yandex's gradient boosting library for decision trees. Categorical columns go into training without one-hot encoding. The docs warn against encoding them first, because CatBoost builds numeric features from the categories and their combinations itself. Text and embedding columns are accepted too. "
            },
            {
              "t": "code",
              "text": "CatBoostClassifier"
            },
            {
              "t": "text",
              "text": " trains on a CPU or a GPU, with a "
            },
            {
              "t": "code",
              "text": "Pool"
            },
            {
              "t": "text",
              "text": " object containing the data, labels, and feature types."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F289"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F295"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F291"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F290"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://catboost.ai/docs/en/features/categorical-features",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F288"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F302"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F303"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F302"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _assess_iterations(self, X, y, sample_weight, eval_set, max_time=None):\n    if max_time is None:\n        max_time = 3600\n    try:\n        model = copy.deepcopy(self.model)\n        model.set_params(iterations=self.warmup_iterations)\n        start_time = time.time()\n        model.fit(\n            X,\n            y,\n            sample_weight=sample_weight,\n            cat_features=self.cat_features,\n            init_model=None if self.model.tree_count_ is None else self.model,\n            eval_set=eval_set,\n            early_stopping_rounds=self.early_stopping_rounds,\n            verbose_eval=False,\n        )\n        elapsed_time = (time.time() - start_time) / float(self.warmup_iterations)\n        # print(max_time, elapsed_time, max_time / elapsed_time, np.round(time.time() - start_time, 2))\n        new_rounds = int(min(10000, max_time / elapsed_time))\n        new_rounds = max(new_rounds, 10)\n        return model, new_rounds\n    except Exception as e:\n        # print(str(e))\n        return None, 1000\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mljar/mljar-supervised/blob/c4c26aa0d7d974e4b04007535b3b45cbd00b05bf/supervised/algorithms/catboost.py#L158-L182",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F301"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20that%20use%20catboost&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F288"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import numpy as np\n\nfrom catboost import CatBoostClassifier, Pool\n\n# initialize data\ntrain_data = np.random.randint(0,\n                               100,\n                               size=(100, 10))\n\ntrain_labels = np.random.randint(0,\n                                 2,\n                                 size=(100))\n\ntest_data = catboost_pool = Pool(train_data,\n                                 train_labels)\n\nmodel = CatBoostClassifier(iterations=2,\n                           depth=2,\n                           learning_rate=1,\n                           loss_function='Logloss',\n                           verbose=True)\n# train the model\nmodel.fit(train_data, train_labels)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://catboost.ai/docs/en/concepts/python-quickstart",
                  "label": [
                    {
                      "t": "text",
                      "text": "python-quickstart"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F293"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python machine learning library should I use?",
      "a": [
        {
          "t": "text",
          "text": "Use "
        },
        {
          "t": "link",
          "href": "#scikit-learn",
          "label": [
            {
              "t": "text",
              "text": "scikit-learn"
            }
          ]
        },
        {
          "t": "text",
          "text": ", with "
        },
        {
          "t": "fact",
          "fact": "F173"
        },
        {
          "t": "text",
          "text": " downloads a month, for classical models, preprocessing, and evaluation. For gradient-boosted trees, use "
        },
        {
          "t": "link",
          "href": "#xgboost",
          "label": [
            {
              "t": "text",
              "text": "XGBoost"
            }
          ]
        },
        {
          "t": "text",
          "text": ", "
        },
        {
          "t": "link",
          "href": "#lightgbm",
          "label": [
            {
              "t": "text",
              "text": "LightGBM"
            }
          ]
        },
        {
          "t": "text",
          "text": ", or "
        },
        {
          "t": "link",
          "href": "#catboost",
          "label": [
            {
              "t": "text",
              "text": "CatBoost"
            }
          ]
        },
        {
          "t": "text",
          "text": ", and for neural networks, use "
        },
        {
          "t": "link",
          "href": "#pytorch",
          "label": [
            {
              "t": "text",
              "text": "PyTorch"
            }
          ]
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "q": "PyTorch vs TensorFlow: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Use "
        },
        {
          "t": "link",
          "href": "#pytorch",
          "label": [
            {
              "t": "text",
              "text": "PyTorch"
            }
          ]
        },
        {
          "t": "text",
          "text": " for most new neural-network work. It has far more downloads, at "
        },
        {
          "t": "fact",
          "fact": "F189"
        },
        {
          "t": "text",
          "text": " a month against "
        },
        {
          "t": "fact",
          "fact": "F255"
        },
        {
          "t": "text",
          "text": " for TensorFlow, and a training loop is written by hand with its modules and autograd. Choose "
        },
        {
          "t": "link",
          "href": "#tensorflow",
          "label": [
            {
              "t": "text",
              "text": "TensorFlow"
            }
          ]
        },
        {
          "t": "text",
          "text": " to deploy to mobile or the browser, because a SavedModel exports to TFLite and TensorFlow.js."
        }
      ]
    },
    {
      "q": "LightGBM vs XGBoost: which is better?",
      "a": [
        {
          "t": "text",
          "text": "Neither wins everywhere. Both train gradient-boosted trees, run on GPUs, handle missing values, and support early stopping. LightGBM's histogram-based learning speeds up training and reduces memory use, but its leaf-wise trees can overfit small datasets unless max_depth is set."
        }
      ]
    },
    {
      "q": "JAX vs PyTorch: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Use "
        },
        {
          "t": "link",
          "href": "#pytorch",
          "label": [
            {
              "t": "text",
              "text": "PyTorch"
            }
          ]
        },
        {
          "t": "text",
          "text": " for neural-network layers and training in one library. "
        },
        {
          "t": "link",
          "href": "#jax",
          "label": [
            {
              "t": "text",
              "text": "JAX"
            }
          ]
        },
        {
          "t": "text",
          "text": " compiles NumPy-style code with XLA and composes grad, jit, and vmap, but it is narrowly scoped, so building networks takes Flax, Equinox, or Keras on top."
        }
      ]
    },
    {
      "q": "CatBoost vs XGBoost: when should I pick CatBoost?",
      "a": [
        {
          "t": "text",
          "text": "Pick "
        },
        {
          "t": "link",
          "href": "#catboost",
          "label": [
            {
              "t": "text",
              "text": "CatBoost"
            }
          ]
        },
        {
          "t": "text",
          "text": " when the data has many categorical or text columns. It accepts numeric, categorical, text, and embedding features directly and builds numeric features from the categories automatically. Its ONNX export works only for models with numeric features, and GPU training doesn't give identical results between runs."
        }
      ]
    },
    {
      "q": "Keras vs TensorFlow: do I need both?",
      "a": [
        {
          "t": "text",
          "text": "No. "
        },
        {
          "t": "link",
          "href": "#keras",
          "label": [
            {
              "t": "text",
              "text": "Keras"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a deep learning API that runs on JAX, TensorFlow, or PyTorch, so an install needs Keras and one backend. "
        },
        {
          "t": "link",
          "href": "#tensorflow",
          "label": [
            {
              "t": "text",
              "text": "TensorFlow"
            }
          ]
        },
        {
          "t": "text",
          "text": " also ships its own Keras API as tf.keras."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, scikit-learn",
      "display": "scikit-learn",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, scikit-learn",
      "display": "184.3M",
      "asOf": "2026-11-12"
    },
    "F3": {
      "label": "License, scikit-learn",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, scikit-learn",
      "display": "1.9.1, Sep 2026",
      "asOf": "2026-09-10"
    },
    "F5": {
      "label": "Package release date, scikit-learn",
      "display": "Sep 2026",
      "asOf": "2026-09-10"
    },
    "F6": {
      "label": "Repository stars, scikit-learn",
      "display": "68.1K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "GPU training, scikit-learn",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Categorical features, scikit-learn",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Missing values, scikit-learn",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Early stopping, scikit-learn",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Output formats, scikit-learn",
      "display": "ONNX",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "Install, scikit-learn",
      "display": "pip install scikit-learn",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "What it does, scikit-learn",
      "display": "Combines preprocessing, classical estimators, and model evaluation in a common Python API.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, scikit-learn",
      "display": "Keeps preprocessing with prediction",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, scikit-learn",
      "display": "Combine transformations and an estimator in a Pipeline.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths lead, scikit-learn",
      "display": "Evaluates models across data splits",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "strengths, scikit-learn",
      "display": "Use cross-validation tools to score models on unseen data.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, scikit-learn",
      "display": "Saved models need matching versions",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, scikit-learn",
      "display": "Load a saved model with the same scikit-learn version that trained it.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, scikit-learn",
      "display": "from sklearn.preprocessing import StandardScaler\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.pipeline import make_pipeline\nfrom sklearn.datasets import load_iris\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import accuracy_score\n# create a pipeline object\npipe = make_pipeline(\n    StandardScaler(),\n    LogisticRegression()\n)\n# load the iris dataset and split it into train and test sets\nX, y = load_iris(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)\n# fit the whole pipeline\npipe.fit(X_train, y_train)\n# we can now use it like any other estimator\naccuracy_score(pipe.predict(X_test), y_test)\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, scikit-learn",
      "display": "def fit(self, X, y=None):\n    # ...\n    # arguments to pass to sk_learning_curve\n    sklc_kwargs = {\n        key: self.get_params()[key]\n        for key in (\n            \"groups\",\n            \"train_sizes\",\n            \"cv\",\n            \"scoring\",\n            \"exploit_incremental_learning\",\n            \"n_jobs\",\n            \"pre_dispatch\",\n            \"shuffle\",\n            \"random_state\",\n        )\n    }\n\n    # compute the learning curve and store the scores on the estimator\n    curve = sk_learning_curve(self.estimator, X, y, **sklc_kwargs)\n    self.train_sizes_, self.train_scores_, self.test_scores_ = curve\n\n    # compute the mean and standard deviation of the training data\n    self.train_scores_mean_ = np.mean(self.train_scores_, axis=1)\n    self.train_scores_std_ = np.std(self.train_scores_, axis=1)\n\n    # compute the mean and standard deviation of the test data\n    self.test_scores_mean_ = np.mean(self.test_scores_, axis=1)\n    self.test_scores_std_ = np.std(self.test_scores_, axis=1)\n\n    # draw the curves on the current axes\n    self.draw()\n    return self\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, scikit-learn",
      "display": "learning_curve.py · fit()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, scikit-learn",
      "display": "DistrictDataLabs/yellowbrick",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, DistrictDataLabs/yellowbrick",
      "display": "4.4K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, DistrictDataLabs/yellowbrick",
      "display": "Feb 2025",
      "asOf": "2025-02-19"
    },
    "F26": {
      "label": "Library name, torch",
      "display": "PyTorch",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, torch",
      "display": "59.0M",
      "asOf": "2026-11-12"
    },
    "F28": {
      "label": "License, torch",
      "display": "NOASSERTION",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, torch",
      "display": "2.15.0, Oct 2026",
      "asOf": "2026-10-28"
    },
    "F30": {
      "label": "Package release date, torch",
      "display": "Oct 2026",
      "asOf": "2026-10-28"
    },
    "F31": {
      "label": "Repository stars, torch",
      "display": "105.4K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "GPU training, torch",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Categorical features, torch",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Early stopping, torch",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Output formats, torch",
      "display": "ONNX",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Install, torch",
      "display": "pip install torch",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "What it does, torch",
      "display": "Builds neural networks with tensor operations and automatic differentiation.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, torch",
      "display": "Supports custom training loops",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, torch",
      "display": "Combine neural-network modules and automatic differentiation in a custom training loop.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, torch",
      "display": "Runs tensor operations on GPUs",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, torch",
      "display": "Move tensors to CUDA devices for GPU execution.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, torch",
      "display": "Early stopping needs Lightning",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, torch",
      "display": "Use Lightning's EarlyStopping callback to stop training when a metric stops improving.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "Quickstart, torch",
      "display": "import torch\nimport math\n\n# Create Tensors to hold input and outputs.\nx = torch.linspace(-math.pi, math.pi, 2000)\ny = torch.sin(x)\n\n# For this example, the output y is a linear function of (x, x^2, x^3), so\n# we can consider it as a linear layer neural network. Let's prepare the\n# tensor (x, x^2, x^3).\np = torch.tensor([1, 2, 3])\nxx = x.unsqueeze(-1).pow(p)\n\n# In the above code, x.unsqueeze(-1) has shape (2000, 1), and p has shape\n# (3,), for this case, broadcasting semantics will apply to obtain a tensor\n# of shape (2000, 3)\n\n# Use the nn package to define our model as a sequence of layers. nn.Sequential\n# is a Module which contains other Modules, and applies them in sequence to\n# produce its output. The Linear Module computes output from input using a\n# linear function, and holds internal Tensors for its weight and bias.\n# The Flatten layer flatens the output of the linear layer to a 1D tensor,\n# to match the shape of `y`.\nmodel = torch.nn.Sequential(\n    torch.nn.Linear(3, 1),\n    torch.nn.Flatten(0, 1)\n)\n\n# The nn package also contains definitions of popular loss functions; in this\n# case we will use Mean Squared Error (MSE) as our loss function.\nloss_fn = torch.nn.MSELoss(reduction='sum')\n\nlearning_rate = 1e-6\nfor t in range(2000):\n\n    # Forward pass: compute predicted y by passing x to the model. Module objects\n    # override the __call__ operator so you can call them like functions. When\n    # doing so you pass a Tensor of input data to the Module and it produces\n    # a Tensor of output data.\n    y_pred = model(xx)\n\n    # Compute and print loss. We pass Tensors containing the predicted and true\n    # values of y, and the loss function returns a Tensor containing the\n    # loss.\n    loss = loss_fn(y_pred, y)\n    if t % 100 == 99:\n        print(t, loss.item())\n\n    # Zero the gradients before running the backward pass.\n    model.zero_grad()\n\n    # Backward pass: compute gradient of the loss with respect to all the learnable\n    # parameters of the model. Internally, the parameters of each Module are stored\n    # in Tensors with requires_grad=True, so this call will compute gradients for\n    # all learnable parameters in the model.\n    loss.backward()\n\n    # Update the weights using gradient descent. Each parameter is a Tensor, so\n    # we can access its gradients like we did before.\n    with torch.no_grad():\n        for param in model.parameters():\n            param -= learning_rate * param.grad\n\n# You can access the first layer of `model` like accessing the first item of a list\nlinear_layer = model[0]\n\n# For linear layer, its parameters are stored as `weight` and `bias`.\nprint(f'Result: y = {linear_layer.bias.item()} + {linear_layer.weight[:, 0].item()} x + {linear_layer.weight[:, 1].item()} x^2 + {linear_layer.weight[:, 2].item()} x^3')\n",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Project function, torch",
      "display": "def cos_sim(a: list | np.ndarray | Tensor, b: list | np.ndarray | Tensor) -> Tensor:\n    \"\"\"\n    Computes the cosine similarity between two tensors.\n\n    Args:\n        a (Union[list, np.ndarray, Tensor]): The first tensor.\n        b (Union[list, np.ndarray, Tensor]): The second tensor.\n\n    Returns:\n        Tensor: Matrix with res[i][j] = cos_sim(a[i], b[j])\n    \"\"\"\n    a = _convert_to_batch_tensor(a)\n    b = _convert_to_batch_tensor(b)\n\n    a_norm = normalize_embeddings(a)\n    b_norm = normalize_embeddings(b)\n    return torch.mm(a_norm, b_norm.transpose(0, 1)).to_dense()\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function reference, torch",
      "display": "similarity.py · cos_sim()",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project repository, torch",
      "display": "huggingface/sentence-transformers",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project stars, huggingface/sentence-transformers",
      "display": "19.3K",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project push date, huggingface/sentence-transformers",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F50": {
      "label": "Library name, xgboost",
      "display": "XGBoost",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Monthly downloads, xgboost",
      "display": "29.7M",
      "asOf": "2026-11-12"
    },
    "F52": {
      "label": "License, xgboost",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Package release, xgboost",
      "display": "3.4.1, Aug 2026",
      "asOf": "2026-08-15"
    },
    "F54": {
      "label": "Package release date, xgboost",
      "display": "Aug 2026",
      "asOf": "2026-08-15"
    },
    "F55": {
      "label": "Repository stars, xgboost",
      "display": "29.0K",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "GPU training, xgboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Categorical features, xgboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Missing values, xgboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Early stopping, xgboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Output formats, xgboost",
      "display": "JSON, UBJSON",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, xgboost",
      "display": "pip install \"xgboost[scikit-learn]\"",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, xgboost",
      "display": "Trains gradient-boosted tree models and can distribute training across machines.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, xgboost",
      "display": "Learns routes for missing values",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, xgboost",
      "display": "Tree boosters learn where missing values go during training.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, xgboost",
      "display": "Recodes categories during inference",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, xgboost",
      "display": "Dataframe inputs retain category encodings for prediction and continued training.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, xgboost",
      "display": "Categories need JSON or UBJSON",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, xgboost",
      "display": "Save categorical models as JSON or UBJSON to retain category information.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "Quickstart, xgboost",
      "display": "from sklearn.datasets import load_breast_cancer\nfrom sklearn.model_selection import train_test_split\n\nimport xgboost as xgb\n\nX, y = load_breast_cancer(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=94)\n\n# Use \"hist\" for constructing the trees, with early stopping enabled.\nclf = xgb.XGBClassifier(tree_method=\"hist\", early_stopping_rounds=2)\n# Fit the model, test sets are used for early stopping.\nclf.fit(X_train, y_train, eval_set=[(X_test, y_test)])\n# Save model into JSON format.\nclf.save_model(\"clf.json\")\n",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Project function, xgboost",
      "display": "def predict(self, X):\n    self.reload()\n\n    if self.model is None:\n        raise XgbAlgorithmException(\"Xgboost model is None\")\n\n    dtrain = xgb.DMatrix(\n        X.values if isinstance(X, pd.DataFrame) else X, missing=np.nan\n    )\n    # xgboost > 2.0.0 version\n    if hasattr(self.model, \"best_iteration\"):\n        a = self.model.predict(\n            dtrain, iteration_range=(0, self.model.best_iteration + 1)\n        )\n    else:\n        a = self.model.predict(dtrain)\n\n    return a\n",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project function reference, xgboost",
      "display": "xgboost.py · predict()",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project repository, xgboost",
      "display": "mljar/mljar-supervised",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project stars, mljar/mljar-supervised",
      "display": "3.3K",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project push date, mljar/mljar-supervised",
      "display": "Nov 2026",
      "asOf": "2026-11-05"
    },
    "F75": {
      "label": "Library name, lightgbm",
      "display": "LightGBM",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Monthly downloads, lightgbm",
      "display": "18.6M",
      "asOf": "2026-11-12"
    },
    "F77": {
      "label": "License, lightgbm",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Package release, lightgbm",
      "display": "4.7.0, Jul 2026",
      "asOf": "2026-07-18"
    },
    "F79": {
      "label": "Package release date, lightgbm",
      "display": "Jul 2026",
      "asOf": "2026-07-18"
    },
    "F80": {
      "label": "Repository stars, lightgbm",
      "display": "19.0K",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "GPU training, lightgbm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Categorical features, lightgbm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Missing values, lightgbm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Early stopping, lightgbm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Output formats, lightgbm",
      "display": "JSON",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Install, lightgbm",
      "display": "pip install \"lightgbm[scikit-learn]\"",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "What it does, lightgbm",
      "display": "Trains gradient-boosted trees with histogram-based learning.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, lightgbm",
      "display": "Uses compact category inputs",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, lightgbm",
      "display": "Use integer category codes instead of expanding one-hot columns.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, lightgbm",
      "display": "Handles missing values automatically",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, lightgbm",
      "display": "Use NaN to mark missing values during training.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, lightgbm",
      "display": "Leaf growth risks overfitting",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, lightgbm",
      "display": "Set max_depth to limit tree depth on small datasets.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "limitations lead, lightgbm",
      "display": "Negative category codes become missing",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations, lightgbm",
      "display": "Encode categories as nonnegative integers or use pandas categorical columns.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Quickstart, lightgbm",
      "display": "import lightgbm as lgb\n\nimport numpy as np\n\nrng = np.random.default_rng()\ndata = rng.uniform(size=(500, 10))  # 500 entities, each contains 10 features\nlabel = rng.integers(low=0, high=2, size=(500, ))  # binary target\ntrain_data = lgb.Dataset(data, label=label)\n\nparam = {'num_leaves': 31, 'objective': 'binary'}\n\nparam['metric'] = 'auc'\n\nnum_round = 10\n\nlgb.cv(param, train_data, num_round, nfold=5)\n",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Project function, lightgbm",
      "display": "def fit(\n    self,\n    X,\n    y,\n    sample_weight=None,\n    X_validation=None,\n    y_validation=None,\n    sample_weight_validation=None,\n    log_to_file=None,\n    max_time=None,\n):\n    lgb_train = lgb.Dataset(\n        X.values if isinstance(X, pd.DataFrame) else X,\n        y,\n        weight=sample_weight,\n    )\n    valid_sets = None\n    if self.early_stopping_rounds == 0:\n        self.model = lgb.train(\n            self.learner_params,\n            lgb_train,\n            num_boost_round=self.rounds,\n            init_model=self.model,\n        )\n    else:\n        valid_names = None\n        esr = None\n        if X_validation is not None and y_validation is not None:\n            valid_sets = [\n                lgb_train,\n                lgb.Dataset(\n                    (\n                        X_validation.values\n                        if isinstance(X_validation, pd.DataFrame)\n                        else X_validation\n                    ),\n                    y_validation,\n                    weight=sample_weight_validation,\n                ),\n            ]\n            valid_names = [\"train\", \"validation\"]\n            esr = self.early_stopping_rounds\n        evals_result = {}\n\n        # disable for now ...\n        # boosting_rounds = self.get_boosting_rounds(lgb_train, valid_sets, esr, max_time)\n\n        self.model = lgb.train(\n            self.learner_params,\n            lgb_train,\n            num_boost_round=self.rounds,\n            valid_sets=valid_sets,\n            valid_names=valid_names,\n            feval=self.custom_eval_metric,\n            callbacks=[\n                lgb.early_stopping(esr, verbose=False),\n                lgb.record_evaluation(evals_result),\n            ],\n        )\n\n        del lgb_train\n        if valid_sets is not None:\n            del valid_sets[0]\n            del valid_sets\n\n        if log_to_file is not None:\n            metric_name = list(evals_result[\"train\"].keys())[0]\n            result = pd.DataFrame(\n                {\n                    \"iteration\": range(len(evals_result[\"train\"][metric_name])),\n                    \"train\": evals_result[\"train\"][metric_name],\n                    \"validation\": evals_result[\"validation\"][metric_name],\n                }\n            )\n            result.to_csv(log_to_file, index=False, header=False)\n\n        if self.params[\"ml_task\"] != REGRESSION:\n            self.classes_ = np.unique(y)\n",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Project function reference, lightgbm",
      "display": "lightgbm.py · fit()",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Project repository, lightgbm",
      "display": "mljar/mljar-supervised",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Project stars, mljar/mljar-supervised",
      "display": "3.3K",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Project push date, mljar/mljar-supervised",
      "display": "Nov 2026",
      "asOf": "2026-11-05"
    },
    "F102": {
      "label": "Library name, tensorflow",
      "display": "TensorFlow",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Monthly downloads, tensorflow",
      "display": "11.9M",
      "asOf": "2026-11-12"
    },
    "F104": {
      "label": "License, tensorflow",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Package release, tensorflow",
      "display": "2.21.0, Mar 2026",
      "asOf": "2026-03-06"
    },
    "F106": {
      "label": "Package release date, tensorflow",
      "display": "Mar 2026",
      "asOf": "2026-03-06"
    },
    "F107": {
      "label": "Repository stars, tensorflow",
      "display": "201.6K",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "GPU training, tensorflow",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Categorical features, tensorflow",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Early stopping, tensorflow",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Output formats, tensorflow",
      "display": "SavedModel",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Install, tensorflow",
      "display": "pip install tensorflow",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "What it does, tensorflow",
      "display": "Builds and trains machine learning models through TensorFlow and Keras.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "strengths lead, tensorflow",
      "display": "Uses available GPUs automatically",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "strengths, tensorflow",
      "display": "Compatible TensorFlow operations and Keras models run on an available GPU.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "strengths lead, tensorflow",
      "display": "Exports models for deployment",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "strengths, tensorflow",
      "display": "Export a SavedModel for serving without the original model-building code.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "limitations lead, tensorflow",
      "display": "Windows GPUs need WSL",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "limitations, tensorflow",
      "display": "Use WSL2 for supported NVIDIA GPU training on Windows.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "Quickstart, tensorflow",
      "display": "import tensorflow as tf\nmnist = tf.keras.datasets.mnist\n\n(x_train, y_train),(x_test, y_test) = mnist.load_data()\nx_train, x_test = x_train / 255.0, x_test / 255.0\n\nmodel = tf.keras.models.Sequential([\n  tf.keras.layers.Flatten(input_shape=(28, 28)),\n  tf.keras.layers.Dense(128, activation='relu'),\n  tf.keras.layers.Dropout(0.2),\n  tf.keras.layers.Dense(10, activation='softmax')\n])\n\nmodel.compile(optimizer='adam',\n  loss='sparse_categorical_crossentropy',\n  metrics=['accuracy'])\n\nmodel.fit(x_train, y_train, epochs=5)\nmodel.evaluate(x_test, y_test)\n",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "Project function, tensorflow",
      "display": "def ResNet34() -> Model:\n    \"\"\"\n    ResNet34 model\n    Returns:\n        model (Model)\n    \"\"\"\n    img_input = Input(shape=(112, 112, 3))\n\n    x = ZeroPadding2D(padding=1, name=\"conv1_pad\")(img_input)\n    x = Conv2D(\n        64, 3, strides=1, use_bias=False, kernel_initializer=\"glorot_normal\", name=\"conv1_conv\"\n    )(x)\n    x = BatchNormalization(axis=3, epsilon=2e-5, momentum=0.9, name=\"conv1_bn\")(x)\n    x = PReLU(shared_axes=[1, 2], name=\"conv1_prelu\")(x)\n    x = stack_fn(x)\n\n    model = Model(img_input, x, name=\"ResNet34\")\n\n    return model\n",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "Project function reference, tensorflow",
      "display": "ArcFace.py · ResNet34()",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "Project repository, tensorflow",
      "display": "serengil/deepface",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "Project stars, serengil/deepface",
      "display": "23.7K",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "Project push date, serengil/deepface",
      "display": "Nov 2026",
      "asOf": "2026-11-11"
    },
    "F126": {
      "label": "Library name, catboost",
      "display": "CatBoost",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "Monthly downloads, catboost",
      "display": "5.4M",
      "asOf": "2026-11-12"
    },
    "F128": {
      "label": "License, catboost",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "Package release, catboost",
      "display": "1.2.10, Feb 2026",
      "asOf": "2026-02-18"
    },
    "F130": {
      "label": "Package release date, catboost",
      "display": "Feb 2026",
      "asOf": "2026-02-18"
    },
    "F131": {
      "label": "Repository stars, catboost",
      "display": "9.2K",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "GPU training, catboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "Categorical features, catboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F134": {
      "label": "Missing values, catboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F135": {
      "label": "Early stopping, catboost",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F136": {
      "label": "Output formats, catboost",
      "display": "ONNX-ML",
      "asOf": "2026-11-17"
    },
    "F137": {
      "label": "Install, catboost",
      "display": "pip install catboost",
      "asOf": "2026-11-17"
    },
    "F138": {
      "label": "What it does, catboost",
      "display": "Trains models with numeric, categorical, text, and embedding features.",
      "asOf": "2026-11-17"
    },
    "F139": {
      "label": "strengths lead, catboost",
      "display": "Handles mixed feature types",
      "asOf": "2026-11-17"
    },
    "F140": {
      "label": "strengths, catboost",
      "display": "Use numeric, categorical, text, and embedding features together.",
      "asOf": "2026-11-17"
    },
    "F141": {
      "label": "limitations lead, catboost",
      "display": "GPU training is nondeterministic",
      "asOf": "2026-11-17"
    },
    "F142": {
      "label": "limitations, catboost",
      "display": "Repeated GPU training does not guarantee identical model results.",
      "asOf": "2026-11-17"
    },
    "F143": {
      "label": "limitations lead, catboost",
      "display": "ONNX export needs numeric features",
      "asOf": "2026-11-17"
    },
    "F144": {
      "label": "limitations, catboost",
      "display": "Categorical, text, and embedding features cannot use ONNX-ML export.",
      "asOf": "2026-11-17"
    },
    "F145": {
      "label": "Quickstart, catboost",
      "display": "import numpy as np\n\nfrom catboost import CatBoostClassifier, Pool\n\n# initialize data\ntrain_data = np.random.randint(0,\n                               100,\n                               size=(100, 10))\n\ntrain_labels = np.random.randint(0,\n                                 2,\n                                 size=(100))\n\ntest_data = catboost_pool = Pool(train_data,\n                                 train_labels)\n\nmodel = CatBoostClassifier(iterations=2,\n                           depth=2,\n                           learning_rate=1,\n                           loss_function='Logloss',\n                           verbose=True)\n# train the model\nmodel.fit(train_data, train_labels)\n# make the prediction using the resulting model\npreds_class = model.predict(test_data)\npreds_proba = model.predict_proba(test_data)\nprint(\"class = \", preds_class)\nprint(\"proba = \", preds_proba)\n",
      "asOf": "2026-11-17"
    },
    "F146": {
      "label": "Project function, catboost",
      "display": "def _assess_iterations(self, X, y, sample_weight, eval_set, max_time=None):\n    if max_time is None:\n        max_time = 3600\n    try:\n        model = copy.deepcopy(self.model)\n        model.set_params(iterations=self.warmup_iterations)\n        start_time = time.time()\n        model.fit(\n            X,\n            y,\n            sample_weight=sample_weight,\n            cat_features=self.cat_features,\n            init_model=None if self.model.tree_count_ is None else self.model,\n            eval_set=eval_set,\n            early_stopping_rounds=self.early_stopping_rounds,\n            verbose_eval=False,\n        )\n        elapsed_time = (time.time() - start_time) / float(self.warmup_iterations)\n        # print(max_time, elapsed_time, max_time / elapsed_time, np.round(time.time() - start_time, 2))\n        new_rounds = int(min(10000, max_time / elapsed_time))\n        new_rounds = max(new_rounds, 10)\n        return model, new_rounds\n    except Exception as e:\n        # print(str(e))\n        return None, 1000\n",
      "asOf": "2026-11-17"
    },
    "F147": {
      "label": "Project function reference, catboost",
      "display": "catboost.py · _assess_iterations()",
      "asOf": "2026-11-17"
    },
    "F148": {
      "label": "Project repository, catboost",
      "display": "mljar/mljar-supervised",
      "asOf": "2026-11-17"
    },
    "F149": {
      "label": "Project stars, mljar/mljar-supervised",
      "display": "3.3K",
      "asOf": "2026-11-17"
    },
    "F150": {
      "label": "Project push date, mljar/mljar-supervised",
      "display": "Nov 2026",
      "asOf": "2026-11-05"
    },
    "F151": {
      "label": "Developer need",
      "display": "Classical models on tabular data",
      "asOf": "2026-11-17"
    },
    "F152": {
      "label": "Why choose scikit-learn",
      "display": "preprocessing and models in one pipeline",
      "asOf": "2026-11-17"
    },
    "F153": {
      "label": "Developer need in introduction",
      "display": "preprocessing pipelines",
      "asOf": "2026-11-17"
    },
    "F154": {
      "label": "Developer need",
      "display": "Missing values in tabular data",
      "asOf": "2026-11-17"
    },
    "F155": {
      "label": "Why choose xgboost",
      "display": "learns where missing values should go",
      "asOf": "2026-11-17"
    },
    "F156": {
      "label": "Developer need in introduction",
      "display": "missing tabular values",
      "asOf": "2026-11-17"
    },
    "F157": {
      "label": "Developer need",
      "display": "Integer category codes",
      "asOf": "2026-11-17"
    },
    "F158": {
      "label": "Why choose lightgbm",
      "display": "when categories are already integer codes",
      "asOf": "2026-11-17"
    },
    "F159": {
      "label": "Developer need in introduction",
      "display": "integer category codes",
      "asOf": "2026-11-17"
    },
    "F160": {
      "label": "Developer need",
      "display": "Categorical and text features",
      "asOf": "2026-11-17"
    },
    "F161": {
      "label": "Why choose catboost",
      "display": "uses categories without encoding them first",
      "asOf": "2026-11-17"
    },
    "F162": {
      "label": "Developer need in introduction",
      "display": "mixed feature types",
      "asOf": "2026-11-17"
    },
    "F163": {
      "label": "Developer need",
      "display": "Neural networks",
      "asOf": "2026-11-17"
    },
    "F164": {
      "label": "Why choose torch",
      "display": "training loops written in plain Python",
      "asOf": "2026-11-17"
    },
    "F165": {
      "label": "Developer need in introduction",
      "display": "custom training loops",
      "asOf": "2026-11-17"
    },
    "F166": {
      "label": "Developer need",
      "display": "Deploying to mobile and web",
      "asOf": "2026-11-17"
    },
    "F167": {
      "label": "Why choose tensorflow",
      "display": "exports SavedModels for serving and mobile",
      "asOf": "2026-11-17"
    },
    "F168": {
      "label": "Developer need in introduction",
      "display": "model deployment",
      "asOf": "2026-11-17"
    },
    "F169": {
      "label": "Page introduction",
      "display": "Python machine learning libraries let machine-learning developers train and apply predictive models.",
      "asOf": "2026-11-17"
    },
    "F170": {
      "label": "FAQ: Do all scikit-learn estimators train on GPUs?",
      "display": "GPU support covers a limited set of estimators using PyTorch or CuPy arrays.",
      "asOf": "2026-11-17"
    },
    "F171": {
      "label": "FAQ: What does LightGBM’s JSON output represent?",
      "display": "dump_model() produces a JSON description of the trained booster.",
      "asOf": "2026-11-17"
    },
    "F172": {
      "label": "Library name, scikit-learn",
      "display": "scikit-learn",
      "asOf": "2026-11-18"
    },
    "F173": {
      "label": "Monthly downloads, scikit-learn",
      "display": "214.2M",
      "asOf": "2026-11-18"
    },
    "F174": {
      "label": "License, scikit-learn",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-18"
    },
    "F175": {
      "label": "Package release, scikit-learn",
      "display": "1.9.1",
      "asOf": "2026-11-18"
    },
    "F176": {
      "label": "Package release date, scikit-learn",
      "display": "Sep 2026",
      "asOf": "2026-11-18"
    },
    "F177": {
      "label": "Install, scikit-learn",
      "display": "pip install -U scikit-learn",
      "asOf": "2026-11-18"
    },
    "F178": {
      "label": "Quickstart, scikit-learn",
      "display": "from sklearn.ensemble import RandomForestClassifier\nclf = RandomForestClassifier(random_state=0)\nX = [[ 1,  2,  3],  # 2 samples, 3 features\n     [11, 12, 13]]\ny = [0, 1]  # classes of each sample\nclf.fit(X, y)\n",
      "asOf": "2026-11-18"
    },
    "F179": {
      "label": "Repository stars, scikit-learn",
      "display": "68.1K",
      "asOf": "2026-11-18"
    },
    "F180": {
      "label": "GPU training, scikit-learn",
      "display": "Via plugin",
      "asOf": "2026-11-18"
    },
    "F181": {
      "label": "Early stopping, scikit-learn",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F182": {
      "label": "Categorical input workflow, scikit-learn",
      "display": "Encode categorical features as a one-hot numeric array.",
      "asOf": "2026-11-18"
    },
    "F183": {
      "label": "Missing-value workflow, scikit-learn",
      "display": "This estimator has native support for missing values (NaNs).",
      "asOf": "2026-11-18"
    },
    "F184": {
      "label": "Project function, scikit-learn",
      "display": "def fit(\n    self,\n    X,\n    y,\n    sample_weight=None,\n    X_validation=None,\n    y_validation=None,\n    sample_weight_validation=None,\n    log_to_file=None,\n    max_time=None,\n):\n    rows_count = len(X) + (len(X_validation) if X_validation is not None else 0)\n    n_estimators = self.tree_count(rows_count)\n    # Validation labels do not select the forest size. Disable warm start\n    # so fitting the same learner again cannot retain trees from old data.\n    self.model.set_params(n_estimators=n_estimators, warm_start=False)\n    with warnings.catch_warnings():\n        warnings.simplefilter(action=\"ignore\")\n        self.model.fit(X, np.ravel(y), sample_weight=sample_weight)\n    self.params[\"n_estimators\"] = n_estimators\n\n    if log_to_file is not None:\n        train_score = self.log_metric(\n            y, self.predict_function(self.model, X), sample_weight=sample_weight\n        )\n        validation_score = np.nan\n        if X_validation is not None and y_validation is not None:\n            validation_score = self.log_metric(\n                y_validation,\n                self.predict_function(self.model, X_validation),\n                sample_weight=sample_weight_validation,\n            )\n        # Log the final forest only; there is no selected validation peak.\n        df_result = pd.DataFrame({\n            \"iteration\": [n_estimators - 1],\n            \"train\": [train_score],\n            \"validation\": [validation_score],\n        })\n        if self.log_metric.is_negative():\n            df_result[\"train\"] *= -1.0\n            df_result[\"validation\"] *= -1.0\n        df_result.to_csv(log_to_file, index=False, header=False)\n\n    if self.params.get(\"ml_task\") != REGRESSION:\n        self.classes_ = self.model.classes_\n",
      "asOf": "2026-11-18"
    },
    "F185": {
      "label": "Project source file, scikit-learn",
      "display": "supervised/algorithms/sklearn.py",
      "asOf": "2026-11-18"
    },
    "F186": {
      "label": "Project full_name, scikit-learn",
      "display": "mljar/mljar-supervised",
      "asOf": "2026-11-18"
    },
    "F187": {
      "label": "Project stargazers_count, scikit-learn",
      "display": "3.3K",
      "asOf": "2026-11-18"
    },
    "F188": {
      "label": "Library name, torch",
      "display": "PyTorch",
      "asOf": "2026-11-18"
    },
    "F189": {
      "label": "Monthly downloads, torch",
      "display": "59.7M",
      "asOf": "2026-11-18"
    },
    "F190": {
      "label": "License, torch",
      "display": "NOASSERTION",
      "asOf": "2026-11-18"
    },
    "F191": {
      "label": "Package release, torch",
      "display": "2.15.0",
      "asOf": "2026-11-18"
    },
    "F192": {
      "label": "Package release date, torch",
      "display": "Oct 2026",
      "asOf": "2026-11-18"
    },
    "F193": {
      "label": "Install, torch",
      "display": "pip install torch torchvision",
      "asOf": "2026-11-18"
    },
    "F194": {
      "label": "Quickstart, torch",
      "display": "import torch\n\ndata = [[1, 2],[3, 4]]\nx_data = torch.tensor(data)\n",
      "asOf": "2026-11-18"
    },
    "F195": {
      "label": "Repository stars, torch",
      "display": "105.4K",
      "asOf": "2026-11-18"
    },
    "F196": {
      "label": "GPU training, torch",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F197": {
      "label": "Early stopping, torch",
      "display": "Via plugin",
      "asOf": "2026-11-18"
    },
    "F198": {
      "label": "Categorical input workflow, torch",
      "display": "Takes LongTensor with index values of shape `(*)` and returns a tensor\nof shape `(*, num_classes)` that have zeros everywhere except where the\nindex of last dimension matches the corresponding value of the input tensor,\nin which case it will be 1.",
      "asOf": "2026-11-18"
    },
    "F199": {
      "label": "Model-building level, torch",
      "display": "Tensor/autodiff and neural-network layers; application-defined architecture and training configuration.",
      "asOf": "2026-11-18"
    },
    "F200": {
      "label": "Project function, torch",
      "display": "def cos_sim(a: list | np.ndarray | Tensor, b: list | np.ndarray | Tensor) -> Tensor:\n    \"\"\"\n    Computes the cosine similarity between two tensors.\n\n    Args:\n        a (Union[list, np.ndarray, Tensor]): The first tensor.\n        b (Union[list, np.ndarray, Tensor]): The second tensor.\n\n    Returns:\n        Tensor: Matrix with res[i][j] = cos_sim(a[i], b[j])\n    \"\"\"\n    a = _convert_to_batch_tensor(a)\n    b = _convert_to_batch_tensor(b)\n\n    a_norm = normalize_embeddings(a)\n    b_norm = normalize_embeddings(b)\n    return torch.mm(a_norm, b_norm.transpose(0, 1)).to_dense()\n",
      "asOf": "2026-11-18"
    },
    "F201": {
      "label": "Project source file, torch",
      "display": "sentence_transformers/util/similarity.py",
      "asOf": "2026-11-18"
    },
    "F202": {
      "label": "Project full_name, torch",
      "display": "huggingface/sentence-transformers",
      "asOf": "2026-11-18"
    },
    "F203": {
      "label": "Project stargazers_count, torch",
      "display": "19.3K",
      "asOf": "2026-11-18"
    },
    "F204": {
      "label": "Library name, xgboost",
      "display": "XGBoost",
      "asOf": "2026-11-18"
    },
    "F205": {
      "label": "Monthly downloads, xgboost",
      "display": "32.7M",
      "asOf": "2026-11-18"
    },
    "F206": {
      "label": "License, xgboost",
      "display": "Apache-2.0",
      "asOf": "2026-11-18"
    },
    "F207": {
      "label": "Package release, xgboost",
      "display": "3.4.1",
      "asOf": "2026-11-18"
    },
    "F208": {
      "label": "Package release date, xgboost",
      "display": "Aug 2026",
      "asOf": "2026-11-18"
    },
    "F209": {
      "label": "Install, xgboost",
      "display": "pip install xgboost",
      "asOf": "2026-11-18"
    },
    "F210": {
      "label": "Quickstart, xgboost",
      "display": "from sklearn.datasets import load_breast_cancer\nfrom sklearn.model_selection import train_test_split\n\nimport xgboost as xgb\n\nX, y = load_breast_cancer(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, random_state=94)\n\n# Use \"hist\" for constructing the trees, with early stopping enabled.\nclf = xgb.XGBClassifier(tree_method=\"hist\", early_stopping_rounds=2)\n# Fit the model, test sets are used for early stopping.\nclf.fit(X_train, y_train, eval_set=[(X_test, y_test)])\n",
      "asOf": "2026-11-18"
    },
    "F211": {
      "label": "Repository stars, xgboost",
      "display": "29.0K",
      "asOf": "2026-11-18"
    },
    "F212": {
      "label": "GPU training, xgboost",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F213": {
      "label": "Early stopping, xgboost",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F214": {
      "label": "Categorical input workflow, xgboost",
      "display": "Starting with 3.1, the Python interface can remember the encoding and perform recoding during inference and training continuation when the input is a dataframe (pandas, cuDF, polars, pyarrow, modin).",
      "asOf": "2026-11-18"
    },
    "F215": {
      "label": "Missing-value workflow, xgboost",
      "display": "XGBoost supports missing values by default. In tree algorithms, branch directions for missing values are learned during training.",
      "asOf": "2026-11-18"
    },
    "F216": {
      "label": "Project function, xgboost",
      "display": "def predict(self, X):\n    self.reload()\n\n    if self.model is None:\n        raise XgbAlgorithmException(\"Xgboost model is None\")\n\n    dtrain = xgb.DMatrix(\n        X.values if isinstance(X, pd.DataFrame) else X, missing=np.nan\n    )\n    # xgboost > 2.0.0 version\n    if hasattr(self.model, \"best_iteration\"):\n        a = self.model.predict(\n            dtrain, iteration_range=(0, self.model.best_iteration + 1)\n        )\n    else:\n        a = self.model.predict(dtrain)\n\n    return a\n",
      "asOf": "2026-11-18"
    },
    "F217": {
      "label": "Project source file, xgboost",
      "display": "supervised/algorithms/xgboost.py",
      "asOf": "2026-11-18"
    },
    "F218": {
      "label": "Project full_name, xgboost",
      "display": "mljar/mljar-supervised",
      "asOf": "2026-11-18"
    },
    "F219": {
      "label": "Project stargazers_count, xgboost",
      "display": "3.3K",
      "asOf": "2026-11-18"
    },
    "F220": {
      "label": "Library name, lightgbm",
      "display": "LightGBM",
      "asOf": "2026-11-18"
    },
    "F221": {
      "label": "Monthly downloads, lightgbm",
      "display": "23.6M",
      "asOf": "2026-11-18"
    },
    "F222": {
      "label": "License, lightgbm",
      "display": "MIT",
      "asOf": "2026-11-18"
    },
    "F223": {
      "label": "Package release, lightgbm",
      "display": "4.7.0",
      "asOf": "2026-11-18"
    },
    "F224": {
      "label": "Package release date, lightgbm",
      "display": "Jul 2026",
      "asOf": "2026-11-18"
    },
    "F225": {
      "label": "Install, lightgbm",
      "display": "pip install lightgbm",
      "asOf": "2026-11-18"
    },
    "F226": {
      "label": "Quickstart, lightgbm",
      "display": "import lightgbm as lgb\n\nimport numpy as np\n\nrng = np.random.default_rng()\ndata = rng.uniform(size=(500, 10))  # 500 entities, each contains 10 features\nlabel = rng.integers(low=0, high=2, size=(500, ))  # binary target\ntrain_data = lgb.Dataset(data, label=label)\n",
      "asOf": "2026-11-18"
    },
    "F227": {
      "label": "Repository stars, lightgbm",
      "display": "19.0K",
      "asOf": "2026-11-18"
    },
    "F228": {
      "label": "GPU training, lightgbm",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F229": {
      "label": "Early stopping, lightgbm",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F230": {
      "label": "Categorical input workflow, lightgbm",
      "display": "LightGBM offers good accuracy with integer-encoded categorical features.",
      "asOf": "2026-11-18"
    },
    "F231": {
      "label": "Missing-value workflow, lightgbm",
      "display": "LightGBM enables the missing value handle by default.",
      "asOf": "2026-11-18"
    },
    "F232": {
      "label": "Project function, lightgbm",
      "display": "def fit(\n    self,\n    X,\n    y,\n    sample_weight=None,\n    X_validation=None,\n    y_validation=None,\n    sample_weight_validation=None,\n    log_to_file=None,\n    max_time=None,\n):\n    lgb_train = lgb.Dataset(\n        X.values if isinstance(X, pd.DataFrame) else X,\n        y,\n        weight=sample_weight,\n    )\n    valid_sets = None\n    if self.early_stopping_rounds == 0:\n        self.model = lgb.train(\n            self.learner_params,\n            lgb_train,\n            num_boost_round=self.rounds,\n            init_model=self.model,\n        )\n    else:\n        valid_names = None\n        esr = None\n        if X_validation is not None and y_validation is not None:\n            valid_sets = [\n                lgb_train,\n                lgb.Dataset(\n                    (\n                        X_validation.values\n                        if isinstance(X_validation, pd.DataFrame)\n                        else X_validation\n                    ),\n                    y_validation,\n                    weight=sample_weight_validation,\n                ),\n            ]\n            valid_names = [\"train\", \"validation\"]\n            esr = self.early_stopping_rounds\n        evals_result = {}\n\n        # disable for now ...\n        # boosting_rounds = self.get_boosting_rounds(lgb_train, valid_sets, esr, max_time)\n\n        self.model = lgb.train(\n            self.learner_params,\n            lgb_train,\n            num_boost_round=self.rounds,\n            valid_sets=valid_sets,\n            valid_names=valid_names,\n            feval=self.custom_eval_metric,\n            callbacks=[\n                lgb.early_stopping(esr, verbose=False),\n                lgb.record_evaluation(evals_result),\n            ],\n        )\n\n        del lgb_train\n        if valid_sets is not None:\n            del valid_sets[0]\n            del valid_sets\n\n        if log_to_file is not None:\n            metric_name = list(evals_result[\"train\"].keys())[0]\n            result = pd.DataFrame(\n                {\n                    \"iteration\": range(len(evals_result[\"train\"][metric_name])),\n                    \"train\": evals_result[\"train\"][metric_name],\n                    \"validation\": evals_result[\"validation\"][metric_name],\n                }\n            )\n            result.to_csv(log_to_file, index=False, header=False)\n\n        if self.params[\"ml_task\"] != REGRESSION:\n            self.classes_ = np.unique(y)\n",
      "asOf": "2026-11-18"
    },
    "F233": {
      "label": "Project source file, lightgbm",
      "display": "supervised/algorithms/lightgbm.py",
      "asOf": "2026-11-18"
    },
    "F234": {
      "label": "Project full_name, lightgbm",
      "display": "mljar/mljar-supervised",
      "asOf": "2026-11-18"
    },
    "F235": {
      "label": "Project stargazers_count, lightgbm",
      "display": "3.3K",
      "asOf": "2026-11-18"
    },
    "F236": {
      "label": "Library name, jax",
      "display": "JAX",
      "asOf": "2026-11-18"
    },
    "F237": {
      "label": "Monthly downloads, jax",
      "display": "12.6M",
      "asOf": "2026-11-18"
    },
    "F238": {
      "label": "License, jax",
      "display": "Apache-2.0",
      "asOf": "2026-11-18"
    },
    "F239": {
      "label": "Package release, jax",
      "display": "0.12.0.1",
      "asOf": "2026-11-18"
    },
    "F240": {
      "label": "Package release date, jax",
      "display": "Oct 2026",
      "asOf": "2026-11-18"
    },
    "F241": {
      "label": "Install, jax",
      "display": "pip install -U jax",
      "asOf": "2026-11-18"
    },
    "F242": {
      "label": "Quickstart, jax",
      "display": "import jax\nimport jax.numpy as jnp\n\ndef tanh(x):\n  y = jnp.exp(-2.0 * x)\n  return (1.0 - y) / (1.0 + y)\n\ngrad_tanh = jax.grad(tanh)\nprint(grad_tanh(1.0))\n# prints 0.4199743\n",
      "asOf": "2026-11-18"
    },
    "F243": {
      "label": "Official description, jax",
      "display": "Differentiate, compile, and transform Numpy code.",
      "asOf": "2026-11-18"
    },
    "F244": {
      "label": "Quickstart source file, jax",
      "display": "README.md",
      "asOf": "2026-11-18"
    },
    "F245": {
      "label": "Repository stars, jax",
      "display": "36.6K",
      "asOf": "2026-11-18"
    },
    "F246": {
      "label": "GPU training, jax",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F247": {
      "label": "Early stopping, jax",
      "display": "Via plugin",
      "asOf": "2026-11-18"
    },
    "F248": {
      "label": "Model-building level, jax",
      "display": "Composable differentiation, compilation, and vectorization of array programs.",
      "asOf": "2026-11-18"
    },
    "F249": {
      "label": "Categorical input workflow, jax",
      "display": "Explicit one-hot numeric encoding with jax.nn.one_hot.",
      "asOf": "2026-11-18"
    },
    "F250": {
      "label": "Project function, jax",
      "display": "def loss(params: hk.Params, batch: Batch) -> jax.Array:\n  \"\"\"Cross-entropy classification loss, regularised by L2 weight decay.\"\"\"\n  batch_size, *_ = batch.image.shape\n  logits = network.apply(params, batch.image)\n  labels = jax.nn.one_hot(batch.label, NUM_CLASSES)\n\n  l2_regulariser = 0.5 * sum(\n      jnp.sum(jnp.square(p)) for p in jax.tree.leaves(params)\n  )\n  log_likelihood = jnp.sum(labels * jax.nn.log_softmax(logits))\n\n  return -log_likelihood / batch_size + 1e-4 * l2_regulariser\n",
      "asOf": "2026-11-18"
    },
    "F251": {
      "label": "Project source file, jax",
      "display": "examples/mnist.py",
      "asOf": "2026-11-18"
    },
    "F252": {
      "label": "Project full_name, jax",
      "display": "google-deepmind/dm-haiku",
      "asOf": "2026-11-18"
    },
    "F253": {
      "label": "Project stargazers_count, jax",
      "display": "3.3K",
      "asOf": "2026-11-18"
    },
    "F254": {
      "label": "Library name, tensorflow",
      "display": "TensorFlow",
      "asOf": "2026-11-18"
    },
    "F255": {
      "label": "Monthly downloads, tensorflow",
      "display": "12.4M",
      "asOf": "2026-11-18"
    },
    "F256": {
      "label": "License, tensorflow",
      "display": "Apache-2.0",
      "asOf": "2026-11-18"
    },
    "F257": {
      "label": "Package release, tensorflow",
      "display": "2.21.0",
      "asOf": "2026-11-18"
    },
    "F258": {
      "label": "Package release date, tensorflow",
      "display": "Mar 2026",
      "asOf": "2026-11-18"
    },
    "F259": {
      "label": "Install, tensorflow",
      "display": "pip install tensorflow",
      "asOf": "2026-11-18"
    },
    "F260": {
      "label": "Quickstart, tensorflow",
      "display": "import tensorflow as tf\nmnist = tf.keras.datasets.mnist\n\n(x_train, y_train),(x_test, y_test) = mnist.load_data()\nx_train, x_test = x_train / 255.0, x_test / 255.0\n\nmodel = tf.keras.models.Sequential([\n  tf.keras.layers.Flatten(input_shape=(28, 28)),\n  tf.keras.layers.Dense(128, activation='relu'),\n  tf.keras.layers.Dropout(0.2),\n  tf.keras.layers.Dense(10, activation='softmax')\n])\n\nmodel.compile(optimizer='adam',\n  loss='sparse_categorical_crossentropy',\n  metrics=['accuracy'])\n\nmodel.fit(x_train, y_train, epochs=5)\nmodel.evaluate(x_test, y_test)\n",
      "asOf": "2026-11-18"
    },
    "F261": {
      "label": "Repository stars, tensorflow",
      "display": "201.6K",
      "asOf": "2026-11-18"
    },
    "F262": {
      "label": "GPU training, tensorflow",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F263": {
      "label": "Early stopping, tensorflow",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F264": {
      "label": "Categorical input workflow, tensorflow",
      "display": "A preprocessing layer that maps strings to (possibly encoded) indices.",
      "asOf": "2026-11-18"
    },
    "F265": {
      "label": "Model-building level, tensorflow",
      "display": "Tensor/autodiff and neural-network layers; application-defined architecture and training configuration.",
      "asOf": "2026-11-18"
    },
    "F266": {
      "label": "Project function, tensorflow",
      "display": "def ResNet34() -> Model:\n    \"\"\"\n    ResNet34 model\n    Returns:\n        model (Model)\n    \"\"\"\n    img_input = Input(shape=(112, 112, 3))\n\n    x = ZeroPadding2D(padding=1, name=\"conv1_pad\")(img_input)\n    x = Conv2D(\n        64, 3, strides=1, use_bias=False, kernel_initializer=\"glorot_normal\", name=\"conv1_conv\"\n    )(x)\n    x = BatchNormalization(axis=3, epsilon=2e-5, momentum=0.9, name=\"conv1_bn\")(x)\n    x = PReLU(shared_axes=[1, 2], name=\"conv1_prelu\")(x)\n    x = stack_fn(x)\n\n    model = Model(img_input, x, name=\"ResNet34\")\n\n    return model\n",
      "asOf": "2026-11-18"
    },
    "F267": {
      "label": "Project source file, tensorflow",
      "display": "deepface/models/facial_recognition/tf/ArcFace.py",
      "asOf": "2026-11-18"
    },
    "F268": {
      "label": "Project full_name, tensorflow",
      "display": "serengil/deepface",
      "asOf": "2026-11-18"
    },
    "F269": {
      "label": "Project stargazers_count, tensorflow",
      "display": "23.7K",
      "asOf": "2026-11-18"
    },
    "F270": {
      "label": "Library name, keras",
      "display": "Keras",
      "asOf": "2026-11-18"
    },
    "F271": {
      "label": "Monthly downloads, keras",
      "display": "12.0M",
      "asOf": "2026-11-18"
    },
    "F272": {
      "label": "License, keras",
      "display": "Apache-2.0",
      "asOf": "2026-11-18"
    },
    "F273": {
      "label": "Package release, keras",
      "display": "3.15.1",
      "asOf": "2026-11-18"
    },
    "F274": {
      "label": "Package release date, keras",
      "display": "Jul 2026",
      "asOf": "2026-11-18"
    },
    "F275": {
      "label": "Install, keras",
      "display": "pip install --upgrade keras\npip install -U jax",
      "asOf": "2026-11-18"
    },
    "F276": {
      "label": "Quickstart, keras",
      "display": "import os\nos.environ[\"KERAS_BACKEND\"] = \"jax\"\nimport keras\n\nmodel = keras.Sequential()\nmodel.add(keras.Input(shape=(16,)))\nmodel.add(keras.layers.Dense(8))\n",
      "asOf": "2026-11-18"
    },
    "F277": {
      "label": "Official description, keras",
      "display": "Multi-backend Keras",
      "asOf": "2026-11-18"
    },
    "F278": {
      "label": "Quickstart source file, keras",
      "display": "keras/src/models/sequential.py",
      "asOf": "2026-11-18"
    },
    "F279": {
      "label": "Repository stars, keras",
      "display": "64.4K",
      "asOf": "2026-11-18"
    },
    "F280": {
      "label": "GPU training, keras",
      "display": "Via plugin",
      "asOf": "2026-11-18"
    },
    "F281": {
      "label": "Early stopping, keras",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F282": {
      "label": "Execution backend, keras",
      "display": "JAX, TensorFlow, or PyTorch backend; backend must be configured before importing Keras.",
      "asOf": "2026-11-18"
    },
    "F283": {
      "label": "Categorical input workflow, keras",
      "display": "StringLookup converts string categories into indices or encoded category vectors.",
      "asOf": "2026-11-18"
    },
    "F284": {
      "label": "Project function, keras",
      "display": "def create_mlp(hidden_units, dropout_rate, activation, normalization_layer, name=None):\n    mlp_layers = []\n    for units in hidden_units:\n        mlp_layers.append(normalization_layer())\n        mlp_layers.append(layers.Dense(units, activation=activation))\n        mlp_layers.append(layers.Dropout(dropout_rate))\n\n    return keras.Sequential(mlp_layers, name=name)\n",
      "asOf": "2026-11-18"
    },
    "F285": {
      "label": "Project source file, keras",
      "display": "examples/structured_data/tabtransformer.py",
      "asOf": "2026-11-18"
    },
    "F286": {
      "label": "Project full_name, keras",
      "display": "keras-team/keras-io",
      "asOf": "2026-11-18"
    },
    "F287": {
      "label": "Project stargazers_count, keras",
      "display": "3.0K",
      "asOf": "2026-11-18"
    },
    "F288": {
      "label": "Library name, catboost",
      "display": "CatBoost",
      "asOf": "2026-11-18"
    },
    "F289": {
      "label": "Monthly downloads, catboost",
      "display": "6.9M",
      "asOf": "2026-11-18"
    },
    "F290": {
      "label": "License, catboost",
      "display": "Apache-2.0",
      "asOf": "2026-11-18"
    },
    "F291": {
      "label": "Package release, catboost",
      "display": "1.2.10",
      "asOf": "2026-11-18"
    },
    "F292": {
      "label": "Package release date, catboost",
      "display": "Feb 2026",
      "asOf": "2026-11-18"
    },
    "F293": {
      "label": "Install, catboost",
      "display": "pip install catboost",
      "asOf": "2026-11-18"
    },
    "F294": {
      "label": "Quickstart, catboost",
      "display": "import numpy as np\n\nfrom catboost import CatBoostClassifier, Pool\n\n# initialize data\ntrain_data = np.random.randint(0,\n                               100,\n                               size=(100, 10))\n\ntrain_labels = np.random.randint(0,\n                                 2,\n                                 size=(100))\n\ntest_data = catboost_pool = Pool(train_data,\n                                 train_labels)\n\nmodel = CatBoostClassifier(iterations=2,\n                           depth=2,\n                           learning_rate=1,\n                           loss_function='Logloss',\n                           verbose=True)\n# train the model\nmodel.fit(train_data, train_labels)\n",
      "asOf": "2026-11-18"
    },
    "F295": {
      "label": "Repository stars, catboost",
      "display": "9.2K",
      "asOf": "2026-11-18"
    },
    "F296": {
      "label": "GPU training, catboost",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F297": {
      "label": "Early stopping, catboost",
      "display": "Yes",
      "asOf": "2026-11-18"
    },
    "F298": {
      "label": "Categorical input workflow, catboost",
      "display": "Categorical features are used to build new numeric features based on categorical features and their combinations.",
      "asOf": "2026-11-18"
    },
    "F299": {
      "label": "Missing-value workflow, catboost",
      "display": "The following modes for processing missing values are supported:",
      "asOf": "2026-11-18"
    },
    "F300": {
      "label": "Project function, catboost",
      "display": "def _assess_iterations(self, X, y, sample_weight, eval_set, max_time=None):\n    if max_time is None:\n        max_time = 3600\n    try:\n        model = copy.deepcopy(self.model)\n        model.set_params(iterations=self.warmup_iterations)\n        start_time = time.time()\n        model.fit(\n            X,\n            y,\n            sample_weight=sample_weight,\n            cat_features=self.cat_features,\n            init_model=None if self.model.tree_count_ is None else self.model,\n            eval_set=eval_set,\n            early_stopping_rounds=self.early_stopping_rounds,\n            verbose_eval=False,\n        )\n        elapsed_time = (time.time() - start_time) / float(self.warmup_iterations)\n        # print(max_time, elapsed_time, max_time / elapsed_time, np.round(time.time() - start_time, 2))\n        new_rounds = int(min(10000, max_time / elapsed_time))\n        new_rounds = max(new_rounds, 10)\n        return model, new_rounds\n    except Exception as e:\n        # print(str(e))\n        return None, 1000\n",
      "asOf": "2026-11-18"
    },
    "F301": {
      "label": "Project source file, catboost",
      "display": "supervised/algorithms/catboost.py",
      "asOf": "2026-11-18"
    },
    "F302": {
      "label": "Project full_name, catboost",
      "display": "mljar/mljar-supervised",
      "asOf": "2026-11-18"
    },
    "F303": {
      "label": "Project stargazers_count, catboost",
      "display": "3.3K",
      "asOf": "2026-11-18"
    },
    "F304": {
      "label": "Developer need, LightGBM",
      "display": "Large tabular datasets",
      "asOf": "2026-11-17"
    },
    "F305": {
      "label": "Pick reason, LightGBM",
      "display": "uses less memory on large datasets",
      "asOf": "2026-11-17"
    },
    "F306": {
      "label": "Developer need, JAX",
      "display": "Compiled NumPy-style code",
      "asOf": "2026-11-17"
    },
    "F307": {
      "label": "Pick reason, JAX",
      "display": "compiles and differentiates NumPy-style functions",
      "asOf": "2026-11-17"
    },
    "F308": {
      "label": "Developer need, Keras",
      "display": "One model, any backend",
      "asOf": "2026-11-17"
    },
    "F309": {
      "label": "Pick reason, Keras",
      "display": "runs on JAX, PyTorch, or TensorFlow",
      "asOf": "2026-11-17"
    },
    "F310": {
      "label": "Pick alternative reason, PyTorch for JAX",
      "display": "for ready-made layers",
      "asOf": "2026-11-17"
    },
    "F311": {
      "label": "What, JAX",
      "display": "Adds automatic differentiation, compilation, and batching to NumPy-style array code.",
      "asOf": "2026-11-17"
    },
    "F312": {
      "label": "strengths lead, JAX",
      "display": "Runs on GPUs and TPUs",
      "asOf": "2026-11-17"
    },
    "F313": {
      "label": "strengths, JAX",
      "display": "The same code runs on CPU, GPU, and TPU backends.",
      "asOf": "2026-11-17"
    },
    "F314": {
      "label": "strengths lead, JAX",
      "display": "Differentiates Python control flow",
      "asOf": "2026-11-17"
    },
    "F315": {
      "label": "strengths, JAX",
      "display": "jax.grad takes gradients through loops, branches, recursion, and closures.",
      "asOf": "2026-11-17"
    },
    "F316": {
      "label": "limitations lead, JAX",
      "display": "Needs pure functions",
      "asOf": "2026-11-17"
    },
    "F317": {
      "label": "limitations, JAX",
      "display": "Pass every input as an argument and return every result, or transformed functions can behave unexpectedly.",
      "asOf": "2026-11-17"
    },
    "F318": {
      "label": "limitations lead, JAX",
      "display": "No neural-network layers",
      "asOf": "2026-11-17"
    },
    "F319": {
      "label": "limitations, JAX",
      "display": "Add Flax, Equinox, or Keras to build and train networks.",
      "asOf": "2026-11-17"
    },
    "F320": {
      "label": "What, Keras",
      "display": "A deep learning API that runs models on JAX, TensorFlow, or PyTorch.",
      "asOf": "2026-11-17"
    },
    "F321": {
      "label": "strengths lead, Keras",
      "display": "Exports to each framework",
      "asOf": "2026-11-17"
    },
    "F322": {
      "label": "strengths, Keras",
      "display": "Use a Keras model as a PyTorch Module, a TensorFlow SavedModel, or a JAX function.",
      "asOf": "2026-11-17"
    },
    "F323": {
      "label": "strengths lead, Keras",
      "display": "Trains from any data pipeline",
      "asOf": "2026-11-17"
    },
    "F324": {
      "label": "strengths, Keras",
      "display": "fit() accepts tf.data datasets, PyTorch DataLoaders, NumPy arrays, and pandas dataframes.",
      "asOf": "2026-11-17"
    },
    "F325": {
      "label": "limitations lead, Keras",
      "display": "Set the backend first",
      "asOf": "2026-11-17"
    },
    "F326": {
      "label": "limitations, Keras",
      "display": "Set KERAS_BACKEND before importing Keras. It can't change afterward.",
      "asOf": "2026-11-17"
    },
    "F327": {
      "label": "limitations lead, Keras",
      "display": "Needs a backend installed",
      "asOf": "2026-11-17"
    },
    "F328": {
      "label": "limitations, Keras",
      "display": "Install a backend such as JAX, PyTorch, or TensorFlow alongside Keras.",
      "asOf": "2026-11-17"
    },
    "F329": {
      "label": "What, TensorFlow",
      "display": "An end-to-end platform for building, training, and deploying machine learning models.",
      "asOf": "2026-11-17"
    },
    "F330": {
      "label": "Pick alternative reason, XGBoost for LightGBM",
      "display": "for data with many missing values",
      "asOf": "2026-11-17"
    },
    "F331": {
      "label": "Pick alternative reason, TensorFlow for Keras",
      "display": "for teams already deploying TensorFlow",
      "asOf": "2026-11-17"
    },
    "F332": {
      "label": "Pick alternative reason, XGBoost for scikit-learn",
      "display": "for gradient-boosted trees",
      "asOf": "2026-11-17"
    },
    "F333": {
      "label": "Pick reason, Keras",
      "display": "for a higher-level API",
      "asOf": "2026-11-17"
    },
    "F334": {
      "label": "Pick reason, LightGBM",
      "display": "when memory is tight",
      "asOf": "2026-11-17"
    },
    "F335": {
      "label": "Pick reason, Keras",
      "display": "to switch backends later",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-18",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Python machine learning libraries scikit-learn XGBoost LightGBM CatBoost PyTorch TensorFlow missing data categorical GPU export",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
