@prefix dc1: <http://purl.org/dc/terms/> .
@prefix dul: <http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#> .
@prefix np: <http://www.nanopub.org/nschema#> .
@prefix npx: <http://purl.org/nanopub/x/> .
@prefix orcid: <https://orcid.org/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix pplan: <http://purl.org/net/p-plan#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <https://schema.org/> .
@prefix sub: <http://purl.org/np/RA0djZHLoIColxjUGWnBLbJsq37idvaQitaxfIZlp081o#> .
@prefix this: <http://purl.org/np/RA0djZHLoIColxjUGWnBLbJsq37idvaQitaxfIZlp081o> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
sub:Head {
  this: np:hasAssertion sub:assertion ;
    np:hasProvenance sub:provenance ;
    np:hasPublicationInfo sub:pubinfo ;
    a np:Nanopublication .
}
sub:assertion {
  sub:_LinguisticSystem a schema:ComputerLanguage ;
    rdfs:label "python" ;
    rdfs:seeAlso <https://www.wikidata.org/wiki/Q28865> ;
    owl:versionInfo "3.9.15.final.0" .
  sub:_plan dc1:description """@is_fairworkflow(label='My model training workflow')
def training_workflow(n_jobs: int):

    # Define models hyper params
    hyper_params = {
        'n_jobs': n_jobs,
        'random_state': 42
    }

    data = load_data()
    y = load_data_y()

    # Train model (here we use a stub dataset just to make the example clear)
    model = fit_classifier(hyper_params, data, y)

    # Evaluate the model using your own metrics
    scores = evaluate(model)

    # Save the model generated to the models/ folder
    path = save(
        model,
        \"models/my_model\",
        sample_data=data,
        scores=scores,
        hyper_params=hyper_params,
    )
    return path
    # Optionally you can save other files (dataframes, JSON objects) in the data/ folder
""" ;
    dc1:language sub:_LinguisticSystem ;
    a pplan:Plan ;
    rdfs:label "My model training workflow" .
  <http://purl.org/np/RA38bU_sa5fKMd_ShiqBW7YOPDQNT2ZHPu86JeprVfIVs#step> pplan:isStepOfPlan sub:_plan ;
    dul:precedes <http://purl.org/np/RAe1C9VcwXAm6MLhVdnlrYU6d5gSfIaFWdxhE9pnjJtzY#step> , <http://purl.org/np/RAlSorsmcc6CrtJZwkcI-q693omxNTcr_TvnfLfH_bA0Q#step> .
  <http://purl.org/np/RAKXkumGLkuIgnPj5A3OSC22ZUipeKMuMYMzk7HzZrx8w#step> pplan:isStepOfPlan sub:_plan ;
    dul:precedes <http://purl.org/np/RA38bU_sa5fKMd_ShiqBW7YOPDQNT2ZHPu86JeprVfIVs#step> , <http://purl.org/np/RAlSorsmcc6CrtJZwkcI-q693omxNTcr_TvnfLfH_bA0Q#step> .
  <http://purl.org/np/RAe1C9VcwXAm6MLhVdnlrYU6d5gSfIaFWdxhE9pnjJtzY#step> pplan:isStepOfPlan sub:_plan ;
    dul:precedes <http://purl.org/np/RAlSorsmcc6CrtJZwkcI-q693omxNTcr_TvnfLfH_bA0Q#step> .
  <http://purl.org/np/RAlSorsmcc6CrtJZwkcI-q693omxNTcr_TvnfLfH_bA0Q#step> pplan:isStepOfPlan sub:_plan .
  <http://purl.org/np/RAo-VK51bx4tcsFVApUwm41fGy7wvoWuJkEQraWKfISJU#step> pplan:isStepOfPlan sub:_plan ;
    dul:precedes <http://purl.org/np/RA38bU_sa5fKMd_ShiqBW7YOPDQNT2ZHPu86JeprVfIVs#step> .
  <http://www.example.org/unpublished-evaluate#out1> pplan:bindsTo <http://www.example.org/unpublished-save#scores> .
  <http://www.example.org/unpublished-fit_classifier#out1> pplan:bindsTo <http://www.example.org/unpublished-evaluate#model> , <http://www.example.org/unpublished-save#model> .
  <http://www.example.org/unpublished-load_data#out1> pplan:bindsTo <http://www.example.org/unpublished-fit_classifier#data> , <http://www.example.org/unpublished-save#sample_data> .
  <http://www.example.org/unpublished-load_data_y#out1> pplan:bindsTo <http://www.example.org/unpublished-fit_classifier#y> .
  <http://www.example.org/unpublished-save#out1> pplan:bindsTo sub:_result .
}
sub:provenance {
  sub:assertion prov:generatedAtTime "2022-12-21T18:13:13.818414"^^xsd:dateTime .
}
sub:pubinfo {
  sub:sig npx:hasAlgorithm "RSA" ;
    npx:hasPublicKey "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlKZel+uM9w+JiWuhs0NHtaXdRrGkGAjvnnLFQL2nmgZDGIjX+is2YJBd6R2kBkr67lYiUDWdtih0F0yqUlAW5GdYUihk1MBiWyLe4RNt7I5iC/5wwK/i5vV6/YKa6Zwf4oymwChpdXddlKc6d73StgFqOafQPeNeBUHTZbkmUKFAqGXf0nAclB23DEeN5qVl6XRa1qqtL91AKW+UxTvlZR3pFNFn8xKTfbOSgmuAkYSUwJrp84rNI92qXYtOJ12oH0oT/enzcThxcfPLomGc9BMd+QBCj08LdrtuAArHzcivMKDzreDCD+haZ/GdObRWHpQ5O4bEWIx3dZVQq7t0KQIDAQAB" ;
    npx:hasSignature "CtDaJDADFhjK2Z6Y9YUUIGhMoe9Cucyahe++SAQMX9MZdVueG1hSCqwVEWkTG3sUcIDMbxRoIYejItBOCZLcJw3HYgYfoA4fPjET+nnWlWRY+ifkg/em6rLBWRsOsAaz9b7PqVjykQ53Y3pQYuQpYDBYjUGw4/bSQLRWkzIDc6mhEJvPIQDx6oB3cjcjlVUn16JkPlnbkAUUFD64PGQK6xlI6OisgNbo+KRm789YTxoM+tByFz9Bo4H2vA7y2+UNjjLGZR6gf6E1aMXQZ9nsfVewG2dSdoFnNDhlOooX2Ps1TEeXWCxaIe5zDUZN6omoTkgo92Nt1565cVE18wdTWg==" ;
    npx:hasSignatureTarget this: .
  this: prov:wasAttributedTo orcid:0000-0000-0000-0000 .
}