ImFusion C++ SDK 4.4.0
ImFusion::LogisticRegression Class Reference

#include <ImFusion/Base/LogisticRegression.h>

Class for logistic regression. More...

Inheritance diagram for ImFusion::LogisticRegression:

Detailed Description

Class for logistic regression.

Public Member Functions

 LogisticRegression (int dimFeatures)
void train (float **data, const float *labels, size_t nData) override
float predict (const float *data) const override
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
void train (const std::vector< std::vector< float > > &data, const std::vector< float > &labels)
float predict (const std::vector< float > &data) const
Public Member Functions inherited from ImFusion::Regression
 Regression (int dimFeatures)
void train (const std::vector< std::vector< float > > &data, const std::vector< float > &labels)
float predict (const std::vector< float > &data) const
virtual float computeResiduals (float **data, const float *labels, size_t nData) const
void configure (const Properties *p) override
 Configure this object instance by de-serializing the given Properties.
void configuration (Properties *p) const override
 Serialize the current object configuration into the given Properties object.
const float * weights () const
Public Member Functions inherited from ImFusion::Configurable
virtual void configureDefaults ()
 Retrieve the properties of this object, replaces values with their defaults and sets it again.
void registerParameter (ParameterBase *param)
 Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
void unregisterParameter (const ParameterBase *param)
 Remove the given Parameter or SubProperty from the list of registered parameters.
 Configurable (const Configurable &rhs)
 Configurable (Configurable &&rhs) noexcept
Configurable & operator= (const Configurable &)
Configurable & operator= (Configurable &&) noexcept

Additional Inherited Members

Public Attributes inherited from ImFusion::Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
Protected Member Functions inherited from ImFusion::Regression
virtual void initializeWeights ()
void trainBalanced (float **data, const float *labels, size_t nData)
void generateBalancedData (float **features, const float *labels, size_t nData, float **&balancedFeatures, float *&balancedLabels, size_t &balancedNbData)
Protected Attributes inherited from ImFusion::Regression
int m_dimFeatures
std::vector< float > m_weights
bool m_rebalanceDataset
Protected Attributes inherited from ImFusion::Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.

Member Function Documentation

◆ train()

void ImFusion::LogisticRegression::train ( float ** data,
const float * labels,
size_t nData )
overridevirtual

Implements ImFusion::Regression.

◆ predict()

float ImFusion::LogisticRegression::predict ( const float * data) const
overridevirtual

Implements ImFusion::Regression.

◆ configure()

void ImFusion::LogisticRegression::configure ( const Properties * p)
overridevirtual

Configure this object instance by de-serializing the given Properties.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configuration() for the inverse functionality

Reimplemented from ImFusion::Configurable.

◆ configuration()

void ImFusion::LogisticRegression::configuration ( Properties * p) const
overridevirtual

Serialize the current object configuration into the given Properties object.

The default implementation will do so automatically for all registered Parameter and SubProperty instances.

See also
configure() for the inverse functionality

Reimplemented from ImFusion::Configurable.


The documentation for this class was generated from the following file:
  • ImFusion/Base/LogisticRegression.h
Search Tab / S to search, Esc to close