You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove entry for `skll/__init__.py` since it's now blank.
- Update entry for `skll/metrics.py` since it now does more.
- Fix all of the link anchors to point to the correct line numbers.
Copy file name to clipboardExpand all lines: doc/contributing.rst
+5-7
Original file line number
Diff line number
Diff line change
@@ -23,15 +23,13 @@ Organization
23
23
24
24
The main Python code for the SKLL package lives inside the ``skll`` sub-directory of the repository. It contains the following files and sub-directories:
25
25
26
-
- `__init__.py <https://github.com/EducationalTestingService/skll/blob/main/skll/__init__.py>`__ : Code used to initialize the ``skll`` Python package.
- `experiments/ <https://github.com/EducationalTestingService/skll/tree/main/skll/experiments>`__ : Code that is related to creating and running SKLL experiments. It also contains code that collects the various evaluation metrics and predictions for each SKLL experiment and writes them out to disk.
31
29
32
30
- `learner/ <https://github.com/EducationalTestingService/skll/tree/main/skll/learner>`__ : Code for the `Learner <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/__init__.py>`__ and `VotingLearner <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/voting.py>`__ classes. The former is instantiated for all learner names specified in the experiment configuration file *except* ``VotingClassifier`` and ``VotingRegressor`` for which the latter is instantiated instead.
33
31
34
-
- `metrics.py <https://github.com/EducationalTestingService/skll/blob/main/skll/metrics.py>`__ : Code for any custom metrics that are not in ``sklearn.metrics``, e.g., ``kappa``, ``kendall_tau``, ``spearman``, etc.
32
+
- `metrics.py <https://github.com/EducationalTestingService/skll/blob/main/skll/metrics.py>`__ : Code for any custom metrics that are not in ``sklearn.metrics``, e.g., ``kappa``, ``kendall_tau``, ``spearman``, etc. This module also contains the code that powers :ref:`user-defined custom metrics <custom_metrics>`.
@@ -80,12 +78,12 @@ There are three main entry points into the SKLL codebase:
80
78
`run_experiment <https://skll.readthedocs.io/en/latest/run_experiment.html#using-run-experiment>`__ script. When you run the command
81
79
``run_experiment <config_file>``, the following happens (at a high level):
82
80
83
-
- the configuration file is handed off to the `run_configuration() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L482>`__ function in ``experiments.py``.
81
+
- the configuration file is handed off to the `run_configuration() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L609>`__ function in ``experiments.py``.
84
82
85
-
- a `SKLLConfigParser <https://github.com/EducationalTestingService/skll/blob/main/skll/config/__init__.py#L41>`__ object is instantiated from ``config.py`` that parses all of the relevant fields out of the given configuration file.
83
+
- a `SKLLConfigParser <https://github.com/EducationalTestingService/skll/blob/main/skll/config/__init__.py#L44>`__ object is instantiated from ``config.py`` that parses all of the relevant fields out of the given configuration file.
86
84
87
-
- the configuration fields are then passed to the `_classify_featureset() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L56>`__ function in ``experiments.py`` which instantiates the learners (using code from ``learner.py``), the featuresets (using code from ``reader.py`` & ``featureset.py``), and runs the experiments, collects the results, and writes them out to disk.
85
+
- the configuration fields are then passed to the `_classify_featureset() <https://github.com/EducationalTestingService/skll/blob/main/skll/experiments/__init__.py#L64>`__ function in ``experiments.py`` which instantiates the learners (using code from ``learner.py``), the featuresets (using code from ``reader.py`` & ``featureset.py``), and runs the experiments, collects the results, and writes them out to disk.
88
86
89
-
2. **SKLL API**. Another way to interact with SKLL is via the SKLL API directly in your Python code rather than using configuration files. For example, you could use the `Learner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/__init__.py#L324>`__ or `VotingLearner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/voting.py#L254>`__ methods to load saved models of those types from disk and make predictions on new data. The documentation for the SKLL API can be found `here <https://skll.readthedocs.io/en/latest/api.html>`__.
87
+
2. **SKLL API**. Another way to interact with SKLL is via the SKLL API directly in your Python code rather than using configuration files. For example, you could use the `Learner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/__init__.py#L384>`__ or `VotingLearner.from_file() <https://github.com/EducationalTestingService/skll/blob/main/skll/learner/voting.py#L243>`__ methods to load saved models of those types from disk and make predictions on new data. The documentation for the SKLL API can be found `here <https://skll.readthedocs.io/en/latest/api.html>`__.
90
88
91
89
3. **Utility scripts**. The scripts listed in the section above under ``utils`` are also entry points into the SKLL code. These scripts are convenient wrappers that use the SKLL API for commonly used tasks, e.g., generating predictions on new data from an already trained model.
0 commit comments