How-to: asap fit

asap fit sub_command is for fitting to certain properties of the data using the design matrix generated by the command asap gen_desc.

Overview of sub-commands

sub-commands that controls which algorithm to use for the fit:

option

description

kernelridge

Kernel Ridge Regression (with sparsification)

ridge

Ridge Regression

asap fit

Fit a machine learning model to the design matrix and labels. This command function evaluated before the specific ones, we setup the general stuff here, such as read the files.

asap fit [OPTIONS] COMMAND [ARGS]...

Options

-f, --fxyz <fxyz>

Input file that contains XYZ coordinates. See a list of possible input formats: https://wiki.fysik.dtu.dk/ase/ase/io/io.html If a wildcard * is used, all files matching the pattern is read.

-p, --prefix <prefix>

Prefix to be used for the output file.

--only_use_species <only_use_species>

Only use the atomic descriptors of species with the specified atomic number. Only makes sense if already using –use_atomic_descriptors.

-ua, --use_atomic_descriptors, --use_atomic

Use atomic descriptors instead of global ones.

-dm, --design_matrix <design_matrix>

Location of descriptor matrix file or name of the tags in ase xyz file the type is a list ‘[dm1, dm2]’, as we can put together simutanously several design matrix.

-y, --y <y>

Location of a file or name of the properties in the XYZ file

-nbs, --normalized_by_size

Normalize y by the number of atoms in each frame.

Default

False

-t, --test_ratio, --test <test_ratio>

Test ratio.

Default

0.05

-lc, --learning_curve <learning_curve>

the number of points on the learning curve, <= 1 means no learning curve

Default

-1

-lcp, --lc_points <lc_points>

the number of sub-samples to take when compute the learning curve

Default

8

kernelridge

Kernel Ridge Regression (with sparsification)

asap fit kernelridge [OPTIONS]

Options

--sigma <sigma>

the noise level of the signal. Also the regularizer that improves the stablity of matrix inversion.

-k, --kernel <kernel>

Kernel function for converting design matrix to kernel matrix.

Default

linear

Options

linear|polynomial|cosine

-kp, --kernel_parameter <kernel_parameter>

Parameter used in the kernel function.

-s, --sparse_mode <sparse_mode>

Sparsification method to use.

Default

fps

Options

random|cur|fps|sequential

-n, --n_sparse <n_sparse>

number of the representative samples, set negative if using no sparsification

Default

100

ridge

Ridge Regression

asap fit ridge [OPTIONS]

Options

--sigma <sigma>

the noise level of the signal. Also the regularizer that improves the stablity of matrix inversion.

Note

More documentation to be added.