Docs: minor fixes

pull/3/head
Alinson S. Xavier 5 years ago
parent 9355ab9158
commit c15ec9e2c8

@ -204,13 +204,13 @@ more aggressive, this precision may be lowered.</p>
<h2 id="evaluating-component-performance">Evaluating component performance</h2>
<p>MIPLearn allows solver components to be modified, trained and evaluated in isolation. In the following example, we build and
fit <code>PrimalSolutionComponent</code> outside a solver, then evaluate its performance.</p>
fit <code>PrimalSolutionComponent</code> outside the solver, then evaluate its performance.</p>
<pre><code class="python">from miplearn import PrimalSolutionComponent
# User-provided set os solved training instances
# User-provided set of previously-solved instances
train_instances = [...]
# Construct and fit component on a subset of the training set
# Construct and fit component on a subset of training instances
comp = PrimalSolutionComponent()
comp.fit(train_instances[:100])
@ -247,7 +247,8 @@ False negative (%) 29.720000
dtype: float64
</code></pre>
<p>Regression components (such as <code>ObjectiveValueComponent</code>) can also be used similarly, as shown in the next example:</p>
<p>Regression components (such as <code>ObjectiveValueComponent</code>) can also be trained and evaluated similarly,
as the next example shows:</p>
<pre><code class="python">from miplearn import ObjectiveValueComponent
comp = ObjectiveValueComponent()
comp.fit(train_instances[:100])

@ -273,5 +273,5 @@
<!--
MkDocs version : 1.1
Build Date UTC : 2020-05-05 18:32:57
Build Date UTC : 2020-05-05 18:38:02
-->

File diff suppressed because one or more lines are too long

Binary file not shown.

@ -65,15 +65,15 @@ PrimalSolutionComponent(threshold=MinPrecisionThreshold(0.95))
## Evaluating component performance
MIPLearn allows solver components to be modified, trained and evaluated in isolation. In the following example, we build and
fit `PrimalSolutionComponent` outside a solver, then evaluate its performance.
fit `PrimalSolutionComponent` outside the solver, then evaluate its performance.
```python
from miplearn import PrimalSolutionComponent
# User-provided set os solved training instances
# User-provided set of previously-solved instances
train_instances = [...]
# Construct and fit component on a subset of the training set
# Construct and fit component on a subset of training instances
comp = PrimalSolutionComponent()
comp.fit(train_instances[:100])
@ -112,7 +112,8 @@ False negative (%) 29.720000
dtype: float64
```
Regression components (such as `ObjectiveValueComponent`) can also be used similarly, as shown in the next example:
Regression components (such as `ObjectiveValueComponent`) can also be trained and evaluated similarly,
as the next example shows:
```python
from miplearn import ObjectiveValueComponent

Loading…
Cancel
Save