How to use the jupyter.create.ml_template.src.ml_template.notebook_template.Estimator function in jupyter

To help you get started, we’ve selected a few jupyter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
content[Estimator.SVC.value] = {
 "import": "from sklearn.svm import SVC",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC",
 "evaluation": "classification"
}
content[Estimator.KNeighborsClassifier.value] = {
 "import": "from sklearn.neighbors import KNeighborsClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/neighbors.html",
 "evaluation": "classification"
}
content[Estimator.RandomForestClassifier.value] = {
 "import": "from sklearn.ensemble import RandomForestClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDClassifier.value] = {
 "import": "from sklearn.linear_model import SGDClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDRegressor.value] = {
 "import": "from sklearn.linear_model import SGDRegressor",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor",
 "evaluation": "regression"
}
content[Estimator.SVR.value] = {
 "import": "from sklearn.svm import SVR",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR",
 "evaluation": "regression"
}
content[Estimator.MiniBatchKMeans.value] = {
 "import": "from sklearn.cluster import MiniBatchKMeans",
github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
content[Estimator.SGDClassifier.value] = {
 "import": "from sklearn.linear_model import SGDClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDRegressor.value] = {
 "import": "from sklearn.linear_model import SGDRegressor",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor",
 "evaluation": "regression"
}
content[Estimator.SVR.value] = {
 "import": "from sklearn.svm import SVR",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR",
 "evaluation": "regression"
}
content[Estimator.MiniBatchKMeans.value] = {
 "import": "from sklearn.cluster import MiniBatchKMeans",
 "doc_link": "https://scikit-learn.org/stable/modules/clustering.html#mini-batch-k-means",
 "evaluation": "classification"
}
content[Estimator.KMeans.value] = {
 "import": "from sklearn.cluster import KMeans",
 "doc_link": "https://scikit-learn.org/stable/modules/clustering.html#k-means",
 "evaluation": "clustering"
}


metrics = {
 "regression": [
  {
    "cell_type": "markdown",
    "metadata": {},
github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
content[Estimator.RandomForestClassifier.value] = {
 "import": "from sklearn.ensemble import RandomForestClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDClassifier.value] = {
 "import": "from sklearn.linear_model import SGDClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDRegressor.value] = {
 "import": "from sklearn.linear_model import SGDRegressor",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor",
 "evaluation": "regression"
}
content[Estimator.SVR.value] = {
 "import": "from sklearn.svm import SVR",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR",
 "evaluation": "regression"
}
content[Estimator.MiniBatchKMeans.value] = {
 "import": "from sklearn.cluster import MiniBatchKMeans",
 "doc_link": "https://scikit-learn.org/stable/modules/clustering.html#mini-batch-k-means",
 "evaluation": "classification"
}
content[Estimator.KMeans.value] = {
 "import": "from sklearn.cluster import KMeans",
 "doc_link": "https://scikit-learn.org/stable/modules/clustering.html#k-means",
 "evaluation": "clustering"
}
github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
MiniBatchKMeans = "MiniBatchKMeans"
    KMeans = "KMeans"


content = {}
content[Estimator.SVC.value] = {
 "import": "from sklearn.svm import SVC",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC",
 "evaluation": "classification"
}
content[Estimator.KNeighborsClassifier.value] = {
 "import": "from sklearn.neighbors import KNeighborsClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/neighbors.html",
 "evaluation": "classification"
}
content[Estimator.RandomForestClassifier.value] = {
 "import": "from sklearn.ensemble import RandomForestClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDClassifier.value] = {
 "import": "from sklearn.linear_model import SGDClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDRegressor.value] = {
 "import": "from sklearn.linear_model import SGDRegressor",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor",
 "evaluation": "regression"
}
content[Estimator.SVR.value] = {
 "import": "from sklearn.svm import SVR",
github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
content[Estimator.SGDRegressor.value] = {
 "import": "from sklearn.linear_model import SGDRegressor",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor",
 "evaluation": "regression"
}
content[Estimator.SVR.value] = {
 "import": "from sklearn.svm import SVR",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR",
 "evaluation": "regression"
}
content[Estimator.MiniBatchKMeans.value] = {
 "import": "from sklearn.cluster import MiniBatchKMeans",
 "doc_link": "https://scikit-learn.org/stable/modules/clustering.html#mini-batch-k-means",
 "evaluation": "classification"
}
content[Estimator.KMeans.value] = {
 "import": "from sklearn.cluster import KMeans",
 "doc_link": "https://scikit-learn.org/stable/modules/clustering.html#k-means",
 "evaluation": "clustering"
}


metrics = {
 "regression": [
  {
    "cell_type": "markdown",
    "metadata": {},
    "source": [
     "## Regression Evaluation Metrics\n",
     "\n",
     "\n",
     "Here are three common evaluation metrics for regression problems:\n",
github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
def grid_search(estimator):
    if estimator not in [Estimator.SVC.value, Estimator.SVR.value]:
        return []

    return [{
     "cell_type": "markdown",
     "metadata": {},
     "source": [
      "# Gridsearch\n",
      "\n",
      "Finding the right parameters (like what C or gamma values to use) is a tricky task. We can adopt a trial and error approach to find the best fit. Through GridSearch, we can try different combinations of parameters and roll with the best option. You just need to feed a dictionary with possible parameters and Scikit-learn will use the one with the best score on the next train fit!"
     ]},
     {
      "cell_type": "code",
      "execution_count": 0,
      "metadata": {},
      "outputs": [],
      "source": [
github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
content[Estimator.KNeighborsClassifier.value] = {
 "import": "from sklearn.neighbors import KNeighborsClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/neighbors.html",
 "evaluation": "classification"
}
content[Estimator.RandomForestClassifier.value] = {
 "import": "from sklearn.ensemble import RandomForestClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDClassifier.value] = {
 "import": "from sklearn.linear_model import SGDClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDRegressor.value] = {
 "import": "from sklearn.linear_model import SGDRegressor",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDRegressor.html#sklearn.linear_model.SGDRegressor",
 "evaluation": "regression"
}
content[Estimator.SVR.value] = {
 "import": "from sklearn.svm import SVR",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.html#sklearn.svm.SVR",
 "evaluation": "regression"
}
content[Estimator.MiniBatchKMeans.value] = {
 "import": "from sklearn.cluster import MiniBatchKMeans",
 "doc_link": "https://scikit-learn.org/stable/modules/clustering.html#mini-batch-k-means",
 "evaluation": "classification"
}
content[Estimator.KMeans.value] = {
 "import": "from sklearn.cluster import KMeans",
github ZupIT / ritchie-formulas / jupyter / create / ml_template / src / ml_template / notebook_template.py View on Github external
KNeighborsClassifier = "KNeighborsClassifier"
    RandomForestClassifier = "RandomForestClassifier"
    SGDClassifier = "SGDClassifier"
    SGDRegressor = "SGDRegressor"
    SVR = "SVR"
    MiniBatchKMeans = "MiniBatchKMeans"
    KMeans = "KMeans"


content = {}
content[Estimator.SVC.value] = {
 "import": "from sklearn.svm import SVC",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC",
 "evaluation": "classification"
}
content[Estimator.KNeighborsClassifier.value] = {
 "import": "from sklearn.neighbors import KNeighborsClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/neighbors.html",
 "evaluation": "classification"
}
content[Estimator.RandomForestClassifier.value] = {
 "import": "from sklearn.ensemble import RandomForestClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html#sklearn.ensemble.RandomForestClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDClassifier.value] = {
 "import": "from sklearn.linear_model import SGDClassifier",
 "doc_link": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.SGDClassifier.html#sklearn.linear_model.SGDClassifier",
 "evaluation": "classification"
}
content[Estimator.SGDRegressor.value] = {
 "import": "from sklearn.linear_model import SGDRegressor",