Medical Imaging Interaction Toolkit  2018.4.99-cfdaacfc
Medical Imaging Interaction Toolkit
svm.cpp File Reference
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cfloat>
#include <cstring>
#include <cstdarg>
#include <climits>
#include <clocale>
#include <mitkLocaleSwitch.h>
#include "svm.h"

Go to the source code of this file.

Macros

#define INF
 
#define TAU
 
#define Malloc(type, n)
 
#define FSCANF(_stream, _format, _var)
 

Typedefs

typedef float Qfloat
 
typedef signed char schar
 

Functions

template<class T >
static T min (T x, T y)
 
template<class T >
static T max (T x, T y)
 
template<class T >
static void swap (T &x, T &y)
 
template<class S , class T >
static void clone (T *&dst, S *src, int n)
 
static double powi (double base, int times)
 
static void print_string_stdout (const char *s)
 
static void info (const char *fmt,...)
 
static void solve_c_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si, double Cp, double Cn)
 
static void solve_nu_svc (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void solve_one_class (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void solve_epsilon_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static void solve_nu_svr (const svm_problem *prob, const svm_parameter *param, double *alpha, Solver::SolutionInfo *si)
 
static decision_function svm_train_one (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn)
 
static void sigmoid_train (int l, const double *dec_values, const double *labels, double &A, double &B)
 
static double sigmoid_predict (double decision_value, double A, double B)
 
static void multiclass_probability (int k, double **r, double *p)
 
static void svm_binary_svc_probability (const svm_problem *prob, const svm_parameter *param, double Cp, double Cn, double &probA, double &probB)
 
static double svm_svr_probability (const svm_problem *prob, const svm_parameter *param)
 
static void svm_group_classes (const svm_problem *prob, int *nr_class_ret, int **label_ret, int **start_ret, int **count_ret, int *perm)
 
static void remove_zero_weight (svm_problem *newprob, const svm_problem *prob)
 
svm_modelsvm_train (const svm_problem *prob, const svm_parameter *param)
 
void svm_cross_validation (const svm_problem *prob, const svm_parameter *param, int nr_fold, double *target)
 
int svm_get_svm_type (const svm_model *model)
 
int svm_get_nr_class (const svm_model *model)
 
void svm_get_labels (const svm_model *model, int *label)
 
void svm_get_sv_indices (const svm_model *model, int *indices)
 
int svm_get_nr_sv (const svm_model *model)
 
double svm_get_svr_probability (const svm_model *model)
 
double svm_predict_values (const svm_model *model, const svm_node *x, double *dec_values)
 
double svm_predict (const svm_model *model, const svm_node *x)
 
double svm_predict_probability (const svm_model *model, const svm_node *x, double *prob_estimates)
 
int svm_save_model (const char *model_file_name, const svm_model *model)
 
static char * readline (FILE *input)
 
bool read_model_header (FILE *fp, svm_model *model)
 
svm_modelsvm_load_model (const char *model_file_name)
 
void svm_free_model_content (svm_model *model_ptr)
 
void svm_free_and_destroy_model (svm_model **model_ptr_ptr)
 
void svm_destroy_param (svm_parameter *param)
 
const char * svm_check_parameter (const svm_problem *prob, const svm_parameter *param)
 
int svm_check_probability_model (const svm_model *model)
 
void svm_set_print_string_function (void(*print_func)(const char *))
 

Variables

int libsvm_version
 
static void(* svm_print_string )(const char *)
 
static const char * svm_type_table []
 
static const char * kernel_type_table []
 
static char * line
 
static int max_line_len
 

Macro Definition Documentation

◆ FSCANF

#define FSCANF (   _stream,
  _format,
  _var 
)

Definition at line 2898 of file svm.cpp.

Referenced by read_model_header().

◆ INF

#define INF

Definition at line 75 of file svm.cpp.

Referenced by info().

◆ Malloc

◆ TAU

#define TAU

Definition at line 76 of file svm.cpp.

Referenced by info().

Typedef Documentation

◆ Qfloat

typedef float Qfloat

Definition at line 50 of file svm.cpp.

◆ schar

typedef signed char schar

Definition at line 51 of file svm.cpp.

Function Documentation

◆ clone()

template<class S , class T >
static void clone ( T *&  dst,
S *  src,
int  n 
)
inlinestatic

◆ info()

static void info ( const char *  fmt,
  ... 
)
static

Definition at line 86 of file svm.cpp.

References svm_parameter::cache_size, clone(), svm_parameter::coef0, svm_parameter::degree, mitk::eps, svm_parameter::gamma, Json::in(), svm_node::index, INF, k(), svm_parameter::kernel_type, svm_problem::l, LINEAR, max(), min(), POLY, powi(), PRECOMPUTED, RBF, SIGMOID, swap(), TAU, svm_node::value, and svm_problem::x.

Referenced by mitk::PropertyPersistence::AddInfo(), berry::QtStyleManager::AddStyle(), berry::QtStyleManager::AddStyles(), mitk::DICOMTagsOfInterestService::AddTagOfInterest(), mitk::modelFit::CreateFitInfoFromModelParameterizer(), QmitkAlgorithmListModel::data(), mitk::DICOMTagPath::FromStr(), QmitkFramesRegistrationJob::GetLoadedAlgorithm(), mitk::MAPAlgorithmInfoSelection::GetSelectedAlgorithmInfo(), mitk::NDITrackingDevice::GetSupportedVolumes(), mitk::DICOMGenericTagCache::GetTagValue(), QmitkFileChooser::IsValidFile(), main(), mitk::MAPAlgorithmInfoObject::MAPAlgorithmInfoObject(), multiclass_probability(), QmitkDicomExternalDataWidget::OnDownloadButtonClicked(), QmitkRegistrationJob::OnMapAlgorithmEvent(), Json::Reader::parse(), mitk::CustomTagParser::ParseDicomPropertyString(), mitk::ItkImageIO::Read(), us::ModuleRegistry::Register(), berry::QtStyleManager::RemoveStyles(), runMonteCarlo(), mitk::DICOMDCMTKTagScanner::Scan(), QmitkFileChooser::SetFile(), QmitkNodeSelectionButton::SetNodeInfo(), QmitkAbstractNodeSelectionWidget::SetPopUpHint(), QmitkAbstractNodeSelectionWidget::SetPopUpTitel(), mitk::VtkPropRenderer::SetPropertyKeys(), mitk::DICOMImageBlockDescriptor::SetTiltInformation(), sigmoid_train(), solve_nu_svc(), solve_nu_svr(), svm_svr_probability(), svm_train(), svm_train_one(), testDeserializeFunction(), vtkMitkGPUVolumeRayCastMapper::vtkMitkGPUVolumeRayCastMapper(), and us::Module::~Module().

◆ max()

template<class T >
static T max ( x,
y 
)
inlinestatic

Definition at line 56 of file svm.cpp.

Referenced by mitk::NavigationDataLandmarkTransformFilter::AccumulateStatistics(), QmitkOverlayController::AdjustOverlayPosition(), mitk::SliceNavigationController::AdjustSliceStepperRange(), mitk::ExtrudedContour::BuildGeometry(), CalculateCoocurenceFeatures(), CalculateFirstOrderHistogramStatistics(), CalculateFirstOrderStatistics(), CalculateImageMinMax(), CalculateImageRegionMinMax(), mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), calculateLocalStatistic(), mitk::CalculateGrayValueStatisticsTool::CalculateMinMax(), calculateMOBB(), mitk::PlanarPolygon::CheckForLineIntersection(), CheckPlanesOutsideOfBoundingBox(), mitk::PlaneGeometry::CheckRotationMatrix(), mitk::MultiComponentImageDataComparisonFilter::CompareMultiComponentImage(), mitk::DataStorage::ComputeBoundingGeometry3D(), mitk::AnisotropicIterativeClosestPointRegistration::ComputeCorrespondences(), mitk::MaximumCurveDescriptionParameter::ComputeCurveDescriptionParameter(), mitk::ComputeGlobalMinimum(), mitk::ImageStatisticsHolder::ComputeImageStatistics(), mitk::ComputeIntensityProfileStatistics(), ComputeMiliSecDuration(), mitk::DataStorage::ComputeTimeBounds(), ConvertRGBTripletToHexColorCode(), mitk::ImageLiveWireContourModelFilter::CreateDynamicCostMapByITK(), QmitkMapPropertyDelegate::createEditor(), QmitkPropertyDelegate::createEditor(), QmitkToFCompositeFilterWidget::CreateQtPartControl(), mitk::PointSetVtkMapper2D::CreateVTKRenderObjects(), mitk::RegEvaluationObject::doConversion(), mitk::RenderingManager::DoFinishAbortRendering(), QmitkAdaptiveRegionGrowingToolGUI::EnableControls(), mitk::ClippedSurfaceBoundsCalculator::EnforceImageBounds(), mitk::LevelWindow::EnsureConsistency(), mitk::ImageStatisticsHolder::Expand(), mitk::FeedbackContourTool::FeedbackContourTool(), mitk::FileWriterSelector::FileWriterSelector(), mitk::NavigationDataLandmarkTransformFilter::FindCorrespondentLandmarks(), mitk::ProportionalTimeGeometryToXML::FromXML(), mitk::GeneralizedLinearModel::GeneralizedLinearModel(), mitk::BoundingObjectToSegmentationFilter::GenerateData(), mitk::CorrectorAlgorithm::GenerateData(), mitk::ExtractSliceFilter::GenerateData(), mitk::BoundingObjectCutter::GenerateOutputInformation(), mitk::BoundingShapeCropper::GenerateOutputInformation(), berry::Geometry::GetClosestSide(), mitk::DICOMFileReaderSelector::GetFirstReaderWithMinimumNumberOfOutputImages(), mitk::HotspotMaskGenerator::GetHotspotIndex(), mitk::LabeledImageToSurfaceFilter::GetLabelForNthOutput(), mitk::Gizmo::GetLongestRadius(), mitk::SimpleImageHistogram::GetMax(), mitk::PlanarBezierCurve::GetMaximumNumberOfControlPoints(), mitk::ProportionalTimeGeometry::GetMaximumTimePoint(), GetMinimum(), QmitkOverlayController::GetMinimumSizeForWidget(), mitk::ProportionalTimeGeometry::GetMinimumTimePoint(), mitk::OtsuTool3D::GetNumberOfBins(), mitk::TubeGraphPicker::GetPickedTube(), mitk::ImageStatisticsHolder::GetScalarValue2ndMinNoRecompute(), mitk::ImageStatisticsHolder::GetScalarValueMinNoRecompute(), mitk::ImageStatisticsCalculator::GetStatistics(), mitk::ModelFitPlotData::GetXMinMax(), mitk::ModelFitPlotData::GetYMinMax(), mitk::ImageStatisticsHolder::ImageStatisticsHolder(), info(), mitk::ProportionalTimeGeometry::Initialize(), mitk::ClippedSurfaceBoundsCalculator::InitializeOutput(), mitk::MRNormTwoRegionsBasedFilter::InternalComputeMask(), mitk::MRNormLinearStatisticBasedFilter::InternalComputeMask(), mitk::MaskImageFilter::InternalComputeMask(), itkErode2(), mitk::CalculateGrayValueStatisticsTool::ITKHistogramming(), mitk::CalculateSegmentationVolume::ItkImageProcessing(), itkMaskedNaryStatisticsImageFilterTest(), itkMaskedStatisticsImageFilterTest(), itk::ExtendedLabelStatisticsImageFilter< TInputImage, TLabelImage >::LabelStatistics::LabelStatistics(), main(), mitk::ToFOpenCVImageGrabber::MapScalars(), mitk::BeamformingUtils::MinMaxLines(), mitkMaskedDynamicImageStatisticsGeneratorTest(), mitkMultiComponentImageDataComparisonFilterTest(), multiclass_probability(), QmitkAdaptiveRegionGrowingToolGUI::OnPointAdded(), QmitkOtsuTool3DGUI::OnRegionSelectionChanged(), QmitkToFCompositeFilterWidget::OnThresholdFilterMaxValueChanged(), QmitkToFVisualisationSettingsWidget::OnWidgetSelected(), itk::Functor::NeighborhoodFirstOrderStatistics< TNeighborhoodType, TPixelOutputType >::operator()(), itk::Functor::NeighborhoodCooccurenceMatrix< TNeighborhoodType, TPixelOutputType >::operator()(), mitk::MeshMapper2D::Paint(), mitk::PlanarDoubleEllipse::PlanarDoubleEllipse(), mitk::CollectionStatistic::Print(), QmitkAnyDoubleWidget::QmitkAnyDoubleWidget(), QmitkAnyFloatWidget::QmitkAnyFloatWidget(), QmitkAnyIntWidget::QmitkAnyIntWidget(), QmitkAnyShortWidget::QmitkAnyShortWidget(), QmitkAnyUIntWidget::QmitkAnyUIntWidget(), QmitkAnyUShortWidget::QmitkAnyUShortWidget(), QmitkLineEditLevelWindowWidget::QmitkLineEditLevelWindowWidget(), mitk::CompareImageDataFilter::ResetCompareResultsToInitial(), mitk::ImageStatisticsHolder::ResetImageStatistics(), QmitkAdaptiveRegionGrowingToolGUI::RunSegmentation(), mitk::SliceNavigationController::SelectSliceByPoint(), mitk::LevelWindow::SetAuto(), mitk::PlanarEllipse::SetControlPoint(), itk::ShortestPathCostFunctionLiveWire< TInputImageType >::SetCostMapMaximum(), QmitkAdaptiveRegionGrowingToolGUI::SetInputImageNode(), QmitkSliderNavigatorWidget::SetLabelValues(), mitk::GizmoInteractor::SetManipulatedObjectNode(), QmitkTransferFunctionCanvas::SetMax(), mitk::RenderingManager::SetMaximumLOD(), mitk::PlanarBezierCurve::SetNumberOfSegments(), mitk::PlanarDoubleEllipse::SetNumberOfSegments(), mitk::Stepper::SetPos(), QmitkUpdateTimerWidget::SetPurposeLabelText(), mitk::Stepper::SetRange(), mitk::LevelWindow::SetRangeMinMax(), QmitkHistogramVisualizationWidget::SetTheme(), mitk::ToFCompositeFilter::SetThresholdFilterParameter(), us::stricomp(), svm_predict_probability(), itk::MultiHistogramFilter< TInputImageType, TOuputImageType >::ThreadedGenerateData(), mitk::ShowSegmentationAsSmoothedSurface::ThreadedUpdateFunction(), mitk::ProportionalTimeGeometry::TimeStepToTimePoint(), mitk::ProportionalTimeGeometryToXML::ToXML(), mitk::ClippedSurfaceBoundsCalculator::Update(), mitk::CvMatCompare::Update(), mitk::AnisotropicIterativeClosestPointRegistration::Update(), mitk::PUImpurityLoss< TLossFunction, TLabelContainer, TWeightContainer >::UpdatePUCounts(), QmitkTransferFunctionCanvas::ValidateCoord(), mitk::WeightedPointTransform::WeightedPointRegister(), us::LDAPExprConstants::WILDCARD(), itk::AdaptiveThresholdIterator< TImage, TFunction >::~AdaptiveThresholdIterator(), and mitk::IRenderingManager::~IRenderingManager().

◆ min()

template<class T >
static T min ( x,
y 
)
inlinestatic

Definition at line 53 of file svm.cpp.

Referenced by mitk::NavigationDataLandmarkTransformFilter::AccumulateStatistics(), mitk::SliceNavigationController::AdjustSliceStepperRange(), Assert_ItkImageImportSucceded_ReturnsTrue(), mitk::ExtrudedContour::BuildGeometry(), mitk::SimpleBarrierConstraintChecker::CalcPenalty(), CalculateCoocurenceFeatures(), CalculateFirstOrderHistogramStatistics(), CalculateFirstOrderStatistics(), mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), mitk::CalculateGrayValueStatisticsTool::CalculateMinMax(), mitk::PlanarPolygon::CheckForLineIntersection(), CheckPlanesOutsideOfBoundingBox(), mitk::MultiComponentImageDataComparisonFilter::CompareMultiComponentImage(), mitk::ComputeCenterOfMaximumArea(), mitk::ComputeGlobalMaximum(), mitk::ComputeIntensityProfileStatistics(), ComputeMiliSecDuration(), ConvertRGBTripletToHexColorCode(), QmitkMapPropertyDelegate::createEditor(), QmitkPropertyDelegate::createEditor(), CreateFileList(), CreateJSONEscapes(), QmitkToFCompositeFilterWidget::CreateQtPartControl(), mitk::RegEvaluationObject::doConversion(), QmitkDataStorageTreeModel::dropMimeData(), QmitkAdaptiveRegionGrowingToolGUI::EnableControls(), mitk::ClippedSurfaceBoundsCalculator::EnforceImageBounds(), mitk::LevelWindow::EnsureConsistency(), mitk::Equal(), mitk::FindTopmostVisibleNode(), mitk::BoundingObjectToSegmentationFilter::GenerateData(), mitk::BandpassFilter::GenerateData(), mitk::CorrectorAlgorithm::GenerateData(), mitk::BoundingObjectCutter::GenerateOutputInformation(), mitk::BoundingShapeCropper::GenerateOutputInformation(), mitk::GeometryClipImageFilter::GenerateOutputInformation(), mitk::HotspotMaskGenerator::GetHotspotIndex(), mitk::IgnorePixelMaskGenerator::GetMask(), mitk::SimpleImageHistogram::GetMin(), mitk::OtsuTool3D::GetNumberOfBins(), mitk::GizmoMapper2D::GetVtkPolyData(), mitk::ModelFitPlotData::GetXMinMax(), mitk::ModelFitPlotData::GetYMinMax(), info(), mitk::ClippedSurfaceBoundsCalculator::InitializeOutput(), mitk::MRNormTwoRegionsBasedFilter::InternalComputeMask(), mitk::MRNormLinearStatisticBasedFilter::InternalComputeMask(), mitk::MaskImageFilter::InternalComputeMask(), mitk::CalculateGrayValueStatisticsTool::ITKHistogramming(), mitk::CalculateSegmentationVolume::ItkImageProcessing(), itkMaskedNaryStatisticsImageFilterTest(), itkMaskedStatisticsImageFilterTest(), mitk::ToFOpenCVImageGrabber::MapScalars(), mitk::BeamformingUtils::MinMaxLines(), mitkMaskedDynamicImageStatisticsGeneratorTest(), us::ModuleVersion::ModuleVersion(), QmitkIGTPlayerWidget::OnPlaying(), QmitkAdaptiveRegionGrowingToolGUI::OnPointAdded(), mitk::USDiPhASCustomControls::OnSetTGCMin(), QmitkToFCompositeFilterWidget::OnThresholdFilterMaxValueChanged(), QmitkNavigationDataPlayerControlWidget::OnUpdate(), QmitkToFVisualisationSettingsWidget::OnWidgetSelected(), itk::Functor::NeighborhoodFirstOrderStatistics< TNeighborhoodType, TPixelOutputType >::operator()(), itk::Functor::NeighborhoodCooccurenceMatrix< TNeighborhoodType, TPixelOutputType >::operator()(), mitk::MeshMapper2D::Paint(), mitk::VectorImageMapper2D::Paint(), mitk::PlanarFigureMapper2D::PaintPolyLine(), mitk::PlanarDoubleEllipse::PlanarDoubleEllipse(), QmitkAnyDoubleWidget::QmitkAnyDoubleWidget(), QmitkAnyFloatWidget::QmitkAnyFloatWidget(), QmitkAnyIntWidget::QmitkAnyIntWidget(), QmitkAnyShortWidget::QmitkAnyShortWidget(), QmitkAnyUIntWidget::QmitkAnyUIntWidget(), QmitkAnyUShortWidget::QmitkAnyUShortWidget(), QmitkAdaptiveRegionGrowingToolGUI::RunSegmentation(), mitk::TumorInvasionClassification::SelectTrainingSamples(), mitk::TwoCompartmentExchangeModelDifferentialEquations::setAIFTimeGrid(), mitk::TwoTissueCompartmentModelDifferentialEquations::setAIFTimeGrid(), mitk::LevelWindow::SetAuto(), mitk::LevelWindowManager::SetAutoTopMostImage(), QmitkAdaptiveRegionGrowingToolGUI::SetInputImageNode(), QmitkSliderNavigatorWidget::SetLabelValues(), QmitkTransferFunctionCanvas::SetMin(), mitk::Stepper::SetPos(), QmitkUpdateTimerWidget::SetPurposeLabelText(), mitk::Stepper::SetRange(), mitk::LevelWindow::SetRangeMinMax(), QmitkHistogramVisualizationWidget::SetTheme(), mitk::ToFCompositeFilter::SetThresholdFilterParameter(), solve_nu_svc(), solve_nu_svr(), solve_one_class(), us::stricomp(), svm_check_parameter(), svm_predict_probability(), itk::MultiHistogramFilter< TInputImageType, TOuputImageType >::ThreadedGenerateData(), mitk::ShowSegmentationAsSmoothedSurface::ThreadedUpdateFunction(), mitk::ProportionalTimeGeometry::TimeStepToTimePoint(), mitk::ClippedSurfaceBoundsCalculator::Update(), mitk::LevelWindowManager::Update(), QmitkTransferFunctionCanvas::ValidateCoord(), and itk::AdaptiveThresholdIterator< TImage, TFunction >::~AdaptiveThresholdIterator().

◆ multiclass_probability()

static void multiclass_probability ( int  k,
double **  r,
double *  p 
)
static

Definition at line 1916 of file svm.cpp.

References mitk::eps, info(), k(), Malloc, and max().

Referenced by svm_predict_probability().

◆ powi()

static double powi ( double  base,
int  times 
)
inlinestatic

Definition at line 64 of file svm.cpp.

Referenced by info().

◆ print_string_stdout()

static void print_string_stdout ( const char *  s)
static

Definition at line 79 of file svm.cpp.

Referenced by svm_set_print_string_function().

◆ read_model_header()

◆ readline()

static char* readline ( FILE *  input)
static

Definition at line 2873 of file svm.cpp.

References line, and max_line_len.

Referenced by svm_load_model().

◆ remove_zero_weight()

static void remove_zero_weight ( svm_problem newprob,
const svm_problem prob 
)
static

Definition at line 2183 of file svm.cpp.

References svm_problem::l, svm_model::l, Malloc, svm_problem::W, svm_problem::x, and svm_problem::y.

Referenced by svm_train().

◆ sigmoid_predict()

static double sigmoid_predict ( double  decision_value,
double  A,
double  B 
)
static

Definition at line 1905 of file svm.cpp.

Referenced by svm_predict_probability().

◆ sigmoid_train()

static void sigmoid_train ( int  l,
const double *  dec_values,
const double *  labels,
double &  A,
double &  B 
)
static

Definition at line 1792 of file svm.cpp.

References mitk::eps, info(), and Malloc.

Referenced by svm_binary_svc_probability().

◆ solve_c_svc()

static void solve_c_svc ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo *  si,
double  Cp,
double  Cn 
)
static

◆ solve_epsilon_svr()

static void solve_epsilon_svr ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo *  si 
)
static

◆ solve_nu_svc()

static void solve_nu_svc ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo *  si 
)
static

◆ solve_nu_svr()

static void solve_nu_svr ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo *  si 
)
static

◆ solve_one_class()

static void solve_one_class ( const svm_problem prob,
const svm_parameter param,
double *  alpha,
Solver::SolutionInfo *  si 
)
static

◆ svm_binary_svc_probability()

static void svm_binary_svc_probability ( const svm_problem prob,
const svm_parameter param,
double  Cp,
double  Cn,
double &  probA,
double &  probB 
)
static

◆ svm_check_parameter()

◆ svm_check_probability_model()

int svm_check_probability_model ( const svm_model model)

◆ svm_cross_validation()

◆ svm_destroy_param()

◆ svm_free_and_destroy_model()

void svm_free_and_destroy_model ( svm_model **  model_ptr_ptr)

◆ svm_free_model_content()

◆ svm_get_labels()

void svm_get_labels ( const svm_model model,
int *  label 
)

Definition at line 2609 of file svm.cpp.

References svm_model::label, and svm_model::nr_class.

◆ svm_get_nr_class()

int svm_get_nr_class ( const svm_model model)

Definition at line 2604 of file svm.cpp.

References svm_model::nr_class.

Referenced by svm_cross_validation().

◆ svm_get_nr_sv()

int svm_get_nr_sv ( const svm_model model)

Definition at line 2623 of file svm.cpp.

References svm_model::l.

◆ svm_get_sv_indices()

void svm_get_sv_indices ( const svm_model model,
int *  indices 
)

Definition at line 2616 of file svm.cpp.

References svm_model::l, and svm_model::sv_indices.

◆ svm_get_svm_type()

int svm_get_svm_type ( const svm_model model)

Definition at line 2599 of file svm.cpp.

References svm_model::param, and svm_parameter::svm_type.

◆ svm_get_svr_probability()

double svm_get_svr_probability ( const svm_model model)

Definition at line 2628 of file svm.cpp.

References EPSILON_SVR, NU_SVR, svm_model::param, svm_model::probA, and svm_parameter::svm_type.

◆ svm_group_classes()

static void svm_group_classes ( const svm_problem prob,
int *  nr_class_ret,
int **  label_ret,
int **  start_ret,
int **  count_ret,
int *  perm 
)
static

◆ svm_load_model()

svm_model* svm_load_model ( const char *  model_file_name)

◆ svm_predict()

double svm_predict ( const svm_model model,
const svm_node x 
)

◆ svm_predict_probability()

double svm_predict_probability ( const svm_model model,
const svm_node x,
double *  prob_estimates 
)

◆ svm_predict_values()

double svm_predict_values ( const svm_model model,
const svm_node x,
double *  dec_values 
)

◆ svm_save_model()

◆ svm_set_print_string_function()

void svm_set_print_string_function ( void(*)(const char *)  print_func)

Definition at line 3287 of file svm.cpp.

References print_string_stdout(), and svm_print_string.

◆ svm_svr_probability()

static double svm_svr_probability ( const svm_problem prob,
const svm_parameter param 
)
static

◆ svm_train()

◆ svm_train_one()

static decision_function svm_train_one ( const svm_problem prob,
const svm_parameter param,
double  Cp,
double  Cn 
)
static

◆ swap()

Variable Documentation

◆ kernel_type_table

const char* kernel_type_table[]
static

Definition at line 2775 of file svm.cpp.

Referenced by read_model_header(), and svm_save_model().

◆ libsvm_version

int libsvm_version

Definition at line 49 of file svm.cpp.

◆ line

char* line
static

Definition at line 2870 of file svm.cpp.

Referenced by mitk::PlanarFigureVtkMapper3D::ApplyPlanarFigureProperties(), BPFunction(), mitk::ClippedSurfaceBoundsCalculator::CalculateIntersectionPoints(), mitk::DisplayInteractor::CheckSwivelPossible(), mitk::DisplayActionEventBroadcast::CheckSwivelPossible(), QmitkScalarBar::CleanUpLines(), mitk::TestDICOMLoading::CompareImageInformationDumps(), QmitkBoundingObjectWidget::CreateBoundingObject(), mitk::LabelSetImageVtkMapper2D::CreateOutlinePolyData(), mitk::ImageVtkMapper2D::CreateOutlinePolyData(), mitk::DoseImageVtkMapper2D::CreateOutlinePolyData(), mitk::PointSetVtkMapper2D::CreateVTKRenderObjects(), mitk::BeamformingUtils::DASSphericalLine(), mitk::BeamformingUtils::DMASSphericalLine(), mitk::Transform::FromCSVFile(), mitk::BeamformingFilter::GenerateData(), mitk::ContourModelSetMapper3D::GenerateDataForRenderer(), mitk::ComputeContourSetNormalsFilter::GetNormalsAsSurface(), mitk::ProvisioningInfo::getPluginsToStart(), QmitkStdMultiWidget::GetSelectedPosition(), mitk::USDiPhASImageSource::ImageDataCallback(), LoadDumps(), mitk::GalilMotor::LoadResorceFile(), mitk::QuantelLaser::LoadResorceFile(), mitk::Line< double, 2 >::operator!=(), mitk::MeshMapper2D::Paint(), QmitkScalarBar::paintEvent(), Json::Reader::parse(), mitk::pa::PropertyCalculator::PropertyCalculator(), mitk::ExampleDataStructureReaderService::Read(), ReadBothMatrix(), QmitkPythonTextEditor::ReadFile(), readline(), ReadMatrix(), ConfigFileReader::ReadStream(), vtkMitkRectangleProp::RenderOverlay(), mitk::BeamformingUtils::sDMASSphericalLine(), mitk::Mesh::SearchLine(), mitk::PlaneGeometry::SignedDistanceFromPlane(), svm_load_model(), and mitk::Exception::~Exception().

◆ max_line_len

int max_line_len
static

Definition at line 2871 of file svm.cpp.

Referenced by readline(), and svm_load_model().

◆ svm_print_string

void(* svm_print_string) (const char *)
static

Definition at line 84 of file svm.cpp.

Referenced by svm_set_print_string_function().

◆ svm_type_table

const char* svm_type_table[]
static

Definition at line 2770 of file svm.cpp.

Referenced by read_model_header(), and svm_save_model().