Skip to content

Commit

Permalink
sorted xfit prop names
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-s committed Aug 23, 2019
1 parent 49d5407 commit 1c18f35
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 90 deletions.
95 changes: 50 additions & 45 deletions docs/reference/matlab/xfit-head.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,49 @@ using the built-in `properties` command:
properties(xf)
```

### `x`
### `best_cost`


The best cost holds the lowest value computed by the simulation function during an optimization procedure. This is a read-only property.



### `data`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | scalar values | xolotl |
| [] | any | any |

This property contains a xolotl object. Since xfit uses
xolotl to run actual simulations, this is necessary for all projects.
The `data` property can hold any user-defined data. You may want to use this if your cost function required additional data to measure the cost. For example, if you want to fit a neuron to a specifiy voltage trace, you would store it here.

### `SimFcn`
### `engine`

This option determines the optimization algorithm used.

| Engine Name | Engine Keyword |
| ----------- | -------------- |
| Pattern Search | `patternsearch` |
| Particle Swarm | `particleswarm` |
| Genetic Algorithm | `ga` |



### `lb` & `ub`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | any | function_handle |
| [] | vectors | double |

A function handle to the simulation function used to evaluate the model cost.
The simulation function can be any MATLAB function,
provided that the following are true:
`lb` and `ub` are $n$ x 1 vectors of numerical lower bound and upper bound values. During optimization, parameters are bounded between their upper and lower bounds.

* The first output must be the cost, which is a positive, real-valued scalar.
* The function accepts two arguments, the first of which is a xolotl object.

The function thus has the (minimal) signature:
### `nonlcon`

```
function [cost, ...] = functionName(xolotl_object, data)
```
Nonlinear inequality and equaity constraints, only supported for engines that support them. To understand how to use these constraints, look at MATLAB's documentation [here](https://www.mathworks.com/help/optim/ug/nonlinear-constraints.html)

When xfit performs a parameter optimization routine,
it calls the `SimFcn` using the xolotl object stored in the `x` property, which has been set up with trial parameters.
### `options`

This property is a struct that holds options for the selected optimization engine. It is automatically generated from MATLAB's built-in [optimoptions](https://www.mathworks.com/help/optim/ug/optimization-options-reference.html) function.

### `parameter_names`

Expand All @@ -68,6 +81,8 @@ This cell array of character vectors contains the names of xolotl parameters to
The `find` method of xolotl is the best way to populate this list.
`seed`, `lb`, and `ub` share one-to-one correspondence with `parameter_names`, so all should be the same dimensions.



### `seed`

| Default | Allowed values | Type |
Expand All @@ -78,51 +93,41 @@ The seed is an $n$ x 1 vector of numerical parameter values
for starting an optimization protocol,
where $n$ is the number of parameters to optimize over.

### `lb` & `ub`

### `SimFcn`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | vectors | double |

`lb` and `ub` are $n$ x 1 vectors of numerical lower bound and upper bound values. During optimization, parameters are bounded between their upper and lower bounds.

### `options`

| [] | any | function_handle |

A function handle to the simulation function used to evaluate the model cost.
The simulation function can be any MATLAB function,
provided that the following are true:

This property is a struct that holds options for the selected optimization engine. It is automatically generated from MATLAB's built-in [optimoptions](https://www.mathworks.com/help/optim/ug/optimization-options-reference.html) function.
* The first output must be the cost, which is a positive, real-valued scalar.
* The function accepts two arguments, the first of which is a xolotl object.

The function thus has the (minimal) signature:

### `engine`
```
function [cost, ...] = functionName(xolotl_object, data)
```

This option determines the optimization algorithm used.
When xfit performs a parameter optimization routine,
it calls the `SimFcn` using the xolotl object stored in the `x` property, which has been set up with trial parameters.

| Engine Name | Engine Keyword |
| ----------- | -------------- |
| Pattern Search | `patternsearch` |
| Particle Swarm | `particleswarm` |
| Genetic Algorithm | `ga` |

### `timestamp`
This property keeps track of the duration of a simulation. This is a read-only property.

### `best_cost`


The best cost holds the lowest value computed by the simulation function during an optimization procedure. This is a read-only property.

### `data`
### `x`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | any | any |

The `data` property can hold any user-defined data. You may want to use this if your cost function required additional data to measure the cost. For example, if you want to fit a neuron to a specifiy voltage trace, you would store it here.


### 'nonlcon'
| [] | scalar values | xolotl |

Nonlinear inequality and equaity constraints, only supported for engines that support them. To understand how to use these constraints, look at MATLAB's documentation [here](https://www.mathworks.com/help/optim/ug/nonlinear-constraints.html)
This property contains a xolotl object. Since xfit uses
xolotl to run actual simulations, this is necessary for all projects.


## Methods
95 changes: 50 additions & 45 deletions docs/reference/matlab/xfit.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,49 @@ using the built-in `properties` command:
properties(xf)
```

### `x`
### `best_cost`


The best cost holds the lowest value computed by the simulation function during an optimization procedure. This is a read-only property.



### `data`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | scalar values | xolotl |
| [] | any | any |

This property contains a xolotl object. Since xfit uses
xolotl to run actual simulations, this is necessary for all projects.
The `data` property can hold any user-defined data. You may want to use this if your cost function required additional data to measure the cost. For example, if you want to fit a neuron to a specifiy voltage trace, you would store it here.

### `SimFcn`
### `engine`

This option determines the optimization algorithm used.

| Engine Name | Engine Keyword |
| ----------- | -------------- |
| Pattern Search | `patternsearch` |
| Particle Swarm | `particleswarm` |
| Genetic Algorithm | `ga` |



### `lb` & `ub`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | any | function_handle |
| [] | vectors | double |

A function handle to the simulation function used to evaluate the model cost.
The simulation function can be any MATLAB function,
provided that the following are true:
`lb` and `ub` are $n$ x 1 vectors of numerical lower bound and upper bound values. During optimization, parameters are bounded between their upper and lower bounds.

* The first output must be the cost, which is a positive, real-valued scalar.
* The function accepts two arguments, the first of which is a xolotl object.

The function thus has the (minimal) signature:
### `nonlcon`

```
function [cost, ...] = functionName(xolotl_object, data)
```
Nonlinear inequality and equaity constraints, only supported for engines that support them. To understand how to use these constraints, look at MATLAB's documentation [here](https://www.mathworks.com/help/optim/ug/nonlinear-constraints.html)

When xfit performs a parameter optimization routine,
it calls the `SimFcn` using the xolotl object stored in the `x` property, which has been set up with trial parameters.
### `options`

This property is a struct that holds options for the selected optimization engine. It is automatically generated from MATLAB's built-in [optimoptions](https://www.mathworks.com/help/optim/ug/optimization-options-reference.html) function.

### `parameter_names`

Expand All @@ -68,6 +81,8 @@ This cell array of character vectors contains the names of xolotl parameters to
The `find` method of xolotl is the best way to populate this list.
`seed`, `lb`, and `ub` share one-to-one correspondence with `parameter_names`, so all should be the same dimensions.



### `seed`

| Default | Allowed values | Type |
Expand All @@ -78,51 +93,41 @@ The seed is an $n$ x 1 vector of numerical parameter values
for starting an optimization protocol,
where $n$ is the number of parameters to optimize over.

### `lb` & `ub`

### `SimFcn`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | vectors | double |

`lb` and `ub` are $n$ x 1 vectors of numerical lower bound and upper bound values. During optimization, parameters are bounded between their upper and lower bounds.

### `options`

| [] | any | function_handle |

A function handle to the simulation function used to evaluate the model cost.
The simulation function can be any MATLAB function,
provided that the following are true:

This property is a struct that holds options for the selected optimization engine. It is automatically generated from MATLAB's built-in [optimoptions](https://www.mathworks.com/help/optim/ug/optimization-options-reference.html) function.
* The first output must be the cost, which is a positive, real-valued scalar.
* The function accepts two arguments, the first of which is a xolotl object.

The function thus has the (minimal) signature:

### `engine`
```
function [cost, ...] = functionName(xolotl_object, data)
```

This option determines the optimization algorithm used.
When xfit performs a parameter optimization routine,
it calls the `SimFcn` using the xolotl object stored in the `x` property, which has been set up with trial parameters.

| Engine Name | Engine Keyword |
| ----------- | -------------- |
| Pattern Search | `patternsearch` |
| Particle Swarm | `particleswarm` |
| Genetic Algorithm | `ga` |

### `timestamp`
This property keeps track of the duration of a simulation. This is a read-only property.

### `best_cost`


The best cost holds the lowest value computed by the simulation function during an optimization procedure. This is a read-only property.

### `data`
### `x`

| Default | Allowed values | Type |
| ------- | ----- | ----- |
| [] | any | any |

The `data` property can hold any user-defined data. You may want to use this if your cost function required additional data to measure the cost. For example, if you want to fit a neuron to a specifiy voltage trace, you would store it here.


### 'nonlcon'
| [] | scalar values | xolotl |

Nonlinear inequality and equaity constraints, only supported for engines that support them. To understand how to use these constraints, look at MATLAB's documentation [here](https://www.mathworks.com/help/optim/ug/nonlinear-constraints.html)
This property contains a xolotl object. Since xfit uses
xolotl to run actual simulations, this is necessary for all projects.


## Methods
Expand Down

0 comments on commit 1c18f35

Please sign in to comment.