PREFIX mls: <http://www.w3.org/ns/mls#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

mls:Experiment a rdfs:Class ;
  rdfs:comment "Experiment is a collection of runs." ;
  rdfs:subClassOf mls:Process .

mls:hasPart a rdf:Property ;
  rdfs:label "hasPart"@en ;
  rdfs:comment "A relation which represents a part-whole relationship holding between an entity and its part." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:ModelCharacteristic a rdfs:Class ;
  rdfs:comment "ModelCharacteristic is a distinguishing quality or property that distinguish one model from another. An example model characetristic may be interpretabilty or a complexity of the model." ;
  rdfs:subClassOf mls:Quality .

mls:Model a rdfs:Class ;
  rdfs:comment "Model is a generalization of a set of training data able to predict values for unseen instances. It is an output from an execution of a data mining algorithm implementation. Models have a dual nature. They can be treated as data structures and as such represented, stored and manipulated. On the other hand, they act as functions and are executed, taking as input data examples and giving as output the result of applying the function to a data example. Models can also be divided into global or local ones. A global model has global coverage of a data set, i.e., it generalizes the whole data set. A local model, such as a pattern set, is a set of local hypotheses, i.e. each applies to a limited region of the data set." ;
  rdfs:subClassOf mls:InformationEntity .

mls:hasQuality a rdf:Property ;
  rdfs:comment "A relation between entities and their various characteristics." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:Quality a rdfs:Class .

mls:Implementation a rdfs:Class ;
  rdfs:comment "Implementation is an executable implementation of a machine learning algorithm, a script, or a workflow. It is versioned, and sometimes belongs to a library (e.g. WEKA)." ;
  rdfs:subClassOf mls:InformationEntity .

mls:implements a rdf:Property ;
  rdfs:label "implements"@en ;
  rdfs:comment "A relation between an information entity and a specification that it conforms to." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:hasHyperParameter a rdf:Property ;
  rdfs:label "hasHyperParameter"@en ;
  rdfs:comment "A relation between an implementation of a machine learning algorithm and its hyperparameter." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:EvaluationMeasure a rdfs:Class ;
  rdfs:comment "EvaluationMeasure is a measure to assess the performance of the model generated by the process that realizes the task. Examples are predictive accuracy or f-measure." ;
  rdfs:subClassOf mls:InformationEntity .

mls:EvaluationSpecification a rdfs:Class ;
  rdfs:comment "EvaluationProcedure is a technique to evaluate machine learning models. Examples are cross-validation and leave-one-out." ;
  rdfs:subClassOf mls:InformationEntity .

mls:defines a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:DatasetCharacteristic a rdfs:Class ;
  rdfs:subClassOf mls:DataCharacteristic .

mls:Software a rdfs:Class ;
  rdfs:comment "Software is implemented computer programs, procedures, scripts or rules with associated documentation, possibly constituting an organized environment, stored in read/write memory for the purpose of being executed within a computer system." ;
  rdfs:subClassOf mls:InformationEntity .

mls:InformationEntity a rdfs:Class .

mls:HyperParameter a rdfs:Class ;
  rdfs:comment "Hyperparameter is a prior parameter of an implementation, i.e., a parameter which is set before its execution (e.g. C, the complexity parameter, in weka.SMO)." ;
  rdfs:subClassOf mls:InformationEntity .

mls:FeatureCharacteristic a rdfs:Class ;
  rdfs:subClassOf mls:DataCharacteristic .

mls:Study a rdfs:Class ;
  rdfs:comment "Study is a collection of runs that belong together to do some kind of analysis on its results. This analysis can be general or very specific (e.g. a hypothesis test). Can be linked to files, data, that belong to it." ;
  rdfs:subClassOf mls:Process .

mls:Run a rdfs:Class ;
  rdfs:comment "Run is an execution of an implementation on a machine (computer). It is limited in time (has a start and end point), can be successful or failed." ;
  rdfs:subClassOf mls:Process .

mls:executes a rdf:Property ;
  rdfs:comment "A relation between a run and an implemantation that is being executed during the run." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:achieves a rdf:Property ;
  rdfs:comment "A relation between a run and a task, where the run achieves specifications formulated by the task." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:hasOutput a rdf:Property ;
  rdfs:comment "A relation between a run and either a model or model evaluation that is produced on it’s output." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:hasInput a rdf:Property ;
  rdfs:label "hasInput"@en ;
  rdfs:comment "A relation between a run and data that is taken as input to the run." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:realizes a rdf:Property ;
  rdfs:comment "A relation between a run and an algorithm, where the run realizes specifications formulated by the algorithm." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:Dataset a rdfs:Class ;
  rdfs:subClassOf mls:Data .

mls:ModelEvaluation a rdfs:Class ;
  rdfs:comment "ModelEvaluation is a setting of a value of the performance measure  specified by the evaluation specification. It connects a measure specification with its value." ;
  rdfs:subClassOf mls:InformationEntity .

mls:specifiedBy a rdf:Property ;
  rdfs:comment "A relation between an entity and the information content entity that specifies it." ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:hasValue a rdf:Property ;
  rdfs:range <https://w3id.org/linkml/Any> .

mls:EvaluationProcedure a rdfs:Class ;
  rdfs:comment "EvaluationProcedure is a technique to evaluate machine learning models. Examples are cross-validation and leave-one-out." ;
  rdfs:subClassOf mls:InformationEntity .

mls:HyperParameterSetting a rdfs:Class ;
  rdfs:comment "HyperParameterSetting is an entity which connects a hyperparameter and its value that is being set before an implementation execution." ;
  rdfs:subClassOf mls:InformationEntity .

mls:ImplementationCharacteristic a rdfs:Class ;
  rdfs:comment "ImplementationCharacteristic is a distinguishing quality or property that distinguish one implementation from another." ;
  rdfs:subClassOf mls:Quality .

mls:Algorithm a rdfs:Class ;
  rdfs:comment "The algorithm regardless software implementation." ;
  rdfs:subClassOf mls:InformationEntity .

mls:Feature a rdfs:Class ;
  rdfs:subClassOf mls:Data .

mls:Process a rdfs:Class ;
  rdfs:label "Process"@en .

mls:Data a rdfs:Class ;
  rdfs:comment """Data is a data item composed of data examples and it may be of a various level of granularity and complexity. 
With regard to granularity, it can be a whole dataset (for instance, one main table and possibly other tables), or only a single table, or only a feature (e.g., a column of a table), or only an instance (e.g., row of a table), or a single feature-value pair. 
With regard to complexity, data examples are characterized by their datatype, which may be arbitrarily complex (e.g., instead of a table it can be an arbitrary graph).""" ;
  rdfs:subClassOf mls:InformationEntity .

mls:DataCharacteristic a rdfs:Class ;
  rdfs:comment """DataCharacteristic is a distinguishing quality or property that distinguish one data from another.
Such characteristics are often statistical ones (e.g., the number of instances
or the number of features of a data set). They may be also informationtheoretic measures (e.g., class entropy of a categorical data set) or geometric measures of data complexity (e.g., the highest discriminatory power of any single feature in the data set).""" ;
  rdfs:subClassOf mls:Quality .

<https://w3id.org/linkml/Any> a rdfs:Class ;
  rdfs:comment "An unconstrained type or object" .

mls:Task a rdfs:Class ;
  rdfs:comment "Task is a formal description of a process that needs to be completed (e.g. based on inputs and outputs). A Task is any piece of work that needs to be addressed in the data mining process. In ML Schema, it is defined based on data." ;
  rdfs:subClassOf mls:InformationEntity .

mls:definedOn a rdf:Property ;
  rdfs:label "definedOn"@en ;
  rdfs:comment "A relation between a task and either the data or an evaluation specification pertinent to this task." ;
  rdfs:range <https://w3id.org/linkml/Any> .
